From 94a0435da91501d2320d6081c552cb5df0c4433d Mon Sep 17 00:00:00 2001 From: bd Date: Thu, 17 Apr 2025 01:17:48 -0400 Subject: Keep track of checked out in DTO to simplify wb cond logic (bug) --- inc/id.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/id.h') diff --git a/inc/id.h b/inc/id.h index db22d7d..ed13771 100644 --- a/inc/id.h +++ b/inc/id.h @@ -41,7 +41,6 @@ class ID : public Stage std::vector stage_info() override; private: - void advance_helper() override; /** * Helper for `get_instr_fields` * Attempts to parse and dereference instruction arguments. Uses read and @@ -52,6 +51,7 @@ class ID : public Stage * @param the resulting second field. * @param the resulting third field. */ + void advance_helper() override; /** * Parse an instruction into a type, opcode, and fields. If the type is * invalid, only the type field will be set. -- cgit v1.2.3 From 430986b4b1ee1013db070991ce289176f48fa8e8 Mon Sep 17 00:00:00 2001 From: bd Date: Thu, 17 Apr 2025 02:23:37 -0400 Subject: Swap the source and destination registers for LOAD, final fix --- inc/id.h | 2 +- src/sim/wb.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'inc/id.h') diff --git a/inc/id.h b/inc/id.h index ed13771..c1810ae 100644 --- a/inc/id.h +++ b/inc/id.h @@ -67,7 +67,7 @@ class ID : public Stage * @param the resulting mnemonic. */ void get_instr_fields(signed int &s1, signed int &s2, signed int &s3, Mnemonic &m, Type &t); - void decode_R_type(signed int &s1, signed int &s2, signed int &s3); + void decode_R_type(signed int &s1, signed int &s2, signed int &s3, Mnemonic &m); void decode_I_type(signed int &s1, signed int &s2, signed int &s3, Mnemonic &m); void decode_J_type(signed int &s1, signed int &s2, signed int &s3); /** diff --git a/src/sim/wb.cc b/src/sim/wb.cc index 3fa7dd3..4e6b2b0 100644 --- a/src/sim/wb.cc +++ b/src/sim/wb.cc @@ -30,7 +30,6 @@ void WB::write_handler() this->checked_out.pop_front(); reg = this->curr_instr->get_checked_out(); - std::cout << "checked in: " << reg << std::endl; this->store_register(reg, this->curr_instr->get_s1()); } -- cgit v1.2.3