Close

Branch Correction Correction

A project log for 32 bit MIPS CPU

A five stage CPU core based on the MIPS instruction set

reed-fosterReed Foster 03/26/2016 at 16:340 Comments

Debugging

As I was running some test code, I discovered that stale register data was being used to execute the jump register instruction. The fix for this was simple; I added a "new $s" signal from the forwarding registers to the branch correction. In addition, I also tidied up and simplified the branch correction.

Old Branch Correction

New Branch Correction

This simplified design is not only easier to understand, but it is also faster because there is no longer a chain of multiplexers that the "PCNext" signal has to propagate through.

Discussions