HW2 Task3 RTL programing Simplified CPU architecture SPEC AL
Solution
To keep this as easy as moderately doable, we tend to think about an easy instruction format within which each instruction is entirely depicted in one word. That is, the word is split into fields like \"opcode\", \"register number\", and \"memory address\", that area unit forever identical for all directions, quite in contrast to the PDP-11 case. what is more, the memory address seems directly within the instruction word, not during a subsequent word (perhaps the words area unit wider than sixteen bits).
Here may be a easy one-bus design we\'ll use for many of our examples during this course. knowledge ways depicted by the big arrows (namely, every arrow to or from the bus aside from the ALU input, and Zin) correspond to microprogram management lines.
Control lines additionally embrace browse and Write (memory functions), Wait MFC, the ALU functions, Set CC, Set Carry-In, carry-over, Zero A, Complement B, and End.
Set CC causes the condition codes to be set by this ALU operation. That is, it is the water level for the condition code register.
Carry-Forward causes the C condition code to be equipped as Carry-In (i.e. the perform from a previous ALU operation is equipped because the carry in to the new ALU operation). Set Carry-In provides associate unconditional \'1\' as Carry-In.
\"Zero A\" provides a zero price to the ALU which might be employed in identical cycle, while not moving the contents of Y. That is, Zero A overrides the Y output with a zero price.
\"Complement B\" flips all of the bits within the \'B\' ALU input (the one from the bus). This helps with two\'s-complement subtraction (which sometimes then additionally uses Set Carry-In to feature one).
End makes this microinstruction the last microinstruction of the microroutine by resetting the µPC.
There also are eight conditional microbranch management lines, of the shape \"If C then End\", \"If C\' then End\", so on for all of C, V, Z, and N. ALU operations solely set the condition codes if the Set CC bit is on (else we tend to could not implement branch directions with associate offset while not ruin the condition codes!). Note that once a microbranch is taken, this microinstruction still completes, even as it will with the top management line.
