util_dac_unpack: Hide unused signals

Hide unused signals based on the number of selected channels. This silences
a few warnings from the tools about unconnected pins.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
main
Lars-Peter Clausen 2014-09-30 10:38:01 +02:00
parent 48921bc872
commit f83fd6dae3
1 changed files with 13 additions and 0 deletions

View File

@ -18,6 +18,19 @@ ipx::remove_memory_map {m} [ipx::current_core]
ipx::remove_address_space {s} [ipx::current_core] ipx::remove_address_space {s} [ipx::current_core]
ipx::remove_address_space {fifo} [ipx::current_core] ipx::remove_address_space {fifo} [ipx::current_core]
for {set i 0} {$i < 8} {incr i} {
foreach port {"dac_enable" "dac_valid" "dac_data"} {
set name [format "%s_%.2d" $port $i]
set_property ENABLEMENT_DEPENDENCY \
"(spirit:decode(id('MODELPARAM_VALUE.CHANNELS')) > $i)" \
[ipx::get_ports $name]
}
foreach port {"dac_enable" "dac_valid"} {
set name [format "%s_%.2d" $port $i]
set_property DRIVER_VALUE "0" [ipx::get_ports $name]
}
}
ipx::save_core [ipx::current_core] ipx::save_core [ipx::current_core]