aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/qtmipsmachine.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-05 16:29:58 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-05 16:30:23 +0100
commit799dcddc2420ce1450ac2bdd0d69bccf4a2f2e1f (patch)
treedd7591e0c6e5eaaf3e59fc047b6295310c72ee92 /qtmips_machine/qtmipsmachine.cpp
parentfac2c49643ee5122fbeffaeaebbac48e69381bf3 (diff)
downloadqtmips-799dcddc2420ce1450ac2bdd0d69bccf4a2f2e1f.tar.gz
qtmips-799dcddc2420ce1450ac2bdd0d69bccf4a2f2e1f.tar.bz2
qtmips-799dcddc2420ce1450ac2bdd0d69bccf4a2f2e1f.zip
Copy machineconfig in QtMipsMachine
Diffstat (limited to 'qtmips_machine/qtmipsmachine.cpp')
-rw-r--r--qtmips_machine/qtmipsmachine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/qtmips_machine/qtmipsmachine.cpp b/qtmips_machine/qtmipsmachine.cpp
index a652363..744c5e2 100644
--- a/qtmips_machine/qtmipsmachine.cpp
+++ b/qtmips_machine/qtmipsmachine.cpp
@@ -3,7 +3,7 @@
using namespace machine;
-QtMipsMachine::QtMipsMachine(const MachineConfig &cc) {
+QtMipsMachine::QtMipsMachine(const MachineConfig &cc) : QObject(), mcnf(&cc) {
stat = ST_READY;
ProgramLoader program(cc.elf());
@@ -29,7 +29,6 @@ QtMipsMachine::QtMipsMachine(const MachineConfig &cc) {
throw QTMIPS_EXCEPTION(Sanity, "Trying to configure unknown cache type", "");
}
- cr_pipelined = cc.pipelined();
if (cc.pipelined())
cr = new CorePipelined(regs, coremem);
else
@@ -40,6 +39,10 @@ QtMipsMachine::QtMipsMachine(const MachineConfig &cc) {
connect(run_t, SIGNAL(timeout()), this, SLOT(step()));
}
+const MachineConfig &QtMipsMachine::config() {
+ return mcnf;
+}
+
void QtMipsMachine::set_speed(unsigned val) {
run_t->setInterval(val);
}