What happens in each clock cycle instruction?
For any register if it is enabled, then its input must be correct
For every instruction, we will do “something: during the first clock cycle of its execution
We only need 4 cycles to complete ADD, SUB, and NAND
[IR] = Mem[PC]
IRload
)IR = Mem[[PC]] - load the instruction register with the contents of the memory location given by the program counter
Also called Fetch the instruction - do this for all instructions
[IR] = Mem[[PC]]
[PC] = [PC] + 1
Clever optimization- had said that PC = PC +1 happens at end, but since we always do this, we can do that at the same time we’re fetching PC → saves time
Register A = RF[IR7..6]
indicates a register file read operationDecode: look at the instruction and figure out which it is, so know what to do next
Register A = RF[[IR7..6]]
Register B = RF[[IR5..4]]
Another clever optimization:
Control signals to activate to do this: