diff options
| author | Prashanth Mundkur | 2018-11-28 15:56:08 -0800 |
|---|---|---|
| committer | Prashanth Mundkur | 2018-11-29 09:52:36 -0800 |
| commit | 35eff0805dffe8d006d390bdaebac1b8d4b0a61d (patch) | |
| tree | 500ed7eec04c75b885ca2cccafd1c7484bbb298f /riscv/riscv_step.sail | |
| parent | d4ace417655622268e5af471d8d13dd2422054f7 (diff) | |
RISC-V: factor the execution trace.
This is now split into instructions, regs, memory and platform, each
controlled individually. Currently all are enabled and not connected to
any command-line options, so a recompile is needed for trace tuning.
Diffstat (limited to 'riscv/riscv_step.sail')
| -rw-r--r-- | riscv/riscv_step.sail | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/riscv/riscv_step.sail b/riscv/riscv_step.sail index 218be598..755420d9 100644 --- a/riscv/riscv_step.sail +++ b/riscv/riscv_step.sail @@ -62,13 +62,13 @@ function step(step_no) = { F_RVC(h) => { match decodeCompressed(h) { None() => { - print("[" ^ string_of_int(step_no) ^ "] [" ^ cur_privilege ^ "]: " ^ BitStr(PC) ^ " (" ^ BitStr(h) ^ ") <no-decode>"); + print_instr("[" ^ string_of_int(step_no) ^ "] [" ^ cur_privilege ^ "]: " ^ BitStr(PC) ^ " (" ^ BitStr(h) ^ ") <no-decode>"); instbits = EXTZ(h); handle_illegal(); (false, true) }, Some(ast) => { - print("[" ^ string_of_int(step_no) ^ "] [" ^ cur_privilege ^ "]: " ^ BitStr(PC) ^ " (" ^ BitStr(h) ^ ") " ^ ast); + print_instr("[" ^ string_of_int(step_no) ^ "] [" ^ cur_privilege ^ "]: " ^ BitStr(PC) ^ " (" ^ BitStr(h) ^ ") " ^ ast); nextPC = PC + 2; (execute(ast), true) } @@ -77,13 +77,13 @@ function step(step_no) = { F_Base(w) => { match decode(w) { None() => { - print("[" ^ string_of_int(step_no) ^ "] [" ^ cur_privilege ^ "]: " ^ BitStr(PC) ^ " (" ^ BitStr(w) ^ ") <no-decode>"); + print_instr("[" ^ string_of_int(step_no) ^ "] [" ^ cur_privilege ^ "]: " ^ BitStr(PC) ^ " (" ^ BitStr(w) ^ ") <no-decode>"); instbits = EXTZ(w); handle_illegal(); (false, true) }, Some(ast) => { - print("[" ^ string_of_int(step_no) ^ "] [" ^ cur_privilege ^ "]: " ^ BitStr(PC) ^ " (" ^ BitStr(w) ^ ") " ^ ast); + print_instr("[" ^ string_of_int(step_no) ^ "] [" ^ cur_privilege ^ "]: " ^ BitStr(PC) ^ " (" ^ BitStr(w) ^ ") " ^ ast); nextPC = PC + 4; (execute(ast), true) } |
