Background: Consider a machine with variable-length instructions based on an 8-bit (1 byte) instruction syllable. The first 2 bits of the first byte of each instruction encode the instruction length:
_______________ __ |___|___________|__ ... | L | other | optional information additional bytes L = 00 -- length 1 L = 01 -- length 2 L = 10 -- length 2 L = 11 -- length 3
The following naming convention may be useful: The first pipe is P1, the second is P2. The first byte of the instruction fed into P1 is P1B1. The multiplexor used to select the third byte input to the second pipe is P2B3mux, and this name is also used for the control input to the multiplexor. Bits of the instruction register are (from left to right) I1B1 to I1B8 for the 8 bits of the first byte, and so on. V1 is the valid bit on the first byte of the instruction register, and S1 is the stall signal from the first pipe.
Part A: Give a diagram showing the relevant registers and data paths used to control the routing of instruction bytes from the instruction register to the next stages of the two pipelines.
Part B: Give the column labels on the truth-table for the function that controls the multiplexors you identified in part A. The inputs to this function must include everything relevant to the routing problem, and the outputs will be multiplexor controls for each of the multiplexors.
Part C: Assume that no optimization is applied to the truth-table in part B. That is, assume that it is simply stored in a ROM inside the CPU. How big is this ROM?
Part D: Give the contents of 2 rows of this ROM in order to demonstrate that you understand how to work out the remaining rows.
Part A: Does this alternative model offer a potential performance advantage? Why or why not?
Part B: Does this alternative model pose potential problems for interrupt and trap handlers? Explain!