summaryrefslogtreecommitdiff
path: root/inc/wb.h
diff options
context:
space:
mode:
authorbd <bdunaisky@umass.edu>2025-04-02 04:05:18 +0000
committerGitHub <noreply@github.com>2025-04-02 04:05:18 +0000
commit9fb95d655393777dde5929182f94de36f903821d (patch)
tree4462f35895737460a01fab891a15f87aba2efb70 /inc/wb.h
parent24f0bd8af57381ab3112b5774d4ad23ac80f0718 (diff)
parent3eeb345d673bee6d62b04fc8a8a95ab822dc1e45 (diff)
Merge pull request #46 from bdunahu/bdunahu
Ensure all stages only do work if they are not 'OK'
Diffstat (limited to 'inc/wb.h')
-rw-r--r--inc/wb.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/inc/wb.h b/inc/wb.h
index 62cef17..c4755ea 100644
--- a/inc/wb.h
+++ b/inc/wb.h
@@ -14,9 +14,27 @@ class WB : public Stage
*/
WB(Stage *next);
using Stage::advance;
-
+
private:
void advance_helper() override;
+ /**
+ * Performs the actual work of storing into a register.
+ */
+ void write_handler();
+ /**
+ * Performs the actual work of processing a jump instruction.
+ */
+ void jump_handler();
+ /**
+ * @return true if the current instruction is an R or I type and is not a
+ * STORE.
+ */
+ bool should_write();
+ /**
+ * @return true if the current instruction is a J type and is not a push.
+ * STORE.
+ */
+ bool should_jump();
};
#endif /* WB_H_INCLUDED */