Download - CONTROL UNIT ORGANIZATION
![Page 1: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/1.jpg)
CONTROL UNIT ORGANIZATION
popo
![Page 2: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/2.jpg)
CONTROL UNIT ORGANIZATION
• Instruction Execution• The CPU executes a sequence of instructions.• The execution of an instruction is organized as an instruction
cycle: it is performed in several steps;• Each step is executed as a set of several micro operations.• The task performed by any micro operation falls in one of the
following categories:• - Transfer data from one register to another;• - Transfer data from a register to an external interface (system bus);
• - Transfer data from an external interface to a register;• - Perform an arithmetic or logic operation, using registers for
input and output.
popo
![Page 3: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/3.jpg)
CONTROL UNIT ORGANIZATION • Instruction Execution
popo
![Page 4: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/4.jpg)
CONTROL UNIT ORGANIZATION
• Microoperations and Control Signals• In order to allow the execution of a microoperation,
one or several control signals have to be issued• Examples:• a) signals for transferring content of register R0 to R1:• R0out, R1in• b) signals for adding content of Y to that of R0 (result in
Z):• R0out, Add, Zin• The CPU executes an instruction as a sequence of
control steps.
popo
![Page 5: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/5.jpg)
CONTROL UNIT ORGANIZATION
• Microoperations and Control Signals• Instruction:• Add (R3), R1
popo
Step Action
1 PCout, MAR in , Read,Select4,Add, Zin
2 Zout, PC in , Y in , WMFC
3 MDRout, IR in
4 R3out , MAR in , Read
5 R1out , Y in , WMFC
6 MDRout, SelectY,Add, Zin
7 Zout, R1in , End
Figure7.6. Control sequenceforexecutionof theinstructionAdd (R3),R1.
![Page 6: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/6.jpg)
CONTROL UNIT ORGANIZATION
• The first (three) control steps are identical for each instruction; they perform instruction fetch and increment the PC.
• The following steps depend on the actual instruction (stored in the IR).
• If a control step issues a read, the value will be available in the MDR after one additional step.
• Several micro operations can be performed in the same control step if they don’t conflict
• (for example, only one of them is allowed to output on the bus)
popo
![Page 7: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/7.jpg)
CONTROL UNIT ORGANIZATION • Control Unit• The basic task of the control unit :• - For each instruction the control unit causes the CPU to go
through a sequence of control steps;• - in each control step the control unit issues a set of signals• The control unit is driven by the processor clock.• The signals to be generated at a certain moment depend on:• - the actual step to be executed;• - the condition and status flags of the processor;• - the actual instruction executed;• - external signals received on the system bus (e.g. interrupt
signal)
popo
![Page 8: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/8.jpg)
CONTROL UNIT ORGANIZATION
popo
![Page 9: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/9.jpg)
CONTROL UNIT ORGANIZATION • To execute instructions, the processor must
have some means of generating the control signals needed in the proper sequence.
• Three Techniques : • Hardwired control ,• Microprogrammed control and• PLA control • Hardwired system can operate at high speed;
but with little flexibility.
![Page 10: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/10.jpg)
Hardwired control• Each step in the sequence of execution is completed in
one clock period• A counter is used to keep track of the control steps• The control signals are determined by the following
information• Contents of the control step counter• Contents of the instruction register• Contents of the condition code flags• External input signal, such as MFC and interrupt
requests
![Page 11: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/11.jpg)
Control Unit Organization
Figure 7.10. Control unit organization.
CLKClock
Control step
IRencoder
Decoder/
Control signals
codes
counter
inputs
Condition
External
![Page 12: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/12.jpg)
Detailed Block Description
![Page 13: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/13.jpg)
Hardwired control• The step decoder provides a separate signal line for
each step or time slot in the control sequence• The output of the instruction decoder consists of
separate line for each machine instruction.• For any instruction loaded in the IR one of the
output line INS1 through INSm is set 1 • All other lines are set 0• Input signal to the decoder are combined to
generate the individual control signals Yin, Pcout, ADD End So on
![Page 14: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/14.jpg)
Hardwired control• An example of how the encoder generates the Zin
control signal for the processor organization show below
• Implementation of the logic function• Zin = T1 + T6 • ADD + T4 • BR + …• this signal is asserted during time slot T1 for all
instructions• During T6 for an Add instruction • During T4 for an unconditional branch instruction
and so on
![Page 15: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/15.jpg)
Generating Zin
• Zin = T1 + T6 • ADD + T4 • BR + …
Figure 7.12. Generation of the Zin control signal for the processor in Figure 7.1.
T1
AddBranch
T4 T6
![Page 16: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/16.jpg)
Hardwired control
• Another example shown below
• A circuit that generate the End control signal from the logic function
• End = T7 • ADD + T5 • BR + (T5 • N + T4 • N) • BRN +…
![Page 17: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/17.jpg)
Generating End
• End = T7 • ADD + T5 • BR + (T5 • N + T4 • N) • BRN +…
Figure 7.13. Generation of the End control signal.
T7
Add BranchBranch<0
T5
End
NN
T4T5
![Page 18: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/18.jpg)
Hardwired control
• The End instruction starts a new instruction fetch cycle by resetting the control signal step counter to its starting value
• The RUN set to 1 causes the counter to be incremented by one at the end of every clock cycle
• When RUN=0 the counter stops counting• It is needed when ever WMFC signal is issued, the
processor to wait the reply from memory
![Page 19: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/19.jpg)
Microprogrammed Control
![Page 20: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/20.jpg)
Microprogrammed Control• Control signals are generated by a program similar to machine language
programs.• Control Word (CW); micro routine; microinstruction
![Page 21: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/21.jpg)
Microprogrammed Control
Step Action
1 PCout, MAR in , Read,Select4,Add, Zin
2 Zout, PC in , Y in , WMFC
3 MDRout, IR in
4 R3out , MAR in , Read
5 R1out , Y in , WMFC
6 MDRout, SelectY,Add, Zin
7 Zout, R1in , End
Figure7.6. Control sequenceforexecutionof theinstructionAdd (R3),R1.
![Page 22: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/22.jpg)
Micro programmed Control
• Control word: (CW)- is a word whose individual bits represent the various control signal
• Each control steps in the control sequence defines a unique combinations of 0s and 1s in the CW
• Select Y is represented by select =0• Select 4 by select 1• Micro routine :Collection of CW to a machine
instructions• Micro instruction :Each control word
![Page 23: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/23.jpg)
Overview
• Control store
One functioncannot be carriedout by this simpleorganization.
![Page 24: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/24.jpg)
Micro programmed Control• The micro routines for all instructions are stored in
a special memory called control store• The control unit can generate signals by sequentially
reading CWs from the control store• To read Cws sequentially from control word a micro
program counter (μPC) is used • Every time a new instruction is loaded in the IR• Then μPC automatically incremented by the clock• Thus the control signal are generated various parts
of the processor
![Page 25: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/25.jpg)
PLA Control• Programmable logic array PLA• PLA is LSI device that can implemented any
complex combinational circuits• It is used to reduce the number of Ics and the no
of interconnection wires
![Page 26: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/26.jpg)
PLA Control
![Page 27: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/27.jpg)
PLA Control• An external sequence register establishes the
present state of the control circuit• The PLA output determine which • 1) Micro operations should be initiated, • 2) Depending on the external input conditions • 3) The present state of sequence register• At the same time other PLA outputs determine
the next state of the sequence register• Unwanted connections are "blown"
![Page 28: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/28.jpg)
CONTROL UNIT ORGANIZATION
popo
![Page 29: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/29.jpg)
PLA
ANDArray
ORArray
••••
••
••••••
•••
n InputLines
m Output LinesK WordLines
PLA
![Page 30: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/30.jpg)
A
A’
Inputs
B
B’
C
C’
AND ARRAY
OR ARRAY
F0 F1 F2 F3
Outputs
A’B’
AC’
B
BC’
AC
Internal Structure of PLA
![Page 31: CONTROL UNIT ORGANIZATION](https://reader037.vdocuments.site/reader037/viewer/2022110103/56814368550346895dafe3bb/html5/thumbnails/31.jpg)
CONTROL UNIT ORGANIZATION
popo