summaryrefslogtreecommitdiff
path: root/riscv
diff options
context:
space:
mode:
authorPrashanth Mundkur2018-05-04 15:59:47 -0700
committerPrashanth Mundkur2018-05-04 15:59:57 -0700
commitd541425ae8f63e8a9b375877b825cc3d91b9b9d5 (patch)
tree89f7825afea3356d05e657aa311c9dcd9a0dbd11 /riscv
parent164f075a1e3b81dd499bce712114bd5318e547fe (diff)
Tweak the execution log.
Diffstat (limited to 'riscv')
-rw-r--r--riscv/riscv_step.sail9
1 files changed, 4 insertions, 5 deletions
diff --git a/riscv/riscv_step.sail b/riscv/riscv_step.sail
index 7783317a..7ddd8a44 100644
--- a/riscv/riscv_step.sail
+++ b/riscv/riscv_step.sail
@@ -51,7 +51,6 @@ function step() = {
false
},
None() => {
- print_bits("PC: ", PC);
match fetch() {
F_Error(e, addr) => {
handle_mem_exception(addr, e);
@@ -60,12 +59,12 @@ function step() = {
F_RVC(h) => {
match decodeCompressed(h) {
None() => {
- print(BitStr(h) ^ " : <no-decode>");
+ print("PC: " ^ BitStr(PC) ^ " instr: " ^ BitStr(h) ^ " : <no-decode>");
handle_decode_exception(EXTZ(h));
false
},
Some(ast) => {
- print(BitStr(h) ^ " : " ^ ast);
+ print("PC: " ^ BitStr(PC) ^ " instr: " ^ BitStr(h) ^ " : " ^ ast);
nextPC = PC + 2;
execute(ast);
true
@@ -75,12 +74,12 @@ function step() = {
F_Base(w) => {
match decode(w) {
None() => {
- print(BitStr(w) ^ " : <no-decode>");
+ print("PC: " ^ BitStr(PC) ^ " instr: " ^ BitStr(w) ^ " : <no-decode>");
handle_decode_exception(EXTZ(w));
false
},
Some(ast) => {
- print(BitStr(w) ^ " : " ^ ast);
+ print("PC: " ^ BitStr(PC) ^ " instr: " ^ BitStr(w) ^ " : " ^ ast);
nextPC = PC + 4;
execute(ast);
true