284 Computer Architecture and Organization
Solution
To solve this problem and to design the control unit, we assume that the opcode is only two-bit wide, as
shown in Figure 9.9 (c). The basic structure of the unit would be similar to that as shown in Figure 9.5 .
The system clock signal would be one of the two inputs of the control unit, which would govern the sequence
of activities of relevant control signals. These control signals are to be generated as per the requirement of
opcodes, which would be the other input for the control signal generation. For this purpose some instruction
decoder would be necessary. The basic scheme of the overall system is presented in Figure 9.10 .
Note that in Figure 9.10 , two void rectangles (lightly shaded) are shown. The larger of the two rect-
angles represent the control unit, whose hardware details we are going to design step-by-step. The other
one, the smaller rectangle represents the instruction decoder. Also note that all desired output signals
from the control unit are marked properly. Input for the instruction decoder would be derived from the
ongoing opcode, assumed to be loaded and available within the IR. Output from a 2-bit binary up-counter
driven by the system clock would be one of the inputs of the control unit.
Step 1 Instruction decoder
Our rst step should be to take up the design of the instruction decoder. From Figure 9.9 , we nd that
LSB (O0) of the 2-bit opcode indicates the concerned register, either Y or X for all instructions. If this
LSB is 0 then register Y is indicated. If this bit is 1, then register Z is indicated. On the other hand, the
MSB of the 2-bit opcode (O1) indicates the type of instruction, either loading or saving register B. If this
is a case of loading register B, then this MSB of opcode is 0. On the other hand, for a case of saving B,
this bit becomes 1. Note that there is no other direct correlation between these opcode bits. Therefore,
each of these two bits of the opcode (available within instruction register) may be individually decoded
as either inverted or non-inverted, as shown in Figure 9.11 . This scheme of decoding generates four
output signals from the instruction decoder block, which are fed to the control unit.
Step 2 Timings
To design the control unit, we start with the timing sequences. From Figure 9.9 (d), we may observe that
all control signals (a total of six) are active during either t1 or t2 time-slots. During other time-slots, i.e.,
t0 and t3 , all of them remain high and inactive. Moreover, the enabling signals, namely Ey, Ez and Eb,
are active in both t1 and t2 time-slots, while the latching signals, namely Lb, Ly and Lz are active during
t2 time-slot only. Therefore, from the four time-slots ( t0 , t1 , t2 and t3 ) generated by the 2-bit up-counter,
we need to generate some signals, which would indicate these time-slots properly. Note that these two
time-slices are darkly shaded in the counter-output timing diagrams in Figure 9.11 .
Figure 9.9 Registers, data path, instruction details and control signals for example
problem
M09_GHOS1557_01_SE_C09.indd 284M09_GHOS1557_01_SE_C09.indd 284 4/29/11 5:17 PM4/29/11 5:17 PM