mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-08 10:25:19 +00:00
Move \init from source wire to submod if output port
This commit is contained in:
parent
dd317c9280
commit
0d7ba77426
|
@ -162,6 +162,13 @@ struct SubmodWorker
|
|||
new_wire->port_input = new_wire_port_input;
|
||||
new_wire->port_output = new_wire_port_output;
|
||||
new_wire->attributes = wire->attributes;
|
||||
if (new_wire->port_output) {
|
||||
auto it = wire->attributes.find(ID(init));
|
||||
if (it != wire->attributes.end()) {
|
||||
new_wire->attributes[ID(init)] = it->second[bit.offset];
|
||||
it->second[bit.offset] = State::Sx;
|
||||
}
|
||||
}
|
||||
|
||||
if (new_wire->port_input && new_wire->port_output)
|
||||
log(" signal %s: inout %s\n", wire->name.c_str(), new_wire->name.c_str());
|
||||
|
|
Loading…
Reference in a new issue