aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/delay.cc
diff options
context:
space:
mode:
authorD. Shah <dave@ds0.me>2021-01-27 18:34:41 +0000
committerD. Shah <dave@ds0.me>2021-01-27 18:35:49 +0000
commitc10238de8c6087282ff1d6092929585277cbd17c (patch)
tree0134a98527433c3aef4b626661466656f70678ea /ice40/delay.cc
parente049d5f2fc126a7157d0c33a36f094332da7bace (diff)
downloadnextpnr-c10238de8c6087282ff1d6092929585277cbd17c.tar.gz
nextpnr-c10238de8c6087282ff1d6092929585277cbd17c.tar.bz2
nextpnr-c10238de8c6087282ff1d6092929585277cbd17c.zip
ice40: Switch from RelPtr to RelSlice
This replaces RelPtrs and a separate length field with a Rust-style slice containing both a pointer and a length; with bounds checking always enforced. Thus iterating over these structures is both cleaner and safer. Signed-off-by: D. Shah <dave@ds0.me>
Diffstat (limited to 'ice40/delay.cc')
-rw-r--r--ice40/delay.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ice40/delay.cc b/ice40/delay.cc
index 2c78b84f..40dcff16 100644
--- a/ice40/delay.cc
+++ b/ice40/delay.cc
@@ -29,7 +29,7 @@ void ice40DelayFuzzerMain(Context *ctx)
{
std::vector<WireId> srcWires, dstWires;
- for (int i = 0; i < ctx->chip_info->num_wires; i++) {
+ for (int i = 0; i < int(ctx->chip_info->wire_data.size()); i++) {
WireId wire;
wire.index = i;