aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/attrmap.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-04-22 11:45:49 -0700
committerEddie Hung <eddie@fpgeh.com>2019-04-22 11:45:49 -0700
commit4486a98fd5928a4e3cdf9cd27c27b7dd821513bb (patch)
tree0afd22de8a09ab3995355e3813015c4523bd63fd /passes/techmap/attrmap.cc
parentcbb85e40e87fbfb1602bb934ed76a97efb9e55c6 (diff)
parentec88129a5cf510afc39ea12efa6059bed3eadfc3 (diff)
downloadyosys-4486a98fd5928a4e3cdf9cd27c27b7dd821513bb.tar.gz
yosys-4486a98fd5928a4e3cdf9cd27c27b7dd821513bb.tar.bz2
yosys-4486a98fd5928a4e3cdf9cd27c27b7dd821513bb.zip
Merge remote-tracking branch 'origin/xc7srl' into xc7mux
Diffstat (limited to 'passes/techmap/attrmap.cc')
-rw-r--r--passes/techmap/attrmap.cc4
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;