Commit e9c0381
committed
tests(load_queue): model L0 cache fast-path in constrained-random
The load_queue constrained-random test could fail deterministically under
Verilator (e.g. seed 1772249751) with a DUT/model count mismatch.
Root cause:
- DUT can complete a load via L0 cache fast-path without issuing a memory read.
- The Python LQ model in constrained-random only modeled the mem-read issue
path, so model state lagged DUT when cache-hit completion occurred.
Fix:
- Add `cache_hit_complete()` to `LQModel` to mirror DUT cache-hit behavior.
- Update `test_constrained_random` to call model cache-hit completion when
DUT `cache_hit_fast_path` is asserted, otherwise use normal mem-issue path.
Result:
- Reproduced failing seed now passes.
- Full `load_queue` cocotb suite passes for the same command/seed.1 parent ee25bbf commit e9c0381
File tree
2 files changed
+23
-1
lines changed- verif/cocotb_tests/tomasulo/load_queue
2 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
245 | 265 | | |
246 | 266 | | |
247 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
688 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
689 | 691 | | |
690 | 692 | | |
691 | 693 | | |
| |||
0 commit comments