summaryrefslogtreecommitdiff
path: root/inc/if.h
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-29 17:11:17 -0400
committerbd <bdunahu@operationnull.com>2025-03-29 17:11:17 -0400
commitd21a1a9caa1f1791343a5376121936e552b1124c (patch)
treedf28c01f6d01603e5408bc1b1b111a66adafbff7 /inc/if.h
parentac0ae7206491a42cdba70560b0db41cfc8c7f642 (diff)
Fetch stage properly holds objects until parent is ready
Diffstat (limited to 'inc/if.h')
-rw-r--r--inc/if.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/inc/if.h b/inc/if.h
index a6869f7..9f84e51 100644
--- a/inc/if.h
+++ b/inc/if.h
@@ -15,7 +15,17 @@ class IF : public Stage
*/
IF(Stage *next);
- Response advance(InstrDTO &i, Response p) override;
+ Response advance(InstrDTO &next_instr, Response p) override;
+
+ private:
+ /**
+ * Performs a fetch only if a current fetch is not pending. Pending means
+ * that a fetch has completed successfully, but the caller stage in the
+ * pipeline is not ready to receive it. In this case, `curr_instr` is not
+ * the nullptr.
+ * @return STALLED if we are waiting on the storage devices, OK otherwise.
+ */
+ void fetch_with_buffer();
};
#endif /* IF_H_INCLUDED */