From cdc1f889a5d302c9ad83846e1b686523f26ed423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 21 Jan 2018 20:46:16 +0100 Subject: Add instruction view to single core --- qtmips_machine/core.cpp | 2 ++ qtmips_machine/core.h | 1 + 2 files changed, 3 insertions(+) (limited to 'qtmips_machine') diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp index 9ca7b9d..fd6c6f4 100644 --- a/qtmips_machine/core.cpp +++ b/qtmips_machine/core.cpp @@ -171,6 +171,8 @@ void Core::writeback(const struct dtMemory &dt) { } void Core::handle_pc(const struct dtDecode &dt) { + emit instruction_program_counter(dt.inst); + bool branch = false; bool link = false; // TODO implement link diff --git a/qtmips_machine/core.h b/qtmips_machine/core.h index 3ff6a98..a0bc2a2 100644 --- a/qtmips_machine/core.h +++ b/qtmips_machine/core.h @@ -26,6 +26,7 @@ signals: void instruction_executed(const machine::Instruction &inst); void instruction_memory(const machine::Instruction &inst); void instruction_writeback(const machine::Instruction &inst); + void instruction_program_counter(const machine::Instruction &inst); protected: Registers *regs; -- cgit v1.2.3