diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-03-29 22:14:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-29 22:14:42 -0400 |
commit | d20623d031cf909d8892c2db38cf2e2e02bc6a9b (patch) | |
tree | 56ef4ae4325a5b803c484a3e5c8d87b89572cedf /src/sim/instrDTO.cc | |
parent | caeff52f029920e027d18bc01149425560801f82 (diff) | |
parent | 1250c3765f59801d060152d5f6eed0a9faa11b50 (diff) |
Merge pull request #37 from bdunahu/bdunahu
Instr, InstrDTO gets/sets, other structures required for decode
-- tests as we move forward
-- base classes
-- decode stage implemented
Diffstat (limited to 'src/sim/instrDTO.cc')
-rw-r--r-- | src/sim/instrDTO.cc | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/sim/instrDTO.cc b/src/sim/instrDTO.cc index 6427b1a..5a7fe3b 100644 --- a/src/sim/instrDTO.cc +++ b/src/sim/instrDTO.cc @@ -1,15 +1,35 @@ #include "instrDTO.h" +#include "accessor.h" InstrDTO::InstrDTO() { - this->if_cycle = 0; this->instr_bits = 0; + this->s1 = 0; + this->s2 = 0; + this->s3 = 0; + this->mnemonic = NOP; } -int InstrDTO::get_if_cycle() { return this->if_cycle; } +int InstrDTO::get_time_of(Accessor a) { return this->hist[a]; } signed int InstrDTO::get_instr_bits() { return this->instr_bits; } -void InstrDTO::set_if_cycle(int cycle) { this->if_cycle = cycle; } +signed int InstrDTO::get_s1() { return this->s1; } + +signed int InstrDTO::get_s2() { return this->s2; } + +signed int InstrDTO::get_s3() { return this->s3; } + +Mnemonic InstrDTO::get_mnemonic() { return this->mnemonic; } + +void InstrDTO::set_time_of(Accessor a, int i) { this->hist[a] = i; } void InstrDTO::set_instr_bits(signed int instr) { this->instr_bits = instr; } + +void InstrDTO::set_s1(signed int s) { this->s1 = s; } + +void InstrDTO::set_s2(signed int s) { this->s2 = s; } + +void InstrDTO::set_s3(signed int s) { this->s3 = s; } + +void InstrDTO::set_mnemonic(Mnemonic m) { this->mnemonic = m; } |