We're writing a mini processor that parses information according to instructions written to its' memory.
The first instruction (address 0 in memory) in our testbench is a while loop written as a branch equal: if (delimeter == 0) jump 0
.
In order to differentiate between the case of waiting for delimeter and a general case of branch equal (or branch not equal), we added a specific waiting_for_delimeter signal but the instruction fetching takes a clock cycle and because the pipeline inserts a NOP (no operation instruction) for a taken branch, in the next clock waiting_for_delimeter cannot be 1 because it "sees" a NOP and not the branch equal instruction.
Can someone please help us to solve this?
Thanks!