Skip to content

Debug module disable - #802

Open
marnovandermaas wants to merge 7 commits into
lowRISC:mainfrom
marnovandermaas:debug_tieoff
Open

marnovandermaas wants to merge 7 commits into
lowRISC:mainfrom
marnovandermaas:debug_tieoff

Conversation

@marnovandermaas

@marnovandermaas marnovandermaas commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds a debug enable signal to the Mocha top. This debug enable signal ties off the inputs to the debug module and there are formal assertions to prove the output is stable when it is disabled.

This just adds it to the top and doesn't yet disable the debug module
with it.

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
This is in preparation of properly tieing off the debug module when it
is disabled.

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
This connects the debug enable to the new debug module top and masks all
the inputs to known values.

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
If debug is disabled since last reset then all output should be stable
and known values.

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>

@raylau1 raylau1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments on the RTL.

// Debug Module AXI Adapter
axi_adapter #(
.CVA6Cfg ( CVA6Cfg ),
.DATA_WIDTH ( XLen ),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: formatting

Comment thread hw/top_chip/rtl/riscv_debug_module.sv Outdated
Comment on lines +108 to +126
.axi_req_o (axi_host_req_o),
.axi_resp_i (axi_host_resp_i)
.axi_resp_i (axi_host_resp_masked)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Masking the response but not the request can cause the xbar to see req.valid_in = 1 and resp.ready_out = 1 for incoming channels, therefore constantly accept the same channel transfer until buffers fill up. For xbar outgoing channels, it sees req.ready_in = 1 and resp.valid_out = 1, so transfers are lost after masking. Please also mask the request to prevent transfer duplication/loss.

.busy_o ( ),
.axi_req_i (axi_device_req_i),
.axi_req_i (axi_device_req_masked),
.axi_resp_o (axi_device_resp_o),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the axi_host interface, please also mask resp to prevent transfer duplication/loss.

Comment on lines 28 to 33
// Non-debug module reset.
output logic ndmreset_req_o,
input logic ndmreset_ack_i,

// Request to processor core.
output logic debug_req_o

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ndmreset_req_o and debug_req_o should also be masked when dm is disabled. As for td_o and td_en_o I'll let you decide.

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