aboutsummaryrefslogtreecommitdiffstats
path: root/passes/equiv
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-16 16:51:22 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-16 16:51:22 -0700
commit24c934f1af3859fe64ff4fb87a2a3de97695cde4 (patch)
tree131c64cee5a0cf09adc68b32f25e06a9da668ad0 /passes/equiv
parent1c9f3fadb9f60653fc9d1d7d72ba22033e077468 (diff)
parent5abe133323b2a6a46959f796c4730b2d70cdea26 (diff)
downloadyosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.tar.gz
yosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.tar.bz2
yosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.zip
Merge branch 'eddie/abc9_refactor' into xaig_dff
Diffstat (limited to 'passes/equiv')
-rw-r--r--passes/equiv/equiv_opt.cc2
-rw-r--r--passes/equiv/equiv_struct.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/passes/equiv/equiv_opt.cc b/passes/equiv/equiv_opt.cc
index 3596dfd7b..19d1c25ac 100644
--- a/passes/equiv/equiv_opt.cc
+++ b/passes/equiv/equiv_opt.cc
@@ -97,7 +97,7 @@ struct EquivOptPass:public ScriptPass
for (; argidx < args.size(); argidx++) {
if (command.empty()) {
- if (args[argidx].substr(0, 1) == "-")
+ if (args[argidx].compare(0, 1, "-") == 0)
cmd_error(args, argidx, "Unknown option.");
} else {
command += " ";
diff --git a/passes/equiv/equiv_struct.cc b/passes/equiv/equiv_struct.cc
index a7973fd04..6672948b9 100644
--- a/passes/equiv/equiv_struct.cc
+++ b/passes/equiv/equiv_struct.cc
@@ -215,9 +215,9 @@ struct EquivStructWorker
if (c != nullptr) {
string n = cell_name.str();
cells_type = c->type;
- if (GetSize(n) > 5 && n.substr(GetSize(n)-5) == "_gold")
+ if (GetSize(n) > 5 && n.compare(GetSize(n)-5, std::string::npos, "_gold") == 0)
gold_cells.push_back(c);
- else if (GetSize(n) > 5 && n.substr(GetSize(n)-5) == "_gate")
+ else if (GetSize(n) > 5 && n.compare(GetSize(n)-5, std::string::npos, "_gate") == 0)
gate_cells.push_back(c);
else
other_cells.push_back(c);