diff options
author | Karel Kočí <cynerd@email.cz> | 2018-01-08 21:43:58 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-01-08 21:43:58 +0100 |
commit | 506174a8266eb9842ff9e50a89ddf86cb975be30 (patch) | |
tree | cd1c2905d48c172d2b83e4230b1f76dc46e8f3d3 /qtmips_gui/coreview.h | |
parent | bcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23 (diff) | |
download | qtmips-506174a8266eb9842ff9e50a89ddf86cb975be30.tar.gz qtmips-506174a8266eb9842ff9e50a89ddf86cb975be30.tar.bz2 qtmips-506174a8266eb9842ff9e50a89ddf86cb975be30.zip |
Add coreview progress
Diffstat (limited to 'qtmips_gui/coreview.h')
-rw-r--r-- | qtmips_gui/coreview.h | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/qtmips_gui/coreview.h b/qtmips_gui/coreview.h index 52b98ee..7439888 100644 --- a/qtmips_gui/coreview.h +++ b/qtmips_gui/coreview.h @@ -9,15 +9,22 @@ #include "coreview/multiplexer.h" #include "coreview/latch.h" #include "coreview/alu.h" +#include "coreview/adder.h" +#include "coreview/memory.h" +#include "coreview/registers.h" +#include "coreview/instructionview.h" +#include "coreview/junction.h" +#include "coreview/constant.h" class CoreView : public QGraphicsView { public: CoreView(QWidget *parent); + void setScene(QGraphicsScene *scene); + protected: void resizeEvent(QResizeEvent *event); private: - const int scene_width = 800, scene_height = 800; void update_scale(); }; @@ -25,20 +32,53 @@ class CoreViewScene : public QGraphicsScene { Q_OBJECT public: CoreViewScene(CoreView *view, machine::QtMipsMachine *machine); + ~CoreViewScene(); -private: - machine::QtMipsMachine *machine; +signals: + void request_registers(); + void request_data_memory(); + void request_program_memory(); +private: coreview::ProgramCounter *pc; + coreview::Latch *pc_latch; + coreview::Adder *pc_adder; + coreview::Constant *pc_adder_4; + coreview::Junction *pc_junction; coreview::Alu *alu; - coreview::Multiplexer *pc_multiplexer; - coreview::Connection *pc2pc; - coreview::Latch *testlatch; + coreview::Memory *mem; + coreview::Registers *regs; + coreview::Multiplexer *pc_multiplexer, *mem_or_reg; + + coreview::Connection *pc2pc_latch; + coreview::Connection *pc_latch2pc_joint, *pc_joint2pc_adder, *pc_joint2mem; + coreview::Connection *pc_multiplexer2pc; +}; + +class CoreViewSceneSimple : public CoreViewScene { +public: + CoreViewSceneSimple(CoreView *view, machine::QtMipsMachine *machine); + ~CoreViewSceneSimple(); + +private: + coreview::Latch *delay_slot_latch; +}; + +class CoreViewScenePipelined : public CoreViewScene { +public: + CoreViewScenePipelined(CoreView *view, machine::QtMipsMachine *machine); + ~CoreViewScenePipelined(); + +private: + coreview::Latch *latch_if_id, *latch_id_ex, *latch_ex_mem, *latch_mem_wb; + // TODO forwarding unit }; #else class CoreView; class CoreViewScene; +class CoreViewSceneSimple; +class CoreViewScenePipelined; #endif // COREVIEW_H |