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:
parent
941fa70ce1
commit
aff0065646
|
@ -2005,7 +2005,10 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
|
||||||
initval[i] = State::Sx;
|
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);
|
wire->attributes.erase(ID::init);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue