Implement port mappings reading from ip.conf

This commit is contained in:
Madeline Busig 2025-11-10 22:49:42 -08:00
parent 68c9947d1a
commit 51f3102fae

View File

@ -95,8 +95,6 @@ proc ParseInterfaceConf { iface_name iface_conf } {
# Create user parameters
foreach {key val} $iface_conf {
puts "Checking if $key is parameter"
set param_name [SplitSub $key "PARAMETER"]
if { $param_name == "" } {
@ -109,6 +107,22 @@ proc ParseInterfaceConf { iface_name iface_conf } {
set param [ipx::get_bus_parameters $param_name -of_objects $iface]
set_property value $val $param
}
# Create port mappings
foreach {key val} $iface_conf {
set logical_port [SplitSub $key "PORT"]
set physical_port $val
if { $logical_port == "" } {
continue
}
puts "Mapping logical port $logical_port"
ipx::add_port_map $logical_port $iface
set port_map [ipx::get_port_maps $logical_port -of_objects $iface]
set_property physical_name $physical_port $port_map
}
}
set gitroot [exec git rev-parse --show-toplevel]