adi_ip.tcl: adi_add_bus_clock: Set polarity depending on the reset name suffix
Currently the polarity of the reset signal is always set to negative. Change this so that the polarity is selected on the suffix of the name. If it ends with a 'n' or 'N' the polarity will be negative, otherwise it will be positive. This allows this function to be used with reset signals that have positive polarity. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>main
parent
341a695163
commit
19636e8c55
|
@ -132,7 +132,11 @@ proc adi_add_bus_clock {clock_signal_name bus_inf_name {reset_signal_name ""} {r
|
|||
set_property physical_name $reset_signal_name $reset_map
|
||||
|
||||
set reset_polarity [ipx::add_bus_parameter "POLARITY" $reset_inf]
|
||||
set_property value "ACTIVE_LOW" $reset_polarity
|
||||
if {[string match {*[Nn]} $reset_signal_name] == 1} {
|
||||
set_property value "ACTIVE_LOW" $reset_polarity
|
||||
} else {
|
||||
set_property value "ACTIVE_HIGH" $reset_polarity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue