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 /nexus/arch.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 'nexus/arch.cc')
-rw-r--r-- | nexus/arch.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nexus/arch.cc b/nexus/arch.cc index 9679c3fb..b2ae22ce 100644 --- a/nexus/arch.cc +++ b/nexus/arch.cc @@ -125,12 +125,12 @@ Arch::Arch(ArchArgs args) : args(args) } for (int i = 0; i < chip_info->width; i++) { - IdString x_id = id(stringf("X%d", i)); + IdString x_id = idf("X%d", i); x_ids.push_back(x_id); id_to_x[x_id] = i; } for (int i = 0; i < chip_info->height; i++) { - IdString y_id = id(stringf("Y%d", i)); + IdString y_id = idf("Y%d", i); y_ids.push_back(y_id); id_to_y[y_id] = i; } @@ -377,7 +377,7 @@ IdStringList Arch::getPipName(PipId pip) const { NPNR_ASSERT(pip != PipId()); std::array<IdString, 5> ids{x_ids.at(pip.tile % chip_info->width), y_ids.at(pip.tile / chip_info->width), - id(stringf("%d", pip.index)), IdString(loc_data(pip).wires[pip_data(pip).to_wire].name), + idf("%d", pip.index), IdString(loc_data(pip).wires[pip_data(pip).to_wire].name), IdString(loc_data(pip).wires[pip_data(pip).from_wire].name)}; return IdStringList(ids); } @@ -784,7 +784,7 @@ bool Arch::route() CellPinMux Arch::get_cell_pinmux(const CellInfo *cell, IdString pin) const { - IdString param = id(stringf("%sMUX", pin.c_str(this))); + IdString param = idf("%sMUX", pin.c_str(this)); auto fnd_param = cell->params.find(param); if (fnd_param == cell->params.end()) return PINMUX_SIG; @@ -805,7 +805,7 @@ CellPinMux Arch::get_cell_pinmux(const CellInfo *cell, IdString pin) const void Arch::set_cell_pinmux(CellInfo *cell, IdString pin, CellPinMux state) { - IdString param = id(stringf("%sMUX", pin.c_str(this))); + IdString param = idf("%sMUX", pin.c_str(this)); switch (state) { case PINMUX_SIG: cell->params.erase(param); |