Fix IP interface not being set correctly

Need to set both bus abstraction and type, and they don't have the same
values
This commit is contained in:
Madeline Busig 2025-11-10 22:48:55 -08:00
parent 712206a524
commit 68c9947d1a

View File

@ -40,7 +40,7 @@ proc SplitSub { str startword } {
proc ParseInterfaceConf { iface_name iface_conf } { proc ParseInterfaceConf { iface_name iface_conf } {
puts "Parsing interface $iface_name" puts "Parsing interface $iface_name"
set iface_protocol [dict get $iface_conf "INTERFACE"] set iface_abstraction [dict get $iface_conf "INTERFACE"]
variable infer false variable infer false
if { [dict exists $iface_conf "INFER"] } { if { [dict exists $iface_conf "INFER"] } {
@ -56,7 +56,7 @@ proc ParseInterfaceConf { iface_name iface_conf } {
puts "Using ports: $ports" 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 # Inferred name could differ from the desired name, so set it
set inferred_name [lindex $result 2] 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 created_iface [ipx::get_bus_interfaces $iface_name -of_objects [ipx::current_core]]
set_property ABSTRACTION_TYPE_VLNV $iface_protocol $created_iface set_property ABSTRACTION_TYPE_VLNV $iface_abstraction $created_iface
set_property BUS_TYPE_VLNV $iface_protocol $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]] set iface [ipx::get_bus_interfaces $iface_name -of_objects [ipx::current_core]]