Skip to content

[sw-sysemu] Model MRAM power-on SW visible effects - #122

Draft
AFOliveira wants to merge 4 commits into
aifoundry-org:masterfrom
AFOliveira:feat/erbium-mram-dsleep
Draft

AFOliveira wants to merge 4 commits into
aifoundry-org:masterfrom
AFOliveira:feat/erbium-mram-dsleep

Conversation

@AFOliveira

Copy link
Copy Markdown
Member

Replace the mram_registers DenseRegion with a MramBridgeEr device that
models bridge_status_reg (mram_ready from live dsleep state query),
slverr_status_reg (clear-on-read sticky bits), and arbiter_mode_reg.

MRAM now starts in deep sleep (mram_dsleep_en=1 in PowerDomainReq),
matching hardware reset state. Accesses to MRAM while asleep set the
slverr sticky bits (mram_not_ready + mram_unpowered) and fault.
Software clears mram_dsleep_en to wake MRAM — bridge_status_reg.mram_ready
then immediately reads 0xF.

Test boot.S updated to clear mram_dsleep_en before jumping to MRAM.

I've set this as a draft PR as we need #119 to be sent first, so we can bring up MRAM behavior in that flow, so users can rely on that flag to be behaviourly similar to Boot ROM.

@AFOliveira
AFOliveira requested review from glguida and vidas and removed request for glguida April 1, 2026 15:37
Model bridge_status_reg (mram_ready from dsleep state),
slverr_status_reg (clear-on-read sticky bits), and
arbiter_mode_reg with proper register semantics.
MRAM starts unpowered. The mram_dsleep_en register bit resets to 0
(matching TRM) but MRAM only powers on when software first writes
to PowerDomainReq with mram_dsleep_en=0. From that point on,
writing 1 puts MRAM back to sleep and 0 wakes it.

Accesses to MRAM while asleep set the slverr sticky bits
(mram_not_ready + mram_unpowered) and raise an access fault.
Clear mram_dsleep_en in PowerDomainReq before jumping to MRAM.
mram_dsleep_fault: load from MRAM while asleep triggers access fault
mram_dsleep_wake: sleep/wake cycle, verify bridge_status and MRAM access
@AFOliveira
AFOliveira force-pushed the feat/erbium-mram-dsleep branch from a394607 to f8221ca Compare April 3, 2026 08:55
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