diff --git a/power/Power.tcl b/power/Power.tcl index c322f565..7397f78f 100644 --- a/power/Power.tcl +++ b/power/Power.tcl @@ -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 + } } } } diff --git a/tcl/StaTcl.i b/tcl/StaTcl.i index 8a055209..9b096071 100644 --- a/tcl/StaTcl.i +++ b/tcl/StaTcl.i @@ -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,