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/instrDTO.h | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'inc/instrDTO.h') diff --git a/inc/instrDTO.h b/inc/instrDTO.h index b6dec06..755ab9f 100644 --- a/inc/instrDTO.h +++ b/inc/instrDTO.h @@ -15,18 +15,15 @@ class InstrDTO InstrDTO(); ~InstrDTO() = default; - /** - * @return hist entry for Accessor - */ - int get_time_of(Accessor); - /** - * @return id_cycle - */ int get_id_cycle(); /** * @return instr_bits */ signed int get_instr_bits(); + /** + * @return checked_out + */ + signed int get_checked_out(); /** * @return s1 */ @@ -52,14 +49,14 @@ class InstrDTO */ unsigned int get_pc(); - /** - * @param set hist key - */ - void set_time_of(Accessor, int); /** * @param instr_bits */ void set_instr_bits(signed int); + /** + * @param checked_out + */ + void set_checked_out(signed int); /** * @param s1 */ @@ -87,14 +84,16 @@ class InstrDTO void set_pc(unsigned int pc); private: - /** - * The clock cycle each stage finished an operation. - */ - std::unordered_map hist; /** * The raw bits encoding the instruction. */ signed int instr_bits; + /** + * The register, if any, this instruction has checked out. A checked out + * register cannot be checked out by another register. This prevents RAW + * conflicts. + */ + signed int checked_out; /** * Slots in this instruction, for storing temporary registers, immediates, * or other. -- cgit v1.2.3