From 98153a4f7b1edbd465a24d703016978e91cb14db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 14 Feb 2018 14:10:18 +0100 Subject: Do empty fetch stage to report fetch even if we stall --- qtmips_machine/core.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qtmips_machine') 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() { -- cgit v1.2.3