diff options
author | D. Shah <dave@ds0.me> | 2021-01-27 18:34:41 +0000 |
---|---|---|
committer | D. Shah <dave@ds0.me> | 2021-01-27 18:35:49 +0000 |
commit | c10238de8c6087282ff1d6092929585277cbd17c (patch) | |
tree | 0134a98527433c3aef4b626661466656f70678ea /ice40/delay.cc | |
parent | e049d5f2fc126a7157d0c33a36f094332da7bace (diff) | |
download | nextpnr-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.cc | 2 |
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; |