aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-21 20:46:16 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-21 20:46:16 +0100
commitcdc1f889a5d302c9ad83846e1b686523f26ed423 (patch)
tree187c6062f5f777f210a1e04abb128d50a46f1ada /qtmips_gui/coreview.cpp
parentb0a3e568a9e10ee9d99e8679b2ddd697705e756c (diff)
downloadqtmips-cdc1f889a5d302c9ad83846e1b686523f26ed423.tar.gz
qtmips-cdc1f889a5d302c9ad83846e1b686523f26ed423.tar.bz2
qtmips-cdc1f889a5d302c9ad83846e1b686523f26ed423.zip
Add instruction view to single core
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;
-}