Skip to content

test(decode): verify backpressure and complex drain - #195

Open
FU-max-boop wants to merge 1 commit into
XS-MLVP:mainfrom
FU-max-boop:test/decode-backpressure-drain
Open

FU-max-boop wants to merge 1 commit into
XS-MLVP:mainfrom
FU-max-boop:test/decode-backpressure-drain

Conversation

@FU-max-boop

@FU-max-boop FU-max-boop commented Aug 31, 2026 •

Copy link
Copy Markdown

Summary

  • Sample DecodeStage ready/valid handshakes before the clock edge and advance each input lane only when it is accepted.
  • Drain complex multi-uop instructions through lastUop, with timeout, duplicate, causality, and overflow checks plus per-cycle statistics.
  • Add deterministic all-lane backpressure, complex-drain, and illegal-instruction tests, and document the uniform-ready contract and disassembly-oracle boundary.

Why

The previous runner advanced from post-edge ready, consumed valid-only outputs, stopped after all inputs were accepted, and then stepped ten unchecked cycles. That could double-count stalled outputs, miss tail uops, and report false passes. The broad Decode Bundle binding also caused lane-write aliasing with current Picker/Toffee.

Validation

  • Current dependency heads: PyToffee f57dd6ff, toffee-test abec0edd: 6 passed with functional coverage enabled.
  • Compatible dependency commits: PyToffee f215fa1, toffee-test 4ca2605: 6 passed.
  • python3 -m py_compile ut_backend/ctrl_block/decode/env/decode_wrapper.py ut_backend/ctrl_block/decode/test_rv_decode.py
  • git diff --check

Test command:

python3 run.py --config "" --no-waveform --no-code-cov -- -q ut_backend/ctrl_block/decode

Validated with the native ARM64 Picker 0.9.0 release against XiangShan RTL commit 66e9b546.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant