07-09-2014, 02:38 PM
make it a 2 stage clock. Simple when you get a branch instruction, the clock will take 2 cycles to complete it. You can use a simple PC, that once it reaches 2, it the updates the master PC.
So all instructions take one cycle, so in the first PC once it hits 1, then it updates the master PC,
Then you have your branch instruction, which takes 2 clock cycles. so the first PC will have to hit 2, before it updates the master PC.
So all instructions take one cycle, so in the first PC once it hits 1, then it updates the master PC,
Then you have your branch instruction, which takes 2 clock cycles. so the first PC will have to hit 2, before it updates the master PC.