diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-04-22 11:19:52 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-04-22 11:19:52 -0700 |
commit | 4883391b6331e62226c46e797f82a31ef9ef81a3 (patch) | |
tree | 3779d9d3c226602b96eb6f72e2c780e02c64df3e /passes/techmap/attrmap.cc | |
parent | d06d4f35c376672ad1042b46bb29d7bd2bfa5243 (diff) | |
parent | bc98a463a433e5b1553b307301e67e641a148d3c (diff) | |
download | yosys-4883391b6331e62226c46e797f82a31ef9ef81a3.tar.gz yosys-4883391b6331e62226c46e797f82a31ef9ef81a3.tar.bz2 yosys-4883391b6331e62226c46e797f82a31ef9ef81a3.zip |
Merge remote-tracking branch 'origin/master' into xaig
Diffstat (limited to 'passes/techmap/attrmap.cc')
-rw-r--r-- | passes/techmap/attrmap.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/passes/techmap/attrmap.cc b/passes/techmap/attrmap.cc index 0b5576b06..aa48e1125 100644 --- a/passes/techmap/attrmap.cc +++ b/passes/techmap/attrmap.cc @@ -111,9 +111,10 @@ struct AttrmapMap : AttrmapAction { }; struct AttrmapRemove : AttrmapAction { + bool has_value; string name, value; bool apply(IdString &id, Const &val) YS_OVERRIDE { - return !(match_name(name, id) && match_value(value, val)); + return !(match_name(name, id) && (!has_value || match_value(value, val))); } }; @@ -235,6 +236,7 @@ struct AttrmapPass : public Pass { } auto action = new AttrmapRemove; action->name = arg1; + action->has_value = (p != string::npos); action->value = val1; actions.push_back(std::unique_ptr<AttrmapAction>(action)); continue; |