diff options
author | Karel Kočí <cynerd@email.cz> | 2018-02-14 14:10:18 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-02-14 14:10:18 +0100 |
commit | 98153a4f7b1edbd465a24d703016978e91cb14db (patch) | |
tree | 4c4a01780c51b3b8be9ef8fee61419a9d678cc02 | |
parent | 31db65e43406dcafe5d2987587352e965f6b5171 (diff) | |
download | qtmips-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.cpp | 5 |
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() { |