mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-21 21:33:40 +00:00
rtlil: represent Const strings as std::string
This commit is contained in:
parent
61ed9b6263
commit
785bd44da7
90 changed files with 947 additions and 643 deletions
|
@ -53,11 +53,11 @@ void proc_init(RTLIL::Module *mod, SigMap &sigmap, RTLIL::Process *proc)
|
|||
Const value = valuesig.as_const();
|
||||
Const &wireinit = lhs_c.wire->attributes[ID::init];
|
||||
|
||||
while (GetSize(wireinit.bits) < lhs_c.wire->width)
|
||||
wireinit.bits.push_back(State::Sx);
|
||||
while (GetSize(wireinit) < lhs_c.wire->width)
|
||||
wireinit.bits().push_back(State::Sx);
|
||||
|
||||
for (int i = 0; i < lhs_c.width; i++) {
|
||||
auto &initbit = wireinit.bits[i + lhs_c.offset];
|
||||
auto &initbit = wireinit.bits()[i + lhs_c.offset];
|
||||
if (initbit != State::Sx && initbit != value[i])
|
||||
log_cmd_error("Conflicting initialization values for %s.\n", log_signal(lhs_c));
|
||||
initbit = value[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue