From 08d7e3dabd81e9d6e4f73aa5889a1d709242177c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 3 Jan 2018 17:52:45 +0100 Subject: Allow delay slot disable for non-pipelined core --- qtmips_machine/machineconfig.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'qtmips_machine/machineconfig.cpp') diff --git a/qtmips_machine/machineconfig.cpp b/qtmips_machine/machineconfig.cpp index 2b4da34..0947e22 100644 --- a/qtmips_machine/machineconfig.cpp +++ b/qtmips_machine/machineconfig.cpp @@ -4,14 +4,14 @@ using namespace machine; MachineConfig::MachineConfig() { pipeline = false; - jumppred = false; + delayslot = true; cache_type = CCT_NONE; elf_path = QString(""); } MachineConfig::MachineConfig(MachineConfig *cc) { pipeline = cc->pipelined(); - jumppred = cc->jump_prediction(); + delayslot = cc->delay_slot(); cache_type = cc->cache(); elf_path = cc->elf(); } @@ -20,10 +20,10 @@ void MachineConfig::set_pipelined(bool v) { pipeline = v; } -void MachineConfig::set_jump_prediction(bool v) { - jumppred = v; - if (jumppred) - pipeline = true; +void MachineConfig::set_delay_slot(bool v) { + delayslot = v; + if (!delayslot) + pipeline = false; } void MachineConfig::set_cache(enum CacheType cc) { @@ -38,8 +38,8 @@ bool MachineConfig::pipelined() const { return pipeline; } -bool MachineConfig::jump_prediction() const { - return jumppred; +bool MachineConfig::delay_slot() const { + return delayslot; } enum MachineConfig::CacheType MachineConfig::cache() const { -- cgit v1.2.3