diff options
| author | myrtle <gatecat@ds0.me> | 2022-08-10 11:25:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-10 11:25:34 +0100 |
| commit | 66722096edaff35f1620ebfc9acaab13ae149377 (patch) | |
| tree | 8b189e44b65afabfaddb3402ab8aac544df9ba83 /mistral/pack.cc | |
| parent | 06ce27ed38279cfa3455e248ea2b2c773cdf6324 (diff) | |
| parent | 77c82b0fbf15892b0c8222bac89564f3f024493e (diff) | |
| download | nextpnr-66722096edaff35f1620ebfc9acaab13ae149377.tar.gz nextpnr-66722096edaff35f1620ebfc9acaab13ae149377.tar.bz2 nextpnr-66722096edaff35f1620ebfc9acaab13ae149377.zip | |
Merge pull request #1010 from YosysHQ/gatecat/idf
refactor: id(stringf(...)) to new idf(...) helper
Diffstat (limited to 'mistral/pack.cc')
| -rw-r--r-- | mistral/pack.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mistral/pack.cc b/mistral/pack.cc index 27ad3c92..709479a2 100644 --- a/mistral/pack.cc +++ b/mistral/pack.cc @@ -417,10 +417,8 @@ struct MistralPacker bit_offset = 1; } for (int bit = bit_offset; bit < abits; bit++) { - ci->pin_data[ctx->id(stringf("A1ADDR[%d]", bit))].bel_pins = { - ctx->id(stringf("ADDRA[%d]", bit + addr_offset))}; - ci->pin_data[ctx->id(stringf("B1ADDR[%d]", bit))].bel_pins = { - ctx->id(stringf("ADDRB[%d]", bit + addr_offset))}; + ci->pin_data[ctx->idf("A1ADDR[%d]", bit)].bel_pins = {ctx->idf("ADDRA[%d]", bit + addr_offset)}; + ci->pin_data[ctx->idf("B1ADDR[%d]", bit)].bel_pins = {ctx->idf("ADDRB[%d]", bit + addr_offset)}; } // Data lines @@ -451,13 +449,12 @@ struct MistralPacker } for (int bit = 0; bit < dbits; bit++) { for (int offset : offsets) { - ci->pin_data[ctx->id(stringf("A1DATA[%d]", bit))].bel_pins.push_back( - ctx->id(stringf("DATAAIN[%d]", bit + offset))); + ci->pin_data[ctx->idf("A1DATA[%d]", bit)].bel_pins.push_back(ctx->idf("DATAAIN[%d]", bit + offset)); } } for (int bit = 0; bit < dbits; bit++) { - ci->pin_data[ctx->id(stringf("B1DATA[%d]", bit))].bel_pins = {ctx->id(stringf("DATABOUT[%d]", bit))}; + ci->pin_data[ctx->idf("B1DATA[%d]", bit)].bel_pins = {ctx->idf("DATABOUT[%d]", bit)}; } } } |
