diff options
author | bd <bdunahu@operationnull.com> | 2025-03-29 20:49:32 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-29 20:49:32 -0400 |
commit | 4055b56b5d06e0188d764380d67e40b5b07359ac (patch) | |
tree | dd6ae93279b5922761b9ec36f39f54d3248d9d1e /inc/id.h | |
parent | 24a7d608aa84d6549a52e54726e1379e97cac146 (diff) |
Add advance logic for decode
Diffstat (limited to 'inc/id.h')
-rw-r--r-- | inc/id.h | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -17,6 +17,10 @@ class ID : public Stage Response advance(InstrDTO &next_instr, Response p) override; + /* The following methods are made public so that they may be tested, and are + * not to be called from outside classes during standard execution. + */ + /** * Parse an instruction into a type, opcode, and fields. If the type is * invalid, only the type field will be set. @@ -33,11 +37,6 @@ class ID : public Stage */ void get_instr_fields( signed int &s1, signed int &s2, signed int &s3, Mnemonic &m); - - /* The following methods are made public so that they may be tested, and are - * not to be called from outside classes during standard execution. - */ - /** * Facilitates register checkout and data hazard management. * It does this by checking that the register passed in is not currently @@ -57,11 +56,15 @@ class ID : public Stage void write_guard(signed int &r); private: - // TODO write me /** - * Helper for `` - * Attempts to parse and dereference instruction arguments. If a desc - + * Decodes `curr_instr` and sets status to BLOCKED if a data hazard occurs. + */ + void advance_helper(); + /** + * Helper for `get_instr_fields` + * Attempts to parse and dereference instruction arguments. Uses read and + * write guards to prevent RAW conflicts. + * * @param the resulting first field. To call this function properly, this * field must contain the section of the instruction to be parsed. * @param the resulting second field. |