set_power_activity warn for clock ports

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2022-12-28 16:30:08 -07:00
parent da3f94462f
commit 58be6435f2
2 changed files with 12 additions and 1 deletions

View File

@ -237,7 +237,11 @@ proc set_power_activity { args } {
set ports [get_ports_error "input_ports" $keys(-input_ports)]
foreach port $ports {
if { [get_property $port "direction"] == "input" } {
set_power_input_port_activity $port $activity $duty
if { [sta::is_clock_src [sta::get_port_pin $port]] } {
sta_warn 303 "activity cannot be set on clock ports."
} else {
set_power_input_port_activity $port $activity $duty
}
}
}
}

View File

@ -2393,6 +2393,13 @@ find_pin(const char *path_name)
return cmdLinkedNetwork()->findPin(path_name);
}
Pin *
get_port_pin(const Port *port)
{
Network *network = cmdLinkedNetwork();
return network->findPin(network->topInstance(), port);
}
TmpPinSeq *
find_pins_matching(const char *pattern,
bool regexp,