mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Better preserve wires when flattening (in comparison to techmap)
This commit is contained in:
parent
37cbb1ca60
commit
ca53ef5098
|
@ -151,18 +151,18 @@ struct TechmapWorker
|
||||||
if (c.second.width < c.first.width)
|
if (c.second.width < c.first.width)
|
||||||
c.second.append(RTLIL::SigSpec(RTLIL::State::S0, c.first.width - c.second.width));
|
c.second.append(RTLIL::SigSpec(RTLIL::State::S0, c.first.width - c.second.width));
|
||||||
assert(c.first.width == c.second.width);
|
assert(c.first.width == c.second.width);
|
||||||
#if 0
|
if (flatten_mode) {
|
||||||
// more conservative approach:
|
// more conservative approach:
|
||||||
// connect internal and external wires
|
// connect internal and external wires
|
||||||
module->connections.push_back(c);
|
module->connections.push_back(c);
|
||||||
#else
|
} else {
|
||||||
// approach that yields nicer outputs:
|
// approach that yields nicer outputs:
|
||||||
// replace internal wires that are connected to external wires
|
// replace internal wires that are connected to external wires
|
||||||
if (w->port_output)
|
if (w->port_output)
|
||||||
port_signal_map.add(c.second, c.first);
|
port_signal_map.add(c.second, c.first);
|
||||||
else
|
else
|
||||||
port_signal_map.add(c.first, c.second);
|
port_signal_map.add(c.first, c.second);
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &it : tpl->cells) {
|
for (auto &it : tpl->cells) {
|
||||||
|
|
Loading…
Reference in a new issue