3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-20 12:53:39 +00:00

Transform all "\\*" identifiers into ID()

This commit is contained in:
Eddie Hung 2019-08-15 10:19:29 -07:00
parent 9f98241010
commit 78ba8b8574
25 changed files with 782 additions and 782 deletions

View file

@ -99,8 +99,8 @@ struct DffinitPass : public Pass {
pool<SigBit> used_bits;
for (auto wire : module->selected_wires()) {
if (wire->attributes.count("\\init")) {
Const value = wire->attributes.at("\\init");
if (wire->attributes.count(ID(\\init))) {
Const value = wire->attributes.at(ID(\\init));
for (int i = 0; i < min(GetSize(value), GetSize(wire)); i++)
if (value[i] != State::Sx)
init_bits[sigmap(SigBit(wire, i))] = value[i];
@ -161,8 +161,8 @@ struct DffinitPass : public Pass {
}
for (auto wire : module->selected_wires())
if (wire->attributes.count("\\init")) {
Const &value = wire->attributes.at("\\init");
if (wire->attributes.count(ID(\\init))) {
Const &value = wire->attributes.at(ID(\\init));
bool do_cleanup = true;
for (int i = 0; i < min(GetSize(value), GetSize(wire)); i++) {
SigBit bit = sigmap(SigBit(wire, i));
@ -173,7 +173,7 @@ struct DffinitPass : public Pass {
}
if (do_cleanup) {
log("Removing init attribute from wire %s.%s.\n", log_id(module), log_id(wire));
wire->attributes.erase("\\init");
wire->attributes.erase(ID(\\init));
}
}
}