3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-06 17:44:09 +00:00

Use defaultvalue for init values of input ports

This commit is contained in:
Miodrag Milanovic 2023-06-21 13:21:34 +02:00
parent 941fa70ce1
commit aff0065646

View file

@ -2005,7 +2005,10 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
initval[i] = State::Sx;
}
if (initval.is_fully_undef())
if (wire->port_input) {
wire->attributes[ID::defaultvalue] = Const(initval);
wire->attributes.erase(ID::init);
} else if (initval.is_fully_undef())
wire->attributes.erase(ID::init);
}
}