3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Minor fixes in handling of "init" attribute

This commit is contained in:
Clifford Wolf 2015-04-09 15:12:26 +02:00
parent 229825e1b8
commit d176e613c2
2 changed files with 12 additions and 7 deletions

View file

@ -244,6 +244,7 @@ struct ProcArstPass : public Pass {
}
extra_args(args, argidx, design);
pool<Wire*> delete_initattr_wires;
for (auto mod : design->modules())
if (design->selected(mod)) {
@ -265,6 +266,7 @@ struct ProcArstPass : public Pass {
value.extend_u0(chunk.wire->width, false);
arst_sig.append(chunk);
arst_val.append(value.extract(chunk.offset, chunk.width));
delete_initattr_wires.insert(chunk.wire);
}
if (arst_sig.size()) {
log("Added global reset to process %s: %s <- %s\n",
@ -281,6 +283,9 @@ struct ProcArstPass : public Pass {
}
}
}
for (auto wire : delete_initattr_wires)
wire->attributes.erase("\\init");
}
} ProcArstPass;