CH 04
CH 04
Computer Architecture
Harimohan Khatri
Control Unit
• Control of the processor
• Hardwired control unit
• Control unit inputs
• Control unit logic
• Microinstruction format
• Microprogrammed control unit
• Micro instructions and its types
• Architecture of micro programmed control unit
• Micro instruction sequencing
• Micro inctruction execution
• Applications of hardwired and micro programmed control unit
BECE - PU 1
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
BECE - PU 2
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
BECE - PU 3
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
Control Unit
• For control unit to perform its
function, it must have inputs
that allow it to determine the
state of the system and outputs
that allow it to control the
behavior of the system. These
are the external specifications
of the control unit.
• Internally, the control unit
must have the logic required to
perform its sequencing and Figure: Block Diagram of the Control Unit
execution functions.
BECE - PU 4
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
10
BECE - PU 5
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
11
12
BECE - PU 6
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
13
14
BECE - PU 7
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
Recommened reading
• The Intel 8085 control signals – W. Stalling, Computer Organization
and architecture 10th edition. Page no. 720-727
15
16
BECE - PU 8
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
17
18
BECE - PU 9
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
19
20
BECE - PU 10
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
21
Rectangular signal
from quarz Instruction
generator decoder
Control
Control
Next control signal for
Timing signal
state other
Unit generation
generator computer
matrix
unit
Flags and External
variables signals
22
BECE - PU 11
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
23
24
BECE - PU 12
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
25
26
BECE - PU 13
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
Micro-progammed control
• For any micro-operation, each control line emanating from the
control unit is either on or off. This condition can be represented by a
binary digit for each control line.
• So we could construct a control word in which each bit represents
one control line. Then each micro-operation would be represented by
a different pattern of 1s and 0s in the control word.
27
28
BECE - PU 14
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
29
30
BECE - PU 15
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
31
32
BECE - PU 16
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
33
34
BECE - PU 17
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
35
Figure: Functioning of
Microprogrammed Control Unit
36
BECE - PU 18
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
37
38
BECE - PU 19
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
39
40
BECE - PU 20
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
Sequencing techniques
• Based on the current microinstruction, condition flag, and the
contents of the instruction register, a control memory address
must be generated for the next microinstruction.
• We can group them into three general categories:
• Two address field
• Single address field
• Variable address field
• These categories are based on the format of the address
information in the microinstruction.
41
42
BECE - PU 21
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
43
44
BECE - PU 22
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
45
46
BECE - PU 23
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
47
48
BECE - PU 24
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
Address generation
• Next address derivation can be divided into
• Explicit techniques, in which the address is explicitly available in the
microinstruction, and
• Implicit techniques, which require additional logic to generate the address.
49
Address generation
• We essentially deal with the explicit techniques. With a two-field approach,
two alternative addresses are available with each microinstruction.
• Using either a single address field or a variable format, various branch
instructions can be implemented.
• Several implicit techniques are also commonly used. One of these,
mapping, is required with virtually all designs. The opcode portion of a
machine instruction must be mapped into a microinstruction address. This
occurs only once per instruction cycle.
• A common implicit technique is one that involves combining or adding two
portions of an address to form the complete address.
• Residual control approach involves the use of a microinstruction address
that has previously been saved in temporary storage within the control
unit.
50
BECE - PU 25
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
Microinstruction encoding
• In practice, microprogrammed control units are not designed using a
pure unencoded or horizontal microinstruction format.
• At least some degree of encoding is used to reduce control memory
width and to simplify the task of microprogramming.
• Microinstruction encoding is done in two approaches:
• Direct encoding
• Indirect encoding
51
52
BECE - PU 26
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
53
54
BECE - PU 27
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
55
56
BECE - PU 28
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
Microinstruction execution
• The micro-instruction is the basic event on the micro programmed
processor. Each cycle is made up of two parts: fetch & execute.
• The fetch portion is determined by the generation of micro
instruction address. The effect of execution of a micro-instruction is
to generate control signals.
• Some of these signals control point interval to the processor. The
remaining signals go to the external control bus or other external
interface.
• As an incidental function, the address of next microinstruction is
determined.
57
Microinstruction execution
• The sequencing logic module contains the logic to perform functions.
• It generates address of next micro instruction, using as inputs: the
instruction register, ALU flags, the control address register(for
incrementing), and the control buffer register.
• Control buffer register provide an actual address, control bits or both.
• The module is driven by clock that determines the timing of micro
instruction cycle.
• The control logic module generates control signals as a function of some of
the bits in the micro instruction.
• The format and content of micro instruction determines complexity of
control logic module.
58
BECE - PU 29
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
59
60
BECE - PU 30
Computer Architecture - Harimohan Khatri Monday, May 27, 2024
END OF CHAPTER - 04
References:
§ Computer Organization and Architecture – William Stallings
§ Compiled lecture notes from Pokhara University Constituent/Affiliated colleges.
§ Different internet sources for diagrams and figures.
61
BECE - PU 31