aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/machineconfig.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-03 17:52:45 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-03 17:52:45 +0100
commit08d7e3dabd81e9d6e4f73aa5889a1d709242177c (patch)
tree1ad8277b3be1534f3d2a451e6c4fe659f9d9cb24 /qtmips_machine/machineconfig.cpp
parent4a40dddda4d3839814be2f00fb9a62f95b1b3f21 (diff)
downloadqtmips-08d7e3dabd81e9d6e4f73aa5889a1d709242177c.tar.gz
qtmips-08d7e3dabd81e9d6e4f73aa5889a1d709242177c.tar.bz2
qtmips-08d7e3dabd81e9d6e4f73aa5889a1d709242177c.zip
Allow delay slot disable for non-pipelined core
Diffstat (limited to 'qtmips_machine/machineconfig.cpp')
-rw-r--r--qtmips_machine/machineconfig.cpp16
1 files changed, 8 insertions, 8 deletions
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 {