Skip to content

fix(ittage): bound reset ready wait - #199

Open
FU-max-boop wants to merge 1 commit into
XS-MLVP:mainfrom
FU-max-boop:fix/ittage-reset-timeout
Open

fix(ittage): bound reset ready wait#199
FU-max-boop wants to merge 1 commit into
XS-MLVP:mainfrom
FU-max-boop:fix/ittage-reset-timeout

Conversation

@FU-max-boop

Copy link
Copy Markdown

Summary

  • bound ITTageWrapper.reset() while it waits for io_s1_ready
  • expose a configurable 1024-cycle default budget and reject invalid budgets before clocking the DUT
  • preserve the existing successful reset sequence and final 10-cycle settling period
  • add focused hardware-free tests for immediate readiness, the last allowed cycle, exact timeout behavior, invalid budgets, and constructor forwarding

Problem

ITTageWrapper.reset() deasserted reset and then waited indefinitely for io_s1_ready. If the generated DUT never became ready because of an RTL, build, or configuration problem, the test process could hang without a useful failure.

Implementation

  • Count post-deassertion wait cycles and raise TimeoutError with the elapsed count and last observed ready value when the budget is exhausted.
  • Accept readiness on the final allowed cycle.
  • Keep reset_async() unchanged.
  • Move the generated DUTITTage import behind TYPE_CHECKING, allowing the reset control path to be tested without a generated DUT.

The current generated RTL clears five 128-entry tables in parallel and was observed ready 130 cycles after reset deassertion. The configurable 1024-cycle default provides headroom, but is a defensive operational limit rather than a formal protocol bound.

Validation

python -m pytest -p no:cacheprovider -q \
  ut_frontend/bpu/ittage/test/test_reset_timeout.py
  • fresh Python 3.12 run: 6 passed
  • previous exact-branch generated-DUT ITTAGE run: 11 passed; ready observed after 130 cycles
  • git diff --check: passed

Scope boundary

  • Production changes affect only the synchronous Python wrapper reset path.
  • No RTL or predictor behavior changes.
  • The six new tests use a fake DUT and validate timeout/control-flow boundaries, not RTL behavior.

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