From 68c9947d1af85e4e66022772375fb6ab9f052206 Mon Sep 17 00:00:00 2001 From: Madeline Busig Date: Mon, 10 Nov 2025 22:48:55 -0800 Subject: [PATCH] Fix IP interface not being set correctly Need to set both bus abstraction and type, and they don't have the same values --- tcl/package_ip.tcl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tcl/package_ip.tcl b/tcl/package_ip.tcl index 0b40bca..692bdad 100644 --- a/tcl/package_ip.tcl +++ b/tcl/package_ip.tcl @@ -40,7 +40,7 @@ proc SplitSub { str startword } { proc ParseInterfaceConf { iface_name iface_conf } { puts "Parsing interface $iface_name" - set iface_protocol [dict get $iface_conf "INTERFACE"] + set iface_abstraction [dict get $iface_conf "INTERFACE"] variable infer false if { [dict exists $iface_conf "INFER"] } { @@ -56,7 +56,7 @@ proc ParseInterfaceConf { iface_name iface_conf } { puts "Using ports: $ports" - set result [ipx::infer_bus_interface $ports $iface_protocol [ipx::current_core]] + set result [ipx::infer_bus_interface $ports $iface_abstraction [ipx::current_core]] # Inferred name could differ from the desired name, so set it set inferred_name [lindex $result 2] @@ -69,8 +69,17 @@ proc ParseInterfaceConf { iface_name iface_conf } { set created_iface [ipx::get_bus_interfaces $iface_name -of_objects [ipx::current_core]] - set_property ABSTRACTION_TYPE_VLNV $iface_protocol $created_iface - set_property BUS_TYPE_VLNV $iface_protocol $created_iface + set_property ABSTRACTION_TYPE_VLNV $iface_abstraction $created_iface + + # We need to set BOTH the bus ABSTRACTION, and the bus TYPE. + # The type can be obtained from the abstraction, so it is what + # is provided in ip.conf. Vivado does not provide an easy way + # to get one from the other, so we load the interface IP and + # get it's property. + set bus_abstraction [lindex [ipx::get_ipfiles -type busabs $iface_abstraction] 0] + set bus_type_vlnv [get_property BUS_TYPE_VLNV $bus_abstraction] + + set_property BUS_TYPE_VLNV $bus_type_vlnv $created_iface } set iface [ipx::get_bus_interfaces $iface_name -of_objects [ipx::current_core]]