Skip to content

debug_rom: regenerate for v1.0 GoingAddr/ResumingAddr/ExceptionAddr offsets#1

Open
jahanzebkhalid-10Xe wants to merge 1 commit into
features/riscv-debug-updatefrom
local-fix-104-goingaddr-rom
Open

debug_rom: regenerate for v1.0 GoingAddr/ResumingAddr/ExceptionAddr offsets#1
jahanzebkhalid-10Xe wants to merge 1 commit into
features/riscv-debug-updatefrom
local-fix-104-goingaddr-rom

Conversation

@jahanzebkhalid-10Xe

Copy link
Copy Markdown
Collaborator

Summary

Fixes 10x-Engineers/riscv-dbg-vip#104.

17e912c ("Updated 1.0 debug module") moved dm_mem.sv's flag-write
addresses to the v1.0 spec layout:

GoingAddr:     0x108 -> 0x104
ResumingAddr:  0x110 -> 0x108
ExceptionAddr: 0x118 -> 0x10C

but debug_rom.S was never updated to match, so the hart's debug-mode code
kept writing "going" to the old 0x108 offset — an address dm_mem.sv's
FSM no longer watches. going never asserted, and the abstract-command FSM
parked in Go forever (abstractcs.busy stuck at 1, confirmed by waveform
in the linked issue).

Fix

Updated the GOING/RESUMING/EXCEPTION defines in debug_rom.S to match
and regenerated debug_rom.sv/debug_rom_one_scratch.sv (+ .h) via
make -C debug_rom (riscv64-unknown-elf-gcc 15.2.0). Diff is minimal and
exactly localized to the changed store-immediate encodings.

Verification (real Questa, CVA6, via riscv-dbg-vip's pydebug suite)

Full evidence and waveform analysis: 10x-Engineers/riscv-dbg-vip#104
(see comments).

🤖 Generated with Claude Code

…ffsets

Fixes pulp-platform#104 (riscv-dbg-vip). 17e912c ("Updated 1.0 debug module") moved
dm_mem.sv's flag-write addresses to the v1.0 spec layout:

  GoingAddr:     0x108 -> 0x104
  ResumingAddr:  0x110 -> 0x108
  ExceptionAddr: 0x118 -> 0x10C

but debug_rom.S was never updated to match, so the hart's debug-mode code
kept writing "going" to the old 0x108 offset -- an address dm_mem.sv's FSM
no longer watches. going never asserted, and the abstract-command FSM
parked in Go forever (abstractcs.busy stuck at 1).

Updated the GOING/RESUMING/EXCEPTION defines in debug_rom.S to match, and
regenerated debug_rom.sv/debug_rom_one_scratch.sv (+ .h) via
`make -C debug_rom` (riscv64-unknown-elf-gcc 15.2.0). Diff is minimal and
exactly localized to the changed store-immediate encodings, nothing else.

Verified against real Questa CVA6 sim (riscv-dbg-vip's pydebug suite):
halt_uvm 8/8 (was stuck at step 04, "Read PC"), csr_access_uvm 4/4,
gpr_write_uvm 4/4 -- all previously timed out on the first abstract
command. One new, separate, unrelated finding surfaced now that the
Program Buffer path is reachable for the first time (progbuf0/1
write/read-back returns 0) -- filed as riscv-dbg-vip#121, not touched here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tufailrizvi-debug

tufailrizvi-debug commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

It has some issues so i have added the one I fixed. You can use the updated version Thanks.

@jahanzebkhalid-10Xe

Copy link
Copy Markdown
Collaborator Author

It has some issues so i have added the one I fixed. You use the updated version Thanks.

I don't see anything recently updated

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.

2 participants