In the following code snippet: Q9.txt, the ADDI instructions behave weirdly after the simulator went over the BEQ 0, 7, rst line.
Weirdly in the sense that the immediate is wrongly sent to the ALU, even though the instruction is correctly decoded.
It might be because the incriminated BEQ line does not correctly disable some multiplexers after executing, resulting in incorrect signals being sent to the ALU for ADDI instructions.
Adding a NOP after the faulty line solves the problem (but not the code, it's a non-working WIP), maybe the jump communicated to BEQ was too close for some reason.
In the following code snippet: Q9.txt, the
ADDIinstructions behave weirdly after the simulator went over theBEQ 0, 7, rstline.Weirdly in the sense that the immediate is wrongly sent to the ALU, even though the instruction is correctly decoded.
It might be because the incriminated
BEQline does not correctly disable some multiplexers after executing, resulting in incorrect signals being sent to the ALU forADDIinstructions.Adding a
NOPafter the faulty line solves the problem (but not the code, it's a non-working WIP), maybe the jump communicated toBEQwas too close for some reason.