Skip to content
Snippets Groups Projects
Commit 43d8bf37 authored by Florian Zaruba's avatar Florian Zaruba
Browse files

commit_log: Align compressed encoding to Spike

parent e312b226
Branches
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- Fix compressed instruction decoding in tracer
- Fix privilege bug in performance counters. The counters have always been accessible in user mode.
- Re-work interrupt and debug subsystem to associate requests during decode. This improves stability on for non-idempotent loads.
- Fix RISC-V PK simulation bug caused due to insufficient time to init the `a0` and `a1` registers via the bootrom
......
......@@ -599,17 +599,25 @@ package riscv;
// pragma translate_off
function string spikeCommitLog(logic [63:0] pc, priv_lvl_t priv_lvl, logic [31:0] instr, logic [4:0] rd, logic [63:0] result, logic rd_fpr);
string rd_s;
string instr_word;
automatic string rf_s = rd_fpr ? "f" : "x";
if (instr[1:0] != 2'b11) begin
instr_word = $sformatf("(0x%h)", instr[15:0]);
end else begin
instr_word = $sformatf("(0x%h)", instr);
end
if (rd < 10) rd_s = $sformatf("%s %0d", rf_s, rd);
else rd_s = $sformatf("%s%0d", rf_s, rd);
if (rd_fpr || rd != 0) begin
// 0 0x0000000080000118 (0xeecf8f93) x31 0x0000000080004000
return $sformatf("%d 0x%h (0x%h) %s 0x%h\n", priv_lvl, pc, instr, rd_s, result);
return $sformatf("%d 0x%h %s %s 0x%h\n", priv_lvl, pc, instr_word, rd_s, result);
end else begin
// 0 0x000000008000019c (0x0040006f)
return $sformatf("%d 0x%h (0x%h)\n", priv_lvl, pc, instr);
return $sformatf("%d 0x%h %s\n", priv_lvl, pc, instr_word);
end
endfunction
// pragma translate_on
......
......@@ -708,7 +708,7 @@ module ariane #(
assign tracer_if.flush_unissued = flush_unissued_instr_ctrl_id;
assign tracer_if.flush = flush_ctrl_ex;
// fetch
assign tracer_if.instruction = id_stage_i.compressed_decoder_i.instr_o;
assign tracer_if.instruction = id_stage_i.instr_realigner_i.fetch_entry_o.instruction;
assign tracer_if.fetch_valid = id_stage_i.instr_realigner_i.fetch_entry_valid_o;
assign tracer_if.fetch_ack = id_stage_i.instr_realigner_i.fetch_ack_i;
// Issue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment