diff options
Diffstat (limited to 'src/if.cc')
-rw-r--r-- | src/if.cc | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -27,7 +27,7 @@ InstrDTO *IF::advance(Response p) this->advance_helper(); if (this->curr_instr != nullptr && p == WAIT) { // don't increment PC if the PC was just set by wb - if (this->curr_instr->is_squashed() != 1) + if (this->curr_instr->is_squashed != 1) ++this->pc; r = new InstrDTO(*this->curr_instr); delete curr_instr; @@ -40,8 +40,8 @@ InstrDTO *IF::advance(Response p) std::vector<int> IF::stage_info() { std::vector<int> info; if(this->curr_instr){ - info.push_back(this->curr_instr->is_squashed()); - info.push_back(this->curr_instr->get_instr_bits()); + info.push_back(this->curr_instr->is_squashed); + info.push_back(this->curr_instr->slot_A); } return info; } @@ -57,8 +57,12 @@ void IF::advance_helper() r = i ? OK : STALLED; if (r == OK) { this->curr_instr = new InstrDTO(); - this->curr_instr->set_instr_bits(bits); - this->curr_instr->set_pc(this->pc); + this->curr_instr->slot_A = bits; + this->curr_instr->slot_B = this->pc; + this->curr_instr->type = INV; + this->curr_instr->is_squashed = 0; + this->curr_instr->checked_out = -1; + this->curr_instr->mnemonic = ADD; this->is_empty = false; } } |