aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-02-14 14:10:18 +0100
committerKarel Kočí <cynerd@email.cz>2018-02-14 14:10:18 +0100
commit98153a4f7b1edbd465a24d703016978e91cb14db (patch)
tree4c4a01780c51b3b8be9ef8fee61419a9d678cc02
parent31db65e43406dcafe5d2987587352e965f6b5171 (diff)
downloadqtmips-98153a4f7b1edbd465a24d703016978e91cb14db.tar.gz
qtmips-98153a4f7b1edbd465a24d703016978e91cb14db.tar.bz2
qtmips-98153a4f7b1edbd465a24d703016978e91cb14db.zip
Do empty fetch stage to report fetch even if we stall
-rw-r--r--qtmips_machine/core.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp
index 5ce0c70..94cccdf 100644
--- a/qtmips_machine/core.cpp
+++ b/qtmips_machine/core.cpp
@@ -330,9 +330,12 @@ void CorePipelined::step() {
if (!stall) {
dt_f = fetch();
handle_pc(dt_d);
- } else
+ } else {
+ // Run fetch stage on empty
+ fetch();
// clear decode latch (insert nope to execute stage)
dtDecodeInit(dt_d);
+ }
}
void CorePipelined::reset() {