mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-01 18:38:48 +00:00
Replace pseudo-private member access to connections_
in passes/cmds/scatter.cc
.
Co-Authored-By: N. Engelhardt <nak@symbioticeda.com>
This commit is contained in:
parent
0787af947f
commit
0424555702
1 changed files with 10 additions and 13 deletions
|
@ -48,20 +48,17 @@ struct ScatterPass : public Pass {
|
||||||
|
|
||||||
for (auto module : design->selected_modules())
|
for (auto module : design->selected_modules())
|
||||||
{
|
{
|
||||||
for (auto cell : module->cells())
|
for (auto cell : module->cells()) {
|
||||||
for (auto &p : cell->connections_)
|
std::map<RTLIL::IdString, std::pair<RTLIL::SigSpec, RTLIL::SigSpec>> new_connections;
|
||||||
{
|
for (auto conn : cell->connections())
|
||||||
RTLIL::Wire *wire = module->addWire(NEW_ID, p.second.size());
|
new_connections.emplace(conn.first, std::make_pair(conn.second, module->addWire(NEW_ID, conn.second.size())));
|
||||||
|
for (auto &it : new_connections) {
|
||||||
if (ct.cell_output(cell->type, p.first)) {
|
if (ct.cell_output(cell->type, it.first))
|
||||||
RTLIL::SigSig sigsig(p.second, wire);
|
module->connect(RTLIL::SigSig(it.second.first, it.second.second));
|
||||||
module->connect(sigsig);
|
else
|
||||||
} else {
|
module->connect(RTLIL::SigSig(it.second.second, it.second.first));
|
||||||
RTLIL::SigSig sigsig(wire, p.second);
|
cell->setPort(it.first, it.second.second);
|
||||||
module->connect(sigsig);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p.second = wire;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue