isp_replace: Verification Report¶
1. Test results¶
Run on 2026-11-19 with GHDL 6.0.0 (mcode), VUnit 5.0.0.dev7, UVVM (commit 4f1e13b), Open Logic 4.8.0-ft.2:
python run.py -p 4, 509 of 509 tests passed (84 of them isp_replace), 0 skipped. QuestaSim Pro Microchip Edition
2024.3 ran the release regression with code coverage on 2026-11-21 on commit b50efd1:
python run.py --questa --coverage -p 1, 669 of 669 tests passed (89 of them isp_replace), 0 skipped; the code
coverage is in docs/coverage.md.
The status-output audit added a probe of Stat_ImageOpen and a read of STATUS while an image is open
(test_input_stream, test_registers) and the exact count of Scrub_EccDed (test_scrub): python run.py -p 4 on
2026-11-20 on commit 399d8b9, 542 of 542 tests passed (84 of them isp_replace), 0 skipped.
The configuration checks of the audit of every module (section 7) came later: python run.py -p 4 on 2026-11-20 on
commit 4cef90a, 601 of 601 tests passed (84 of them isp_replace), 0 skipped; lint/synth_check.py (TC-RPL-12) passed.
The registered read request and the defaults RamRdLatency_g 2 and EccPipeline_g 1 (section 5.1), with the
configurations defaults and defaults_rate and the reset sweep at the read request in test_ecc: python run.py -p 4
on 2026-11-20 on commit f9fad71, 668 of 668 tests passed (89 of them isp_replace), 0 skipped;
lint/synth_check.py (TC-RPL-12) passed.
The code coverage of the release run (docs/coverage.md) found register accesses that no
test made, a write of CTRL with CLEAR 0 and a write of CLEAR without the strobe of byte 0; test_clear makes them
now, and test_registers also reads ID + 2 (section 2):
python run.py -p 2 "*isp_conv_tb*" "*isp_crop_tb*" "*isp_point_tb*" "*isp_replace_tb*" on 2026-11-21 on commit
92a444e, 313 of 313 tests passed (89 of them isp_replace), 0 skipped. QuestaSim ran the 76 changed tests of the four
modules with code coverage on the same commit: 76 of 76 passed (10 of them isp_replace), 0 skipped. The generated test
files of every other test of the release run are identical to those of b50efd1, so their QuestaSim results apply to
92a444e.
| Test | Configurations | Passed |
|---|---|---|
test_static (TC-RPL-01) |
28 (with the sweeps) | 28 |
test_input_stream (TC-RPL-02) |
8 | 8 |
test_map_update (TC-RPL-03) |
8 | 8 |
test_clear (TC-RPL-04) |
1 | 1 |
test_ecc (TC-RPL-05) |
9 | 9 |
test_scrub (TC-RPL-06) |
10 | 10 |
test_registers (TC-RPL-07) |
9 | 9 |
test_flag_coincidence (TC-RPL-08) |
1 | 1 |
test_exhaustive (TC-RPL-09) |
2 | 2 |
test_reset (TC-RPL-10) |
9 | 9 |
test_rate (TC-RPL-11) |
4 | 4 |
TC-RPL-12 (lint/synth_check.py) |
7 configurations synthesise without latches; 13 generics out of range stop the elaboration with a message naming the generic | 20 |
TC-RPL-13 (lint/libero_synth.py) |
2 configurations (section 5) | 2 of 2 synthesised |
| TC-RPL-14 (review) | Section 6 | Passed |
2. Summary¶
Every output pixel of every test equals the reference model, which computes the replacement from the definitions of
the specification with the defect map read as the architecture reads it, with and without gaps of the source and
stalls of the sink; the contract checker of the sink found the output contract in every test. No test relies on the
initial content of the RAM: every test that depends on the map clears it with CTRL.CLEAR or writes it completely
first. The simulation model of the RAM of Open Logic starts with zeros, which are valid codewords of an empty map.
- Replacement: random maps with isolated defects, groups of 2 to 2 x G and longer, groups at both borders of a line
and lines without an operational pixel, with random bits beyond the last pixel of every line, five images per map
in different divisions into packets; every G from 1 to 7; pixels of 1 to 24 bits; images of one line, of one map
word, of 65536 pixels per line and of 65536 lines.
test_exhaustiveran every pair of 4-bit values with every pair of distances (dl, dr) of 1 to 7 for G = 7, the one-sided and the unreplaced pixels of a group of 15 at the right border: 30720 pixels, each equal to the model;exhaustive_p6did the same for every pair of 6-bit values (491520 pixels), a width at which a division constant one bit shorter would fail. - Map lookup: every combination of
RamRdLatency_gandEccPipeline_gwith a line of 33 pixels, whose last word holds one pixel; maps with a partial last word per line (g2,w33) and with whole words (w64). - Map updates: words 0, 1, 2 and the last word written between two images apply to the whole next image; words from
the third after the word of the last accepted pixel on, written during an image, apply in that image;
MAP_ADDRoutside the map (the number of words, 0xFFFFFFFF): a write ofMAP_DATAchanges neither the map norMAP_ADDR, which reads back all 32 bits. CTRL.CLEAR:STATUS.BUSYhigh during the clear;MAP_DATAwithout effect during the clear; a secondCTRL.CLEARdoes not restart it (STATUS.BUSYlow after the end of the first clear and before the end of a restarted one); the next image unchanged; a map written before a reset applies after it; a write ofCTRLwithCLEAR0 and a write ofCLEARwithout the strobe of byte 0 start no clear (STATUS.BUSYlow, the marked pixel of the next image replaced).- ECC: single errors on a data bit, a Hamming parity bit and the overall parity bit (corrected, one
Stat_EccSecper image that uses the word), a double error on two data bits, one of them the mark of a pixel (the word used as read, oneStat_EccDedper image), the sticky flags, a new write that ends the reports; a single error on a word that pixel (0, 0) reads ahead and a reset while word 0 is in use: no report, and one report in the next image. - Scrubber: single and double errors injected with the scrubber off, then the scrubber on without images: one
Scrub_EccSecper corrected word,Scrub_EccDedonce per pass for the double error in the last word of the map (the exact count of the plan, section 5),Scrub_PassDone; an image after it reports only the double error; images with the scrubber running. With the pacer (one tick per clock cycle atClkFreqHz_g1000): 10 passes in 3000 cycles with a period of 300 cycles, no overrun; a period shorter than a pass pulsesScrub_Overrun. Stat_ImageOpenis 1 while an image is open (an image cut after half of its pixels) and 0 after complete images.- Registers: identification, dimensions, parameters, the words of the map,
STATUS.IMAGE_OPENduring an image, the reset values, every single byte strobe onMAP_ADDR, a write ofMAP_DATAwith the strobe of byte 0 only (all 32 bits written), read-only and write-only registers, unused addresses (alsoID+ 2, an address that is not a multiple of 4), every flag ofSTATUSset by its event, kept by a write of 0 and by a write without the strobe of its byte, cleared by a write of 1. Every access was answered with OKAY. - Resets idle, held and running, of one and two cycles, during a line, while the window outputs the virtual columns
of a line, and between two images: the registers return to their reset values, the map stays, the next images are
correct. A reset of one cycle swept over the cycles of the map reads of pixel (0, 0), with the next image right
after it: the next image is correct for every step, also with a read latency of 5. A held reset that drops an
unreplaced pixel waiting in the output register: no
Stat_Unreplacedfor it. - The control and status outputs carry no metavalue after the first reset, no output pixel carries a metavalue, and
Out_Valid, the pulses and the scrubber status are 0 after every reset.
Measured timing (test_rate) and coincidence (test_flag_coincidence), with Lat = RamRdLatency_g + EccPipeline_g:
| Quantity | Bound | Design value | Measured |
|---|---|---|---|
| Hold cycles between the first pixels of two lines (RPL-PF-01) | G; lines 0 and 1: max(G, Lat + 1) | G; lines 0 and 1: Lat + 1 after an idle module, max(G, Lat + 1) after an image | rate_g2, rate_g7, rate_w33 (G = 2, 7, 1; Lat = 1, 3, 5): exactly the design values, G per line; lines 0 and 1: 2, 4, 6 after the idle module and 2, 7, 6 after an image |
| Image period (RPL-PF-02) | H x (W + G) + Lat + 16 | H x (W + G) + max(0, Lat + 1 - G); the first interval after an idle module H x W + (H - 1) x G + Lat + 1 | Exactly the design values: 252 and 252, 129 and 132, 209 and 209 cycles (first interval and the further ones) |
| Latency (RPL-PF-03) | 13 + Lat | 10; up to 12 after a hold; up to 11 + Lat for the first pixels of an image | 10 to 12, 10, 10 to 16 cycles (16 = 11 + Lat for the first pixels of an image with Lat = 5) |
| Clear of a flag in the cycle of its event (RPL-RG-02) | The flag stays set | The event wins | ERR_FRAMING and UNREPLACED: 12 steps each, with the clear before, in and after the cycle of the pulse |
3. Generic ranges¶
| Generic | Declared range | Simulated | Synthesised |
|---|---|---|---|
ImageWidth_g |
2 x MaxGap_g + 1 to 65536 |
3 and 15 (2 x G + 1), 9 to 33 (the gap sweep), 10, 20, 33, 40, 64, 100, 120, 65536 | 3, 15, 2048, 65536; 2 x G and 65537 stop the elaboration |
ImageHeight_g |
1 to 65536 | 1, 2, 3, 4, 5, 6, 40, 256, 4096, 65536 | 1, 1024, 65536; 65537 stops the elaboration |
PixelBits_g |
1 to 24 | 1, 4, 6, 8, 10, 12, 24 | 1, 12, 24; 25 stops the elaboration |
MaxGap_g |
1 to 7 | every value | 1, 2, 7; 0 and 8 stop the elaboration |
RamRdLatency_g |
1 to 3 | every value, crossed with every EccPipeline_g; 2 also as the default of the entity (defaults, defaults_rate) |
1, 2 (the default, rpl_default), 3; 4 stops the elaboration |
EccPipeline_g |
0 to 2 | every value; 1 also as the default of the entity (defaults, defaults_rate) |
0, 1 (the default, rpl_default), 2; 3 stops the elaboration |
RamStyle_g |
values of Open Logic | the default (an attribute for the synthesis tool only) | the default |
ClkFreqHz_g, ScrubPeriod_g |
1000.0 to 2.14748e11 when paced; 0.0, or 0.001 to 1073741.823 s | 150 MHz free running (0.0); 1000 Hz with 300 ms and 5 ms | 150 MHz with 0.0, 1 ms and 1073741.823 s; 1 ms at 1000 Hz and at 2.14748e11 Hz; a negative period, 0.0005 and 1073741.824 s, 999 Hz and 2.14748001e11 Hz stop the elaboration |
4. Mutations¶
Run on 2026-11-19 on commit a1eceec in a worktree of its own (git diff --quiet before and after every mutant), with
14 tests: the 7 of g2 (every test but the flag sweeps), test_static and test_map_update of w33, test_exhaustive of
exhaustive and of exhaustive_p6, test_clear and test_static of clear, and test_static of one_word. Every one
of the 16 mutants of the plan (section 6) fails at least one test, and the tests that fail include those the plan
expects. A mutant that changes several places of the source carries all of them in one run.
A first run on 6431301 kept two mutants alive, both equivalent for the tests of that commit (section 7): the border
mode mirror, which the plan now replaces by the window that carries the mark instead of the operational flag, and the
division constant one bit shorter, which the configuration exhaustive_p6 now kills.
The mutation run was repeated on 2026-11-20 on commit 399d8b9 after the status-output audit (section 7), with the same
14 tests and the three mutants of the audit. Every one of the 19 mutants fails at least one
test. The read-ahead across the image start is no longer killed by test_scrub: that test wrote its double error into a
random word, in g2 word 0, which the mutant reads before the injection; the double error is now in the last word of
the map (plan, section 5). test_map_update, the test the plan names, kills it as before.
The mutation run was repeated on 2026-11-20 on commit f9fad71 for the registered read request and the defaults (section
5.1), with 21 tests: the 14 before, the configuration defaults (test_static, test_registers, test_ecc, test_reset),
and test_rate of defaults_rate, rate_w33 and rate_g2; three mutants concern the registered request. Every one of
the 22 mutants fails at least one test. The registered request kept through a reset is killed only at the defaults
(RamRdLatency_g 2, EccPipeline_g 1), by the reset sweep of test_ecc and by test_reset. The read-ahead one word
shorter is killed by test_rate of rate_w33, whose last word of a line holds a single pixel (architecture, section 5).
The mutation run was repeated on 2026-11-21 on commit 92a444e, the coverage closure (section 1), with the same 21 tests;
the table shows that run. Three mutants came with it, one for each access the closure added: CTRL.CLEAR without the
strobe of byte 0 and a clear started by any write of CTRL, both killed by test_clear, and a read at an address that is
not a multiple of 4 decoded as the register at the aligned address, killed by test_registers (ID + 2). The read-decode
mutant ran alone on the same commit with the same 21 tests; the reference run passed again. Every one of the 25 mutants
fails at least one test.
| Mutation | Result | Failing tests |
|---|---|---|
| None (reference) | passes (21 tests) | |
| The weights of the interpolation swapped (L x dl + R x dr) | killed by 14 of 21 tests | test_clear, test_ecc, test_exhaustive, test_input_stream, test_map_update, test_rate, test_reset, test_scrub, test_static |
| No rounding term | killed by 20 of 21 tests | test_clear, test_ecc, test_exhaustive, test_input_stream, test_map_update, test_rate, test_registers, test_reset, test_scrub, test_static |
| The search one place too far (G + 1) | killed by 21 of 21 tests | test_clear, test_ecc, test_exhaustive, test_input_stream, test_map_update, test_rate, test_registers, test_reset, test_scrub, test_static |
| A place outside the image taken as operational (the window carries the mark instead of the operational flag, so that the zero border reads as operational) | killed by 21 of 21 tests | test_clear, test_ecc, test_exhaustive, test_input_stream, test_map_update, test_rate, test_registers, test_reset, test_scrub, test_static |
| A one-sided replacement from the wrong side | killed by 21 of 21 tests | test_clear, test_ecc, test_exhaustive, test_input_stream, test_map_update, test_rate, test_registers, test_reset, test_scrub, test_static |
| An unreplaced pixel output as 0 and not reported | killed by 21 of 21 tests | test_clear, test_ecc, test_exhaustive, test_input_stream, test_map_update, test_rate, test_registers, test_reset, test_scrub, test_static |
| The division constant one bit shorter (K = PixelBits_g + 7) | killed by 1 of 21 tests | test_exhaustive |
| The read-ahead across the image start (words 0 and 1 read at the end of the image before) | killed by 15 of 21 tests | test_clear, test_map_update, test_rate, test_registers, test_reset, test_static |
| No new word at the first pixel of a line (the word counter not advanced at the end of a line) | killed by 18 of 21 tests | test_clear, test_ecc, test_exhaustive, test_input_stream, test_map_update, test_rate, test_reset, test_scrub, test_static |
| MAP_ADDR cut to the width of the map address | killed by 4 of 21 tests | test_map_update, test_registers |
| MAP_ADDR counted up by a write without effect | killed by 3 of 21 tests | test_clear, test_map_update |
| A CTRL.CLEAR during a clear restarts it | killed by 1 of 21 tests | test_clear |
| CTRL.CLEAR without the strobe of byte 0 | killed by 1 of 21 tests | test_clear |
| A clear started by any write of CTRL | killed by 1 of 21 tests | test_clear |
| A read at an address that is not a multiple of 4 decoded as the register at the aligned address | killed by 2 of 21 tests | test_registers |
| A word with a double error replaced by zeros instead of used as read | killed by 5 of 21 tests | test_ecc, test_registers, test_scrub |
| Stat_Unreplaced pulsed when the pixel enters the output register (not when it leaves the module) | killed by 2 of 21 tests | test_reset |
| No Stat_EccSec pulse with a read | killed by 4 of 21 tests | test_ecc, test_registers |
| The error flags of a word reported when it is read, not when it comes in use | killed by 2 of 21 tests | test_ecc |
| Stat_ImageOpen tied to 0 | killed by 1 of 21 tests | test_input_stream |
| STATUS.IMAGE_OPEN tied to 0 | killed by 2 of 21 tests | test_registers |
| Scrub_EccSec and Scrub_EccDed exchanged | killed by 1 of 21 tests | test_scrub |
| The RAM reads the word after the registered request (address from the read counter) | killed by 21 of 21 tests | test_clear, test_ecc, test_exhaustive, test_input_stream, test_map_update, test_rate, test_registers, test_reset, test_scrub, test_static |
| The registered read request kept through a reset | killed by 2 of 21 tests | test_ecc, test_reset |
| The read-ahead one word shorter (two words in the queue and in flight) | killed by 1 of 21 tests | test_rate |
5. Synthesis and timing¶
TC-RPL-13 (lint/libero_synth.py), the preliminary synthesis on PolarFire MPF100T (Libero, Synplify Pro, speed grade
STD) with a clock of 125 MHz, on commit 4c1744f (the RTL of develop 06a41e5). The results are pre-layout estimates, not
a timing closure and not on the reference device. The out-of-context run at 150 MHz on the Versal device of the
reference systems is open (ISP-GEN-04, roadmap).
| Configuration | Estimate (MHz) | Slack (ns) | 4LUT | DFF | LSRAM | Math | Worst path (logic levels) |
|---|---|---|---|---|---|---|---|
rpl_default: 2048 x 1024 pixels of 12 bits, G = 2, a map of 65536 words (the default) |
133.7 | 0.522 | 7190 | 6643 | 156 | 2 | the map address -> the map RAM (7) |
rpl_g7: 2048 x 1024 pixels of 24 bits, G = 7 |
128.4 | 0.212 | 9526 | 7434 | 156 | 9 | the column position of the frame sync -> its output data (8) |
Both configurations meet 125 MHz in the estimate (section 5.2).
The GHDL synthesis of TC-RPL-12 shows that the module is synthesisable at the bounds of its generics, with the scrubber free running and paced, without latches; the netlist of the default configuration holds the map as a RAM of 65536 words and the divisors as a table of 16 constants. It gives no timing.
5.1 The read path of the defaults¶
The defaults of the read path of the map come from the preliminary synthesis on PolarFire MPF100T (Libero, Synplify Pro) with a clock of 125 MHz, pre-layout estimates, not a timing closure and not on the reference device. Each step moves the worst path, and each of the three changes is needed:
| Read path of the map | rpl_default (MHz) |
Its worst path | rpl_g7 (MHz) |
Its worst path |
|---|---|---|---|---|
RamRdLatency_g 1, EccPipeline_g 0, the request decided and sent in one cycle |
94.1 | RAM -> ECC decode -> queue (10 logic levels) | 109.1 | RAM -> ECC decode -> queue (7) |
EccPipeline_g 1 |
109.4 | RAM -> ECC decode -> output register of the decoder (7) | 113.7 | pixel position -> read address of the RAM (7) |
EccPipeline_g 2 |
105.4 | pixel position -> read address of the RAM (7) | 113.8 | pixel position -> read address of the RAM (6) |
The registered read request, EccPipeline_g 1 |
121.5 | RAM -> ECC decode -> output register of the decoder (6) | 101.8 | RAM -> ECC decode -> output register of the decoder (9) |
The registered read request, EccPipeline_g 1, RamRdLatency_g 2 (the defaults) |
136.5 | register of the map address -> write data of the RAM (7) | 129.8 | the multiplier of the interpolation -> output register (5) |
The registered request moves the RAM address off the path from the pixel position; in rpl_g7 the path through the
ECC decode then limits, mapped with 9 logic levels against 6 in rpl_default, until the LSRAM output register takes
the RAM out of it. The read of a word takes 3 cycles more than in the first row: within a line nothing changes (the
read-ahead of two words), at the image start pixel (0, 0) waits 3 cycles longer (plan, section 5).
5.2 The window of the event decisions in the hierarchy¶
isp_replace contains an isp_window of one line (RP-3). The window with the event decisions per state (report of
isp_window, section 5.1) changed the estimates of rpl_default from 136.5 MHz with 7272 4LUT to 133.7 MHz with 7190
4LUT and of rpl_g7 from 129.8 MHz with 9637 4LUT to 128.4 MHz with 9526 4LUT; the RTL of the module, of its frame
sync and of the map is the same in both. The final tree with the file isp_window.vhd from before that change gives
the values of section 5.1. Reports of 20000 paths of both netlists (lint/libero_synth.py --paths):
| Path | Window before the change | Window with the event decisions per state |
|---|---|---|
rpl_default: the map address -> the data input of the map RAM (bit 21, block 0_1) |
1.218 ns, 6 logic levels (147.4 MHz) | 0.522 ns, 7 logic levels (133.7 MHz), the worst path |
rpl_default: the map address (bit 24) -> the data input of the map RAM (block 0_2) |
0.675 ns, 7 logic levels (136.5 MHz), the worst path | not among the 20000 worst paths |
rpl_g7: the column position of the frame sync -> its output register |
1.167 ns, 8 logic levels (146.3 MHz) | 0.212 ns, 8 logic levels (128.4 MHz), the worst path |
rpl_g7: the multiplier of the interpolation -> the output register |
0.296 ns, 5 logic levels (129.8 MHz), the worst path | 0.296 ns, 5 logic levels |
The paths of rpl_default are the write of MAP_DATA: the compare of the map address with the size of the map, the
selection of the write data of the RAM between the scrubber and the register write, the ECC encoder and the data
input of the RAM. Before the change the selection came through a net of 12 loads and a carry cell with a net of 22
loads; with the change the write enable of the map is one net of 123 loads (1.277 ns), one logic level more.
The path of rpl_g7 decides the image start of the lookup (pixel (0, 0) at the output of the frame sync), from it the
ready to the frame sync, and loads the output register of the frame sync. With the change the image-start term takes
two LUTs in series (0.316 ns more) and the following term drives a net of 3 loads instead of 2 (0.645 ns instead of
0.146 ns): 0.955 ns more arrival over the same 8 logic levels.
No cell of the window lies on these paths, and in the netlist with the changed window no net of them connects to the
window; with the window before the change a net of the image-start term of rpl_g7 also fed the window. The
synthesis optimizes across the boundary of the window (the netlist connects it through nets of logic shared with the
module), and the changed window changed the factoring of the logic around it. No structural change: rpl_default
stays 8.7 MHz and rpl_g7 3.4 MHz above 125 MHz.
6. Requirement coverage¶
| Requirement | Test cases | Status |
|---|---|---|
| RPL-IF-01, RPL-IF-02 | TC-RPL-01 to 11 | Passed |
| RPL-IF-03 | TC-RPL-07 | Passed |
| RPL-IF-04 | TC-RPL-01, 02, 05 | Passed |
| RPL-IF-05 | TC-RPL-05, 06 | Passed |
| RPL-IF-06 | TC-RPL-10 | Passed |
| RPL-FN-01 | TC-RPL-01, 09 and review TC-RPL-14 | Passed |
| RPL-FN-02, RPL-FN-03 | TC-RPL-01, 02 | Passed |
| RPL-FN-04 | TC-RPL-03 | Passed |
| RPL-FN-05 | TC-RPL-01, 04 | Passed |
| RPL-FN-06 | TC-RPL-01 (configurations with and without gaps and stalls) | Passed |
| RPL-FN-07 | TC-RPL-14 (review): the RTL instantiates isp_frame_sync, the map lookup, isp_window (WinX_g = 2 x G + 1, WinY_g = 1, anchor G, border mode zero, pixels of PixelBits_g + 1 bits with the operational flag) and the interpolation |
Passed |
| RPL-PF-01, RPL-PF-02, RPL-PF-03 | TC-RPL-11 | Passed |
| RPL-ER-01 | TC-RPL-02 | Passed |
| RPL-ER-02 | TC-RPL-01, 09 | Passed |
| RPL-ER-03 | TC-RPL-05 | Passed |
| RPL-ER-04 | TC-RPL-03, 04 | Passed |
| RPL-FT-01 | TC-RPL-05, 06 | Passed |
| RPL-FT-02 | TC-RPL-10 and review TC-RPL-14: when others of the lookup leads to Run_s; the reads restart with every pixel (0, 0); a word without a pending read is dropped; a pixel for which no word can come passes as operational until the next image start; the division constant: ceil(2^K / d) for K = PixelBits_g + 8 and d = 2 to 14 has an error below one unit of the quotient for every numerator below 2^(PixelBits_g + 4), since N x (d - 1) < 2^K |
Passed |
| RPL-FT-03 | TC-RPL-10 and the monitor of every test | Passed |
| RPL-RG-01, RPL-RG-03 | TC-RPL-03, 07 | Passed |
| RPL-RG-02 | TC-RPL-07, 08 | Passed |
| RPL-RG-04 | TC-RPL-04 | Passed |
| RPL-CF-01, RPL-CF-02 | TC-RPL-12 | Passed |
| RPL-CF-03 | TC-RPL-13 | Open (section 5) |
7. Findings¶
| Finding | Correction |
|---|---|
The preliminary synthesis at 125 MHz on PolarFire MPF100T found the default configuration at 94.1 MHz: the read data of the map passed the ECC decode into the queue in one cycle (EccPipeline_g 0), and with a pipeline stage the read address, computed from the pixel position in the same cycle, and the RAM output through the decode limited it next |
The read request (address and enable) is registered, and the defaults are RamRdLatency_g 2 and EccPipeline_g 1: 136.5 MHz (section 5.1). The read of a word takes 3 cycles more, which the read-ahead hides within a line; RPL-PF-01 amended (the wait for word 0 RamRdLatency_g + EccPipeline_g + 2); the bench values of test_rate follow; test_ecc resets the module 0 to 6 cycles after pixel (0, 0), in and after the cycles of the registered request, and no word read ahead reports (RPL-IF-04) |
| The derivation of the plan expected G + Lat + 1 hold cycles between the first pixels of lines 0 and 1 and an image period of H x (W + G) + Lat + 1. The rate test measured less (for example 7 instead of 11 holds and 132 instead of 136 cycles with G = 7 and Lat = 3). A trace of the handshakes showed the cause: after an image, the wait for word 0 of the next image runs beside the G virtual columns of the last line of the image before, which the buffers between the input and the window move into the next image; after an idle module the wait stands alone. The RTL is right | The specification (RPL-PF-01), the architecture and the plan state the exact values: Lat + 1 holds after an idle module, max(G, Lat + 1) after an image; the period H x (W + G) + max(0, Lat + 1 - G), the first interval after an idle module H x W + (H - 1) x G + Lat + 1. The bench checks these values exactly |
Stat_Unreplaced pulsed when an unreplaced pixel entered the output register. A reset that drops pixels in the pipeline made the count depend on the stage the dropped pixel had reached; the count of test_reset differed from the model by one in two configurations |
Stat_Unreplaced pulses in the cycle after the pixel left the output, so a pixel lost by a reset reports nothing (RPL-IF-04); the model counts the delivered pixels |
The first runs stopped in every test of g2 with a range error of the counter of pending reads, which ran below 0. The first explanation, a read issued during the reset that returned after it, was wrong: every read-valid stage of olo_ft_ram_sdp_scrub clears with the reset. A trace of every event of the read valid showed the cause: when a read of the scrubber returns, the read valid rises to '1' and falls back to '0' within the same simulation time (the mask of the scrubber reads takes effect one delta cycle later), and the combinational process of the lookup saw the '1' in that delta cycle with no read pending. At every clock edge the read valid is '0', so the glitch never reached a register; the RTL is right |
The guard that drops a word with no read pending stays, as the defence against an upset of the counter (RPL-FT-02) that it is; it also keeps the counter in its range in the delta cycle of the glitch. test_reset sweeps a reset of one cycle over the cycles of the map reads of pixel (0, 0); with a read latency of 5 the reset met a read in four steps, with 0, 1 and 2 reads under way, and the next image was correct every time |
The flag sweeps ran first in g2, with gaps of the source and stalls of the sink; the pulse moved by more than one cycle per step and missed the coincidence |
The sweeps run in the configuration flags without gaps and stalls |
| The plan asked for a scrub period of 2 µs; the pacer of Open Logic has a granularity of 1 ms | The bench sets ClkFreqHz_g to 1000, so that a millisecond of the pacer is one clock cycle, with periods of 300 and 5 ms |
| The plan listed the mutant "the map lookup takes the uncorrected word"; Open Logic delivers only the corrected word, so the mutant cannot be written in the module | Replaced by "a word with a double error replaced by zeros instead of used as read" (E6), and the mutant of the E1 rule added |
| A model that rebuilt the line for every pixel took minutes for 65536 pixels per line | The model looks only at the places up to the pixel G to the right, which have all arrived |
test_reset placed its running reset at random. In a running reset the sink takes a random number of the dropped beats before the reset, so a dropped unreplaced pixel could leave the module and report: the count of Stat_Unreplaced differed from the model by one in two configurations |
The running reset is placed where no dropped pixel is unreplaced; the held resets need no such care, since no dropped beat leaves the module |
| The first mutation run (6431301) kept the mutant of the border mode mirror alive. It is equivalent: a place outside the image then reaches only a pixel that the search on the other side finds nearer, and the interpolation of a pixel with itself is that pixel; the border mode replicate is equivalent as well | The mutant of a place outside taken as operational is the window that carries the mark instead of the operational flag, so that the zero border reads as operational |
| The first mutation run also kept the division constant one bit shorter alive: with 4-bit pixels it gives the right quotient for every reachable numerator. A model of the division over every width from 1 to 24 bits shows that K = P + 8 is exact and that K = P + 7 fails only at 5, 6, 9, 17, 18 and 21 bits (for d = 13, values near the top) | The configuration exhaustive_p6 runs every pair of 6-bit values with every pair of distances |
The audit of the status outputs of every module (after the mutation run of isp_filter2d) found three gaps in this bench: Stat_ImageOpen probed only after complete images, where it is 0; STATUS.IMAGE_OPEN never read as 1; Scrub_EccDed checked only as at least one pulse, not against the count of the design |
test_input_stream probes Stat_ImageOpen while an image is open; test_registers reads STATUS while an image is open; test_scrub checks Scrub_EccDed exactly, one pulse per pass for the word with the double error, which is now the last word of the map, and the bench switches the scrubber off only at the end of a pass (derivation in the plan, section 5). The mutants Stat_ImageOpen tied to 0, STATUS.IMAGE_OPEN tied to 0 and the exchange of Scrub_EccSec and Scrub_EccDed are killed (section 4). No change of the RTL |
The audit of the configuration checks found the ranges of ClkFreqHz_g and ScrubPeriod_g stated as "range of Open Logic" and unchecked in the module: the scrubber of Open Logic checks 1000.0 Hz and 1 ms with messages that name its own generics, treats a negative period as free running, and the divider of the period fails above 2^30 - 1 ms with an integer overflow in log2ceil (Open Logic states 2^31 - 1 ms) |
The specification states the ranges (the period rounded to whole milliseconds), the module checks both and passes the scrubber in-range values only; negatives for a negative, a too short and a too long period and a too low and a too high clock, and the bounds synthesised (TC-RPL-12). The bench is unchanged |
The code coverage of the release run showed that no test wrote CTRL with CLEAR 0 or CLEAR without the strobe of byte 0 |
test_clear writes both and observes a marked pixel of the next image, test_registers also reads ID + 2; the three new mutants are killed (section 4). No change of the RTL |