aboutsummaryrefslogtreecommitdiffstats
path: root/passes/opt/opt_muxtree.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-26 14:32:50 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-26 15:58:23 +0200
commitb7dda723022ad00c6c0089be888eab319953faa8 (patch)
tree4fe12ce120f1809891dc4cbd862bbcdab0e90fcc /passes/opt/opt_muxtree.cc
parentcd6574ecf652901573cbc6b89e1a59dd383ec496 (diff)
downloadyosys-b7dda723022ad00c6c0089be888eab319953faa8.tar.gz
yosys-b7dda723022ad00c6c0089be888eab319953faa8.tar.bz2
yosys-b7dda723022ad00c6c0089be888eab319953faa8.zip
Changed users of cell->connections_ to the new API (sed command)
git grep -l 'connections_' | xargs sed -i -r -e ' s/(->|\.)connections_\["([^"]*)"\] = (.*);/\1set("\2", \3);/g; s/(->|\.)connections_\["([^"]*)"\]/\1get("\2")/g; s/(->|\.)connections_.at\("([^"]*)"\)/\1get("\2")/g; s/(->|\.)connections_.push_back/\1connect/g; s/(->|\.)connections_/\1connections()/g;'
Diffstat (limited to 'passes/opt/opt_muxtree.cc')
-rw-r--r--passes/opt/opt_muxtree.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/passes/opt/opt_muxtree.cc b/passes/opt/opt_muxtree.cc
index 33e66e077..8487152ff 100644
--- a/passes/opt/opt_muxtree.cc
+++ b/passes/opt/opt_muxtree.cc
@@ -88,10 +88,10 @@ struct OptMuxtreeWorker
RTLIL::Cell *cell = cell_it.second;
if (cell->type == "$mux" || cell->type == "$pmux" || cell->type == "$safe_pmux")
{
- RTLIL::SigSpec sig_a = cell->connections_["\\A"];
- RTLIL::SigSpec sig_b = cell->connections_["\\B"];
- RTLIL::SigSpec sig_s = cell->connections_["\\S"];
- RTLIL::SigSpec sig_y = cell->connections_["\\Y"];
+ RTLIL::SigSpec sig_a = cell->get("\\A");
+ RTLIL::SigSpec sig_b = cell->get("\\B");
+ RTLIL::SigSpec sig_s = cell->get("\\S");
+ RTLIL::SigSpec sig_y = cell->get("\\Y");
muxinfo_t muxinfo;
muxinfo.cell = cell;
@@ -130,7 +130,7 @@ struct OptMuxtreeWorker
}
else
{
- for (auto &it : cell->connections_) {
+ for (auto &it : cell->connections()) {
for (int idx : sig2bits(it.second))
bit2info[idx].seen_non_mux = true;
}
@@ -194,10 +194,10 @@ struct OptMuxtreeWorker
continue;
}
- RTLIL::SigSpec sig_a = mi.cell->connections_["\\A"];
- RTLIL::SigSpec sig_b = mi.cell->connections_["\\B"];
- RTLIL::SigSpec sig_s = mi.cell->connections_["\\S"];
- RTLIL::SigSpec sig_y = mi.cell->connections_["\\Y"];
+ RTLIL::SigSpec sig_a = mi.cell->get("\\A");
+ RTLIL::SigSpec sig_b = mi.cell->get("\\B");
+ RTLIL::SigSpec sig_s = mi.cell->get("\\S");
+ RTLIL::SigSpec sig_y = mi.cell->get("\\Y");
RTLIL::SigSpec sig_ports = sig_b;
sig_ports.append(sig_a);
@@ -205,7 +205,7 @@ struct OptMuxtreeWorker
if (live_ports.size() == 1)
{
RTLIL::SigSpec sig_in = sig_ports.extract(live_ports[0]*sig_a.size(), sig_a.size());
- module->connections_.push_back(RTLIL::SigSig(sig_y, sig_in));
+ module->connect(RTLIL::SigSig(sig_y, sig_in));
module->remove(mi.cell);
}
else
@@ -222,9 +222,9 @@ struct OptMuxtreeWorker
}
}
- mi.cell->connections_["\\A"] = new_sig_a;
- mi.cell->connections_["\\B"] = new_sig_b;
- mi.cell->connections_["\\S"] = new_sig_s;
+ mi.cell->set("\\A", new_sig_a);
+ mi.cell->set("\\B", new_sig_b);
+ mi.cell->set("\\S", new_sig_s);
if (new_sig_s.size() == 1) {
mi.cell->type = "$mux";
mi.cell->parameters.erase("\\S_WIDTH");