From 635567e0564db4d19741b2478a4129fccb76f64a Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Mon, 25 Mar 2019 23:13:31 +0100 Subject: Highlight instructions passing through the pipeline stages. Signed-off-by: Pavel Pisa --- qtmips_gui/programmodel.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'qtmips_gui/programmodel.h') diff --git a/qtmips_gui/programmodel.h b/qtmips_gui/programmodel.h index f5159af..a7c1699 100644 --- a/qtmips_gui/programmodel.h +++ b/qtmips_gui/programmodel.h @@ -84,10 +84,20 @@ public: return true; } + enum StageAddress { + STAGEADDR_FETCH, + STAGEADDR_DECODE, + STAGEADDR_EXECUTE, + STAGEADDR_MEMORY, + STAGEADDR_WRITEBACK, + STAGEADDR_COUNT, + }; + public slots: void setup(machine::QtMipsMachine *machine); void check_for_updates(); void toggle_hw_break(const QModelIndex & index); + void update_stage_addr(uint stage, std::uint32_t addr); private: std::uint32_t index0_offset; @@ -95,6 +105,8 @@ private: machine::QtMipsMachine *machine; std::uint32_t memory_change_counter; std::uint32_t cache_program_change_counter; + std::uint32_t stage_addr[STAGEADDR_COUNT]; + bool stages_need_update; }; #endif // PROGRAMMODEL_H -- cgit v1.2.3