diff options
Diffstat (limited to 'qtmips_machine')
-rw-r--r-- | qtmips_machine/core.cpp | 4 | ||||
-rw-r--r-- | qtmips_machine/core.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp index 000d76d..276931c 100644 --- a/qtmips_machine/core.cpp +++ b/qtmips_machine/core.cpp @@ -25,7 +25,7 @@ struct DecodeMap { // This is map from opcode to signals. static const struct DecodeMap dmap[] = { { .flags = DM_SUPPORTED | DM_REGD | DM_REGWRITE, NOALU, NOMEM }, // Alu operations (aluop is decoded from function explicitly) - { .flags = DM_SUPPORTED, NOALU, NOMEM }, // REGIMM (BLTZ, BGEZ, ) + { .flags = DM_SUPPORTED, NOALU, NOMEM }, // REGIMM (BLTZ, BGEZ) { .flags = DM_SUPPORTED, NOALU, NOMEM }, // J NOPE, // JAL { .flags = DM_SUPPORTED, NOALU, NOMEM }, // BEQ @@ -96,8 +96,8 @@ Core::Core(Registers *regs, MemoryAccess *mem) { } struct Core::dtFetch Core::fetch() { - // TODO signals Instruction inst(mem->read_word(regs->read_pc())); + emit instruction_fetched(inst); return { .inst = inst }; diff --git a/qtmips_machine/core.h b/qtmips_machine/core.h index fc61429..b09e297 100644 --- a/qtmips_machine/core.h +++ b/qtmips_machine/core.h @@ -18,6 +18,7 @@ public: virtual void step() = 0; // Do single step signals: + void instruction_fetched(machine::Instruction &inst); protected: Registers *regs; |