aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/coreview.cpp')
-rw-r--r--qtmips_gui/coreview.cpp26
1 files changed, 4 insertions, 22 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;
-}