diff --git a/doc/OpenSTA.odt b/doc/OpenSTA.odt index c5ed3e67..1e753f19 100644 Binary files a/doc/OpenSTA.odt and b/doc/OpenSTA.odt differ diff --git a/doc/OpenSTA.pdf b/doc/OpenSTA.pdf index baca70db..0eefeb0b 100644 Binary files a/doc/OpenSTA.pdf and b/doc/OpenSTA.pdf differ diff --git a/tcl/Sdc.tcl b/tcl/Sdc.tcl index adb3e2fe..b5f30896 100644 --- a/tcl/Sdc.tcl +++ b/tcl/Sdc.tcl @@ -975,7 +975,7 @@ proc get_ports { args } { return $ports } -variable filter_regexp1 {@?([a-zA-Z_]+) *(==|=~) *([0-9a-zA-Z_\*]+)} +variable filter_regexp1 {@?([a-zA-Z_]+) *(==|!=|=~) *([0-9a-zA-Z_\*]+)} variable filter_or_regexp "($filter_regexp1) +\\|\\| +($filter_regexp1)" variable filter_and_regexp "($filter_regexp1) +&& +($filter_regexp1)" diff --git a/tcl/StaTcl.i b/tcl/StaTcl.i index e30f38cb..43c5d8c9 100644 --- a/tcl/StaTcl.i +++ b/tcl/StaTcl.i @@ -2426,12 +2426,15 @@ filter_ports(const char *property, Sta *sta = Sta::sta(); PortSeq filtered_ports; bool exact_match = stringEq(op, "=="); + bool pattern_match = stringEq(op, "=~"); + bool not_match = stringEq(op, "!="); for (const Port *port : *ports) { PropertyValue value(getProperty(port, property, sta)); const char *prop = value.stringValue(); if (prop && ((exact_match && stringEq(prop, pattern)) - || (!exact_match && patternMatch(pattern, prop)))) + || (not_match && !stringEq(prop, pattern)) + || (pattern_match && patternMatch(pattern, prop)))) filtered_ports.push_back(port); } delete ports; @@ -2447,13 +2450,16 @@ filter_insts(const char *property, Sta *sta = Sta::sta(); cmdLinkedNetwork(); bool exact_match = stringEq(op, "=="); + bool pattern_match = stringEq(op, "=~"); + bool not_match = stringEq(op, "!="); InstanceSeq filtered_insts; for (const Instance *inst : *insts) { PropertyValue value(getProperty(inst, property, sta)); const char *prop = value.stringValue(); if (prop && ((exact_match && stringEq(prop, pattern)) - || (!exact_match && patternMatch(pattern, prop)))) + || (not_match && !stringEq(prop, pattern)) + || (pattern_match && patternMatch(pattern, prop)))) filtered_insts.push_back(inst); } delete insts; @@ -2469,12 +2475,15 @@ filter_pins(const char *property, Sta *sta = Sta::sta(); PinSeq filtered_pins; bool exact_match = stringEq(op, "=="); + bool pattern_match = stringEq(op, "=~"); + bool not_match = stringEq(op, "!="); for (const Pin *pin : *pins) { PropertyValue value(getProperty(pin, property, sta)); const char *prop = value.stringValue(); if (prop && ((exact_match && stringEq(prop, pattern)) - || (!exact_match && patternMatch(pattern, prop)))) + || (not_match && !stringEq(prop, pattern)) + || (pattern_match && patternMatch(pattern, prop)))) filtered_pins.push_back(pin); } delete pins; @@ -2675,12 +2684,15 @@ filter_timing_arcs(const char *property, Sta *sta = Sta::sta(); EdgeSeq filtered_edges; bool exact_match = stringEq(op, "=="); + bool pattern_match = stringEq(op, "=~"); + bool not_match = stringEq(op, "!="); for (Edge *edge : *edges) { PropertyValue value(getProperty(edge, property, sta)); const char *prop = value.stringValue(); if (prop && ((exact_match && stringEq(prop, pattern)) - || (!exact_match && patternMatch(pattern, prop)))) + || (not_match && !stringEq(prop, pattern)) + || (pattern_match && patternMatch(pattern, prop)))) filtered_edges.push_back(edge); } delete edges;