test(renode): model DBGMCU IDCODE — exercise 480 MHz/VOS0 + both revisions - #62
Merged
Conversation
…both revisions
Renode could only ever run the 400 MHz/VOS1 clock path: clocks::init reads
DBGMCU_IDCODE (0x5C00_1000) to gate 480 MHz/VOS0 on silicon rev V, but nothing
modelled that address, so the read returned 0 → DEV_ID mismatch → always 400.
The whole 480/VOS0 code path (iterative PLL1 to sys_ck 480, the overdrive
VOSRDY/ODEN handshake) was untested in sim.
- Model DBGMCU IDCODE as a small writable memory in daisy_seed.repl. A test
plants a rev-Y or rev-V IDCODE before boot; default 0 → the 400 path, so every
existing test is unaffected.
- clocks_boot.robot: two new cases.
* Rev V (REV_ID 0x2003) → the bootloader lands sys_ck = 480 MHz via PLL1P,
while PLL2R (FMC, 200 MHz) and PLL3P (SAI) stay put, and the CoreClocks
hand-off guard = 0x1C9C3800 (480 MHz). Proves the existing RCC/PWR/SYSCFG
models already handle 480/VOS0 — no model changes were needed, just the
IDCODE — and that VOS0 overdrive doesn't hang.
* Rev Y (REV_ID 0x1003) → stays at 400 MHz, proving the REV_ID check (not just
DEV_ID) gates the path; forcing VOS0 on rev Y would hang overdrive on silicon.
Both revisions now have sim coverage. (This validates the 480 code path executes
correctly — right dividers, no VOSRDY hang, no VCO-config panic; the electrical
reality of overdrive stays a hardware-only claim, already validated on rev V.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renode could only ever run the 400 MHz / VOS1 clock path.
clocks::initreadsDBGMCU_IDCODE(0x5C00_1000) to gate 480 MHz / VOS0 on silicon rev V — but nothing modelled that address, so the read returned0→DEV_IDmismatch → always 400. The entire 480/VOS0 code path (iterative PLL1 →sys_ck480, the overdriveVOSRDY/ODENhandshake) was untested in sim.What's here
DBGMCU_IDCODEas a small writable memory indaisy_seed.repl. A test plants a rev-Y or rev-V IDCODE before boot; default0→ the 400 path, so every existing test is unaffected.clocks_boot.robot: two new cases (the suite is already in CI):REV_ID 0x2003,DEV_ID 0x450) → the bootloader landssys_ck = 480 MHzvia PLL1P, while PLL2R (FMC, 200 MHz) and PLL3P (SAI) stay put, and theCoreClockshand-off guard =0x1C9C3800(480 MHz).REV_ID 0x1003) → stays at 400 MHz, proving theREV_IDcheck (not justDEV_ID) gates the path.Key finding
The existing RCC / PWR / SYSCFG models already handle 480/VOS0 — no model changes were needed, only the IDCODE. The RCC model computes
sys_ckgenerically from the PLL registers (no hardcoded 400, no VCO clamp), PWR forcesVOSRDY, and SYSCFG handlesODEN. The test confirms VOS0 overdrive doesn't hang and PLL2/PLL3 kernels are unperturbed by PLL1's overdrive VCO.Scope / caveat
This validates that the 480 code path executes correctly in sim (right dividers, no
VOSRDYhang, no VCO-config panic — theIterative-strategy/LTO landmine would be caught here). The electrical reality of overdrive at 480 stays a hardware-only claim (already validated on rev V).Test
🤖 Generated with Claude Code