Report the last PC when debug not halted

This commit is contained in:
Florian Zaruba 2017-08-26 11:48:57 +02:00
parent a569aede23
commit b3abf7491c

View file

@ -153,8 +153,6 @@ module debug_unit (
if (debug_halted_o) begin if (debug_halted_o) begin
if (commit_instr_i.valid) if (commit_instr_i.valid)
rdata_n = commit_instr_i.pc; rdata_n = commit_instr_i.pc;
else
rdata_n = 64'hdeadbeefdeadbeef;
if (cause_is_bp_q) if (cause_is_bp_q)
// if the cause is a breakpoint we trick the debugger in assuming the next instruction // if the cause is a breakpoint we trick the debugger in assuming the next instruction
@ -163,8 +161,9 @@ module debug_unit (
rdata_n = dbg_ppc_q + 64'h2; rdata_n = dbg_ppc_q + 64'h2;
else else
rdata_n = dbg_ppc_q + 64'h4; rdata_n = dbg_ppc_q + 64'h4;
// TODO: Breakpoint // we are not in debug mode - so just report what we know: the last valid PC
end end else
rdata_n = dbg_ppc_q;
// if we came from reset - output the boot address // if we came from reset - output the boot address
if (reset_q) if (reset_q)
rdata_n = boot_addr_i; rdata_n = boot_addr_i;