diff options
author | bd <bdunahu@operationnull.com> | 2025-05-10 17:02:27 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-05-10 17:02:27 -0400 |
commit | f0f773a1f2acc3030c89fc5aa6335f667987aa2a (patch) | |
tree | e3f27a3e6d78a9f15ce6fb1b6f3b40202aa5ab3e /src | |
parent | 5beea0c476101ec7b122f3b2181d92ce096492fb (diff) |
Fix issue where decode would overwrite raw bits while in use
Diffstat (limited to 'src')
-rw-r--r-- | src/controller.cc | 1 | ||||
-rw-r--r-- | src/ex.cc | 2 | ||||
-rw-r--r-- | src/id.cc | 5 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/controller.cc b/src/controller.cc index e439b30..190d3e2 100644 --- a/src/controller.cc +++ b/src/controller.cc @@ -32,6 +32,7 @@ Controller::Controller(Stage *stage, Storage *storage, bool is_pipelined) this->checked_out = {}; this->gprs = {0}; this->vrs.fill({0}); + this->vrs.at(0).fill(1); // constant 1 vector register this->gprs.at(2) = MEM_WORDS; // set the stack pointer } @@ -50,7 +50,7 @@ void EX::advance_helper() v_base_addr = this->curr_instr->operands.load_store_vector.base_addr; } - v_len = this->curr_instr->slot_A; + v_len = this->curr_instr->slot_B; if (v_len == 0) { // clear destination vector reg v1.fill(0); @@ -49,7 +49,6 @@ void ID::get_instr_fields(signed int instr_bits) this->decode_J_type(instr_bits); break; case 0b11: - this->curr_instr->mnemonic = NOP; this->status = OK; } @@ -79,9 +78,9 @@ Response ID::set_vlen() vlen_reg = vlen_reg & 0xf; if (r == OK) { if (vlen_reg > V_R_LIMIT) { - this->curr_instr->slot_A = V_R_LIMIT; + this->curr_instr->slot_B = V_R_LIMIT; } else { - this->curr_instr->slot_A = vlen_reg; + this->curr_instr->slot_B = vlen_reg; } } return r; |