diff options
Diffstat (limited to 'qtmips_gui')
-rw-r--r-- | qtmips_gui/coreview.cpp | 26 | ||||
-rw-r--r-- | qtmips_gui/coreview.h | 3 |
2 files changed, 5 insertions, 24 deletions
diff --git a/qtmips_gui/coreview.cpp b/qtmips_gui/coreview.cpp index e51345f..eb39a47 100644 --- a/qtmips_gui/coreview.cpp +++ b/qtmips_gui/coreview.cpp @@ -168,10 +168,11 @@ coreview::Signal *CoreViewScene::new_signal(const coreview::Connector *a, const } CoreViewSceneSimple::CoreViewSceneSimple(CoreView *view, machine::QtMipsMachine *machine) : CoreViewScene(view, machine) { - if (machine->config().delay_slot()) + NEW_I(instr_prim, 230, 60, instruction_fetched(const machine::Instruction&)); + if (machine->config().delay_slot()) { NEW(Latch, delay_slot_latch, 55, 470, machine, 25); - else - delay_slot_latch = nullptr; + NEW_I(instr_delay, 60, 500, instruction_program_counter(const machine::Instruction&)); + } coreview::Connection *con; // Fetch stage @@ -214,11 +215,6 @@ CoreViewSceneSimple::CoreViewSceneSimple(CoreView *view, machine::QtMipsMachine } } -CoreViewSceneSimple::~CoreViewSceneSimple() { - if (delay_slot_latch != nullptr) - delete delay_slot_latch; -} - CoreViewScenePipelined::CoreViewScenePipelined(CoreView *view, machine::QtMipsMachine *machine) : CoreViewScene(view, machine) { NEW(Latch, latch_if_id, 158, 70, machine, 400); latch_if_id->setTitle("IF/ID"); @@ -286,17 +282,3 @@ CoreViewScenePipelined::CoreViewScenePipelined(CoreView *view, machine::QtMipsMa con = new_bus(dc.add->connector_out(), ft.multiplex->connector_in(1)); con->setAxes({CON_AXIS_Y(360), CON_AXIS_X(480), CON_AXIS_Y(10)}); } - -CoreViewScenePipelined::~CoreViewScenePipelined() { - delete latch_if_id; - delete latch_id_ex; - delete latch_ex_mem; - delete latch_mem_wb; - delete inst_fetch; - delete inst_dec; - delete inst_exec; - delete inst_mem; - delete inst_wrb; - if (hazard_unit != nullptr) - delete hazard_unit; -} diff --git a/qtmips_gui/coreview.h b/qtmips_gui/coreview.h index ed8a8ad..d5b39c1 100644 --- a/qtmips_gui/coreview.h +++ b/qtmips_gui/coreview.h @@ -84,16 +84,15 @@ protected: class CoreViewSceneSimple : public CoreViewScene { public: CoreViewSceneSimple(CoreView *view, machine::QtMipsMachine *machine); - ~CoreViewSceneSimple(); private: + coreview::InstructionView *instr_prim, *instr_delay; 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; |