From 91e52cafc2fc9a9cd990685ede1a530831bd084e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 9 Jan 2018 11:53:50 +0100 Subject: Clean and simplify how we add items to coreview --- qtmips_gui/coreview.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'qtmips_gui/coreview.h') diff --git a/qtmips_gui/coreview.h b/qtmips_gui/coreview.h index 7439888..e214fad 100644 --- a/qtmips_gui/coreview.h +++ b/qtmips_gui/coreview.h @@ -40,16 +40,21 @@ signals: 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; + struct { + coreview::ProgramCounter *pc; + coreview::Latch *latch; + coreview::Adder *adder; + coreview::Constant *adder_4; + coreview::Junction *junction; + coreview::Multiplexer *multiplex; + } pc; coreview::Alu *alu; coreview::Memory *mem; coreview::Registers *regs; - coreview::Multiplexer *pc_multiplexer, *mem_or_reg; + coreview::Multiplexer *mem_or_reg; + QVector connections; + coreview::Connection *new_connection(const coreview::Connector*, const coreview::Connector*); coreview::Connection *pc2pc_latch; coreview::Connection *pc_latch2pc_joint, *pc_joint2pc_adder, *pc_joint2mem; coreview::Connection *pc_multiplexer2pc; -- cgit v1.2.3