Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Hardwiredcontrl unit, Exams of Advanced Computer Architecture

notes on hardwired control unit

Typology: Exams

2015/2016

Uploaded on 09/21/2016

sandeep_kumar
sandeep_kumar 🇮🇳

1 document

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Design of Control Unit
To execute an instruction, the control unit of the CPU must generate the required control
signal in the proper sequence. As for example, during the fetch phase, CPU has to generate
PCout signal along with other required signal in the first clock pulse. In the second clock pulse
CPU has to generate PCin signal along with other required signals. So, during fetch phase, the
proper sequence for generating the signal to retrieve from and store to PC is PCout and PCin.
To generate the control signal in proper sequence, a wide variety of techniques exist. Most of
these techniques, howeve, fall into one of the two categories,
.1 Hardwired Control
.2 Microprogrammed Control.
Hardwired Control
1. In this hardwired control techniques, the control signals are generated by means of
hardwired circuit. The main objective of control unit is to generate the control signal
in proper sequence.
Consider the sequence of control signal required to execute the ADD instruction that is
explained in previous lecture. It is obvious that eight non-overlapping time slots are
required for proper execution of the instruction represented by this sequence.
Each time slot must be at least long enough for the function specified in the
corresponding step to be completed. Since, the control unit is implemented by
hardwire device and every device is having a propagation delay, due to which it
requires some time to get the stable output signal at the output port after giving the input
signal. So, to find out the time slot is a complicated design task.
2. For the moment, for simplicity, let us assume that all slots are equal in time duration.
Therefore the required controller may be implemented based upon the use of a
counter driven by a clock.
3. Each state, or count, of this counter corresponds to one of the steps of the control
sequence of the instructions of the CPU.
4. By looking into the design of the CPU, we may say that there are various
instruction for add operation. As for example,
ADD NUM R1 Add the contents of memory location specified by NUM
to the contents
of register R1
R1<-R1+[NUM]
ADD R2R1 Add the contents of register R2 to the contents of register R1.
R1<-R1+R2
The control sequence for execution of these two ADD instructions is dierent. Of
course, the fetch phase of all the instructions remains same.
It is clear that control signals depend on the instruction, i.e., the contents of the
instruction register. It is also observed that execution of some of the instructions
depend on the contents of condition code or status ag register, where the
control sequence depends in conditional branch instruction.
pf3
pf4

Partial preview of the text

Download Hardwiredcontrl unit and more Exams Advanced Computer Architecture in PDF only on Docsity!

Design of Control Unit To execute an instruction, the control unit of the CPU must generate the required control signal in the proper sequence. As for example, during the fetch phase, CPU has to generate PCout signal along with other required signal in the first clock pulse. In the second clock pulse CPU has to generate PC (^) in signal along with other required signals. So, during fetch phase, the

proper sequence for generating the signal to retrieve from and store to PC is PCout and PC (^) in.

To generate the control signal in proper sequence, a wide variety of techniques exist. Most of these techniques, howeve, fall into one of the two categories, .1 Hardwired Control

.2 Microprogrammed Control. Hardwired Control

  1. In this hardwired control techniques, the control signals are generated by means of hardwired circuit. The main objective of control unit is to generate the control signal in proper sequence.

Consider the sequence of control signal required to execute the ADD instruction that is explained in previous lecture. It is obvious that eight non-overlapping time slots are required for proper execution of the instruction represented by this sequence.

Each time slot must be at least long enough for the function specified in the corresponding step to be completed. Since, the control unit is implemented by hardwire device and every device is having a propagation delay, due to which it requires some time to get the stable output signal at the output port after giving the input signal. So, to find out the time slot is a complicated design task.

  1. (^) For the moment, for simplicity, let us assume that all slots are equal in time duration. Therefore the required controller may be implemented based upon the use of a counter driven by a clock.
  2. Each state, or count, of this counter corresponds to one of the steps of the control sequence of the instructions of the CPU.
  3. By looking into the design of the CPU, we may say that there are various instruction for add operation. As for example,

ADD NUM R 1 Add the contents of memory location specified by NUM to the contents of register R (^1) R1<-R1+[NUM]

ADD R 2 R 1 Add the contents of register R 2 to the contents of register R (^) 1. R1<-R1+R

The control sequence for execution of these two ADD instructions is different. Of course, the fetch phase of all the instructions remains same.

It is clear that control signals depend on the instruction, i.e., the contents of the instruction register. It is also observed that execution of some of the instructions depend on the contents of condition code or status flag register, where the control sequence depends in conditional branch instruction.

Hence, the required control signals are uniquely determined by the following information:

  • Contents of the control counter.
  • Contents of the instruction register.
  • Contents of the condition code and other status flags. The external inputs represent the state of the CPU and various control lines connected to it, such as MFC status signal. The condition codes/ status flags indicates the state of the CPU. These include the status flags like carry, overflow, zero, etc.

Control Unit Organization

Figure: Organization of control unit. The structure of control unit can be represented in a simplified view by putting it in block diagram. The detailed hardware involved may be explored step by step. The simplified view of the control unit is given in above fig. The decoder/encoder block is simply a combinational circuit that generates the required control outputs depending on the state of all its input. The decoder part of decoder/encoder part provide a separate signal line for each control step, or time slot in the control sequence. Similarly, the output of the instructor decoder (The Instruction Decoder reads the next instruction in from memory, and sends the component pieces of that instruction to the necessary destinations.) consists of a separate line for each machine instruction loaded in the IR, one of the output line INS 1 to INSm is set to 1 and all other lines are set to 0. The detailed view of the control unit organization is shown in the Figure

All input signals to the encoder block should be combined to generate the individual control signals. In the previous section, we have mentioned the control sequence of the instruction, "Add contents of memory location address in memory direct made to register R 1 ( ADD_MD)",

"Control sequence for an unconditional branch instruction ( BR)",

also, we have mentioned about Branch on negative ( BRN).

Consider those three CPU instructions ADD_MD, BR , BRN.

It is required to generate many control signals by the control unit. These are basically coming out from the encoder circuit of the control signal generator. The control signals are: PCin , PCout , Zin, Zout , MAR (^) in , ADD, END , etc.

  • By looking into the above three instructions, we can write the logic function for Z (^) in as :
  • Z (^) in = T 1 + T 6. ADD_MD + T5. BR + T5. BRN +..............

in the next control step, the WMFC signal goes low and control unit operates normally till the next memory access signal is generated.

The timing diagram for an instruction fetch operation is shown in the Figure