Merge pull request #3811 from YosysHQ/micko/defaultvalue

Use defaultvalue for init values of input ports
This commit is contained in:
Miodrag Milanović 2023-06-22 09:39:45 +02:00 committed by GitHub
commit f9257d3192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

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);
}
}