summaryrefslogtreecommitdiff
path: root/inc/instrDTO.h
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-27 20:47:44 -0400
committerbd <bdunahu@operationnull.com>2025-03-27 20:47:44 -0400
commit043c2566c112f0d913c52aa80c9fcc4da5fb11ae (patch)
tree65afb024ab26d4731487343d553db961a8dc6659 /inc/instrDTO.h
parenteaa87e9fcd90c00d6261cbdb854efb7a09467f1d (diff)
Use an unordered map to record pipe stage history on instructions
Diffstat (limited to 'inc/instrDTO.h')
-rw-r--r--inc/instrDTO.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/inc/instrDTO.h b/inc/instrDTO.h
index 7f2c688..2a6ab1f 100644
--- a/inc/instrDTO.h
+++ b/inc/instrDTO.h
@@ -2,6 +2,8 @@
#define INSTRDTO_H
#include <string>
#include <functional>
+#include <unordered_map>
+#include "accessor.h"
class InstrDTO
{
@@ -13,9 +15,9 @@ class InstrDTO
~InstrDTO() = default;
/**
- * @return if_cycle
+ * @return hist entry for Accessor
*/
- int get_if_cycle();
+ int get_time_of(Accessor);
/**
* @return id_cycle
*/
@@ -42,13 +44,9 @@ class InstrDTO
std::string get_oper_name();
/**
- * @param if_cycle
+ * @param set hist key
*/
- void set_if_cycle(int);
- /**
- * @param id_cycle
- */
- void set_id_cycle(int);
+ void set_time_of(Accessor, int);
/**
* @param instr_bits
*/
@@ -68,13 +66,9 @@ class InstrDTO
private:
/**
- * The clock cycle this instruction finished being fetched.
- */
- int if_cycle;
- /**
- * The clock cycle this instruction finished being identified.
+ * The clock cycle each stage finished an operation.
*/
- int id_cycle;
+ std::unordered_map<Accessor, int> hist;
/**
* The raw bits encoding the instruction.
*/