aboutsummaryrefslogtreecommitdiffstats
path: root/nexus/arch.cc
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-04 14:47:45 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-04 16:38:07 -0800
commitc99fbde0eb0b1b9b725ba2fead13d3210ce961a7 (patch)
tree35a86b414b97eab928a84da677628dd8cb1832dc /nexus/arch.cc
parent40d026e6fc5ab94c732682c62a6803bd3140953e (diff)
downloadnextpnr-c99fbde0eb0b1b9b725ba2fead13d3210ce961a7.tar.gz
nextpnr-c99fbde0eb0b1b9b725ba2fead13d3210ce961a7.tar.bz2
nextpnr-c99fbde0eb0b1b9b725ba2fead13d3210ce961a7.zip
Mark IdString and IdStringList single argument constructors explicit.
Single argument constructors will silently convert to that type. This is typically not the right thing to do. For example, the nexus and ice40 arch_pybindings.h files were incorrectly parsing bel name strings, etc. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'nexus/arch.cc')
-rw-r--r--nexus/arch.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/nexus/arch.cc b/nexus/arch.cc
index 267795dd..93fc1d82 100644
--- a/nexus/arch.cc
+++ b/nexus/arch.cc
@@ -373,8 +373,8 @@ std::vector<std::pair<IdString, std::string>> Arch::getPipAttrs(PipId pip) const
ret.emplace_back(id("GRID_X"), stringf("%d", pip.tile % chip_info->width));
ret.emplace_back(id("GRID_Y"), stringf("%d", pip.tile / chip_info->width));
- ret.emplace_back(id("FROM_TILE_WIRE"), nameOf(loc_data(pip).wires[pip_data(pip).from_wire].name));
- ret.emplace_back(id("TO_TILE_WIRE"), nameOf(loc_data(pip).wires[pip_data(pip).to_wire].name));
+ ret.emplace_back(id("FROM_TILE_WIRE"), nameOf(IdString(loc_data(pip).wires[pip_data(pip).from_wire].name)));
+ ret.emplace_back(id("TO_TILE_WIRE"), nameOf(IdString(loc_data(pip).wires[pip_data(pip).to_wire].name)));
return ret;
}
@@ -936,7 +936,7 @@ void Arch::lookup_cell_clock_out(int type_idx, IdString to_port, IdString &clock
ct.prop_delays.get(), ct.prop_delays.size(), [](const CellPropDelayPOD &pd) { return pd.to_port; },
to_port.index);
NPNR_ASSERT(dly_idx != -1);
- clock = ct.prop_delays[dly_idx].from_port;
+ clock = IdString(ct.prop_delays[dly_idx].from_port);
delay.min_delay = ct.prop_delays[dly_idx].min_delay;
delay.max_delay = ct.prop_delays[dly_idx].max_delay;
}