From 2c13075cb50aaba5a6af0185b8f520347a8ab4b4 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Fri, 7 Oct 2022 19:24:27 -0700 Subject: Minor cleanup and some compilation fixes. --- isa/checker.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'isa/checker.cpp') diff --git a/isa/checker.cpp b/isa/checker.cpp index cd802a8..604279a 100644 --- a/isa/checker.cpp +++ b/isa/checker.cpp @@ -1,15 +1,16 @@ #include +#include "isa/checker.h" #include "isa/isa.h" void checker::execute() { - assert(!halt); - auto int_enable_delay = ctlregs[ctlreg::INT_ENABLE] >> 1; - if (ctlregs[ctlreg::INT_ENABLE] & 1) { + assert(!halted); + auto int_enable_delay = ctlregs[INT_ENABLE] >> 1; + if (ctlregs[INT_ENABLE] & 1) { // check for interrupt } - ctlregs[ctlreg::INT_ENABLE] = (int_enable_delay << 1) | int_enable_delay; - inst = decode(ctlregs[ctlreg::DATA_INSTRUCTION_FIELD_BUFFER], + ctlregs[INT_ENABLE] = (int_enable_delay << 1) | int_enable_delay; + auto inst = decode(ctlregs[DATA_INSTRUCTION_FIELD_BUFFER], pc, mem.fetch(pc)); auto next_pc = inst.next_pc; @@ -40,5 +41,5 @@ void checker::execute() { mem.store(inst.final_address.value(), inst.data.value()); assert(inst.next_pc == next_pc || inst.possibly_redirects); pc = inst.next_pc; - halt = inst.halt; + halted = inst.halt; } -- cgit v1.2.3