aboutsummaryrefslogtreecommitdiff
path: root/qtmips_cli/tracer.h
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-11 22:44:27 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-11 22:44:27 +0100
commit9a3b0dccb3dcb958b6a5c0cd72e8684887b4c4bf (patch)
tree6fe053723f205516f23427a05bd7c235ce88b32a /qtmips_cli/tracer.h
parent4621754239e9464e097a32d087fe0262e21c5bb7 (diff)
downloadqtmips-9a3b0dccb3dcb958b6a5c0cd72e8684887b4c4bf.tar.gz
qtmips-9a3b0dccb3dcb958b6a5c0cd72e8684887b4c4bf.tar.bz2
qtmips-9a3b0dccb3dcb958b6a5c0cd72e8684887b4c4bf.zip
Allow instruction trace from any stage
In reality this internally allows us to see stages even it we are not using pipelining but that is hidden from outside simply to not confuse user.
Diffstat (limited to 'qtmips_cli/tracer.h')
-rw-r--r--qtmips_cli/tracer.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/qtmips_cli/tracer.h b/qtmips_cli/tracer.h
index 913687c..53fd3e7 100644
--- a/qtmips_cli/tracer.h
+++ b/qtmips_cli/tracer.h
@@ -9,8 +9,12 @@ class Tracer : public QObject {
public:
Tracer(machine::QtMipsMachine *machine);
- // Trace fetched instruction
+ // Trace instructions in different stages/sections
void fetch();
+ void decode();
+ void execute();
+ void memory();
+ void writeback();
// Trace registers
void reg_pc();
void reg_gp(std::uint8_t i);
@@ -18,8 +22,12 @@ public:
void reg_hi();
private slots:
- void instruction_fetch(machine::Instruction &inst);
- // TODO fetch
+ void instruction_fetch(const machine::Instruction &inst);
+ void instruction_decode(const machine::Instruction &inst);
+ void instruction_execute(const machine::Instruction &inst);
+ void instruction_memory(const machine::Instruction &inst);
+ void instruction_writeback(const machine::Instruction &inst);
+
void regs_pc_update(std::uint32_t val);
void regs_gp_update(std::uint8_t i, std::uint32_t val);
void regs_hi_lo_update(bool hi, std::uint32_t val);