diff options
author | Karel Kočí <cynerd@email.cz> | 2018-01-15 13:13:56 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-01-15 13:13:56 +0100 |
commit | 5241e1d9733ea69a91d3f497bc794ce881ad49fd (patch) | |
tree | ed941cd505a82f81f9b39004a70087c5b900dc06 /qtmips_machine/qtmipsmachine.cpp | |
parent | 4dc4726c80bab8192abfb2d881a69ef9f490754f (diff) | |
download | qtmips-5241e1d9733ea69a91d3f497bc794ce881ad49fd.tar.gz qtmips-5241e1d9733ea69a91d3f497bc794ce881ad49fd.tar.bz2 qtmips-5241e1d9733ea69a91d3f497bc794ce881ad49fd.zip |
Change how we configure cache and configure hazard unit
Diffstat (limited to 'qtmips_machine/qtmipsmachine.cpp')
-rw-r--r-- | qtmips_machine/qtmipsmachine.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/qtmips_machine/qtmipsmachine.cpp b/qtmips_machine/qtmipsmachine.cpp index f2683fb..c60cdce 100644 --- a/qtmips_machine/qtmipsmachine.cpp +++ b/qtmips_machine/qtmipsmachine.cpp @@ -14,25 +14,10 @@ QtMipsMachine::QtMipsMachine(const MachineConfig &cc) : QObject(), mcnf(&cc) { regs = new Registers(); mem = new Memory(*mem_program_only); - MemoryAccess *coremem; - switch (cc.cache()) { - case MachineConfig::CCT_NONE: - cch = nullptr; - coremem = mem; - break; - case MachineConfig::CCT_ASSOCIATIVE: - // TODO - coremem = mem; - //coremem = cch = new CacheAssociative(); - break; - default: - throw QTMIPS_EXCEPTION(Sanity, "Trying to configure unknown cache type", ""); - } - if (cc.pipelined()) - cr = new CorePipelined(regs, coremem); + cr = new CorePipelined(regs, mem); else - cr = new CoreSingle(regs, coremem, cc.delay_slot()); + cr = new CoreSingle(regs, mem, cc.delay_slot()); run_t = new QTimer(this); set_speed(0); // In default run as fast as possible |