From e3b5d15bf2f48449fd43029fa1e0ca9270ec481d Mon Sep 17 00:00:00 2001 From: Prashanth Mundkur Date: Thu, 3 May 2018 15:47:03 -0700 Subject: Simplify the top-level execute loop using the step function. --- riscv/riscv_step.sail | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'riscv/riscv_step.sail') diff --git a/riscv/riscv_step.sail b/riscv/riscv_step.sail index e670e2b8..b5d8e897 100644 --- a/riscv/riscv_step.sail +++ b/riscv/riscv_step.sail @@ -43,12 +43,13 @@ function fetch() -> FetchResult = { val step : unit -> unit effect {barr, eamem, escape, exmem, rmem, rreg, wmv, wreg} function step() = { - tick_clock(); - match curInterrupt(mip, mie, mideleg) { - Some(intr, priv) => - handle_interrupt(intr, priv), + Some(intr, priv) => { + print_bits("\nHandling interrupt: ", intr); + handle_interrupt(intr, priv) + }, None() => { + print_bits("\nPC: ", PC); match fetch() { F_Error(e, addr) => handle_mem_exception(addr, e), F_RVC(h) => { -- cgit v1.2.3