Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification to the debug interface for the creation of an output halted status. #288

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/02_user/integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Instantiation Template

// Debug interface
.debug_req_i (),
.debug_halted_o (),
.dm_halt_addr_i (),
.dm_exception_addr_i (),
.crash_dump_o (),
Expand Down
2 changes: 2 additions & 0 deletions doc/03_reference/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Interface
+==================================+=====================+======================================================================================+
| ``debug_req_i`` | input | Request to enter Debug Mode |
+----------------------------------+---------------------+--------------------------------------------------------------------------------------+
| ``debug_halted_o`` | output | Asserted if core enters Debug Mode |
+----------------------------------+---------------------+--------------------------------------------------------------------------------------+
| ``dm_halt_addr_i`` | input | Address to jump to when entering Debug Mode (default 0x1A110800) |
+----------------------------------+---------------------+--------------------------------------------------------------------------------------+
| ``dm_exception_addr_i`` | input | Address to jump to when an exception occurs while in Debug Mode (default 0x1A110808) |
Expand Down
1 change: 1 addition & 0 deletions dv/riscv_compliance/rtl/cve2_riscv_compliance.sv
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ module cve2_riscv_compliance (
.scramble_req_o ( ),

.debug_req_i ('b0 ),
.debug_halted_o ( ),
.dm_halt_addr_i (32'h00000000 ),
.dm_exception_addr_i (32'h00000000 ),
.crash_dump_o ( ),
Expand Down
6 changes: 6 additions & 0 deletions rtl/cve2_core.sv
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module cve2_core import cve2_pkg::*; #(

// Debug Interface
input logic debug_req_i,
output logic debug_halted_o,
input logic [31:0] dm_halt_addr_i,
input logic [31:0] dm_exception_addr_i,
output crash_dump_t crash_dump_o,
Expand Down Expand Up @@ -611,6 +612,11 @@ module cve2_core import cve2_pkg::*; #(
assign crash_dump_o.last_data_addr = lsu_addr_last;
assign crash_dump_o.exception_addr = csr_mepc;

///////////////////////
// Debug output //
///////////////////////

assign debug_halted_o = debug_mode;

// Explict INC_ASSERT block to avoid unused signal lint warnings were asserts are not included
`ifdef INC_ASSERT
Expand Down
2 changes: 2 additions & 0 deletions rtl/cve2_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module cve2_top import cve2_pkg::*; #(

// Debug Interface
input logic debug_req_i,
output logic debug_halted_o,
input logic [31:0] dm_halt_addr_i,
input logic [31:0] dm_exception_addr_i,
output crash_dump_t crash_dump_o,
Expand Down Expand Up @@ -194,6 +195,7 @@ module cve2_top import cve2_pkg::*; #(
.irq_pending_o(irq_pending),

.debug_req_i,
.debug_halted_o,
.dm_halt_addr_i,
.dm_exception_addr_i,
.crash_dump_o,
Expand Down
2 changes: 2 additions & 0 deletions rtl/cve2_top_tracing.sv
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module cve2_top_tracing import cve2_pkg::*; #(

// Debug Interface
input logic debug_req_i,
output logic debug_halted_o,
input logic [31:0] dm_halt_addr_i,
input logic [31:0] dm_exception_addr_i,
output crash_dump_t crash_dump_o,
Expand Down Expand Up @@ -146,6 +147,7 @@ module cve2_top_tracing import cve2_pkg::*; #(
.irq_nm_i,

.debug_req_i,
.debug_halted_o,
.dm_halt_addr_i,
.dm_exception_addr_i,
.crash_dump_o,
Expand Down