aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--design/stack_machine.v36
1 files changed, 36 insertions, 0 deletions
diff --git a/design/stack_machine.v b/design/stack_machine.v
index 687168a..e6030e4 100644
--- a/design/stack_machine.v
+++ b/design/stack_machine.v
@@ -655,6 +655,42 @@ module stack_machine_new
r1 <= r0;
`SET_PC(r1);
end
+
+ if (first_execution_tick) begin
+ `DBG(("r0: %x r1: %x", r0, r1));
+ `DBG(("CPU: Executing %0s instruction",
+ store ? "store (kind?)" :
+ load ? "load (kind?)" :
+ instr_halt ? "halt" :
+ instr_nop ? "nop" :
+ instr_swap ? "swap" :
+ instr_set_sp ? "set_sp" :
+ instr_jump ? "jump" :
+ instr_add_sp ? "add_sp" :
+ instr_tee ? "tee" :
+ instr_get_frame ? "get_frame" :
+ instr_const ? "const" :
+ instr_call ? "call" :
+ instr_add ? "add" :
+ instr_sub ? "sub" :
+ instr_udiv ? "udiv" :
+ instr_mul ? "mul" :
+ instr_drop ? "drop" :
+ instr_eq ? "eq" :
+ instr_lt ? "lt" :
+ instr_ult ? "ult" :
+ instr_le ? "le" :
+ instr_ule ? "ule" :
+ instr_gt ? "gt" :
+ instr_ugt ? "ugt" :
+ instr_ge ? "ge" :
+ instr_uge ? "uge" :
+ instr_ret ? "ret" :
+ instr_cond_jump ? "cond_jump" :
+ instr_cond_jump_n ? "cond_jump_n" :
+ set_im ? "im" :
+ "unknown"));
+ end // if (first_execution_tick)
end // case: STEP_EXECUTING
endcase // case (step)
end // else: !if(RST_I)