From d21a1a9caa1f1791343a5376121936e552b1124c Mon Sep 17 00:00:00 2001 From: bd Date: Sat, 29 Mar 2025 17:11:17 -0400 Subject: Fetch stage properly holds objects until parent is ready --- src/sim/stage.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/sim/stage.cc') diff --git a/src/sim/stage.cc b/src/sim/stage.cc index 8d9dfc0..48ee494 100644 --- a/src/sim/stage.cc +++ b/src/sim/stage.cc @@ -5,7 +5,14 @@ static Logger *global_log = Logger::getInstance(); -Stage::Stage(Stage *next) { this->next = next; } +Stage::Stage(Stage *next) +{ + this->next = next; + this->curr_instr = nullptr; + this->status = OK; +} + +Stage::~Stage() { delete this->next; }; std::array Stage::gprs; std::array Stage::vrs; @@ -19,7 +26,7 @@ Response Stage::check_out(unsigned int &v) { Response r; if (this->is_checked_out(v)) - r = STALLED; + r = BLOCKED; else { r = OK; v = this->check_out_register(v); -- cgit v1.2.3