Microinstructions - Binus Repository

advertisement
Matakuliah
Tahun
Versi
: H0344/Organisasi dan Arsitektur Komputer
: 2005
: 1/1
Pertemuan 20
Microprogrammed Control
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Menjelaskan konsep dasar
microprogrammed control
2
Outline Materi
•
•
•
•
Basic Concepts
Microinstruction Sequencing
Microinstruction Execution
Application of Microprogramming
3
Basic concepts
Microinstructions
Typical microinstruction formats
Microinstruction Address
Jump condition
- Unconditional
- Zero
- Overflow
- Indirect bit
System bus control signals
Internal CPU control signal
Microinstruction Address
Jump condition
Function codes
4
Basic concepts
Fetch cycle
routine
Jump to indirect or execute
Organization of
control memory
Indirect
cycle routine
Jump to execute
Interrput
cycle routine
Jump to fetch
Jump to opcode routine
Execute cycle beginning
AND routine
Jump to fetch or interrupt
ADD cycle
routine
Jump to fetch or interrupt
IOF cycle
routine
Jump to fetch or interrupt
5
Basic concepts
Control unit microinstruction
Sequencing
logic
Control address
register
Read
Control unit
Control buffer
register
6
Instruction register
Basic concepts
Functioning of
microprogrammed
ALU Flag
Clock
Control Unit
Decoder
Sequencing
logic
Control address
register
control unit
Read
Control unit
Control buffer
register
Decoder
Control signals
within CPU
Control signals
to system bus
7
Basic concepts
Wilkes’s microprogrammed control unit
From instruction
regsiter
Register II
Clock
Register I
Clock
Address
decoder
Conditional
signal
Control signals
8
Basic concepts
Advantages and disadvantage
The principal advantage of the use of microprogramming to
implement a control unit is that it simplifies the design of control
unit. Thus it is both cheaper and less error-prone to implement.
A hardwired control unit must contain complex logic for
sequencing through the many micro-operations of instruction
cycle. On the other hand, the decoder and sequencing logic unit
of a microprogrammed control unit are very simple pieces of
logic.
9
Microinstruction sequencing
The two basic tasks performed by microprogrammed
control unit as follows:
1. Microinstruction sequencing
2. Microinstruction execution
10
Microinstruction sequencing
Design considerations
Two concerns are involved in he design of microinstruction
sequencing technique: the size of microinstruction and addressgeneration time. The first concern is obvious: minimizing the size
of the control memory reduces the cost of that component. The
second concern is simply a desire to execute microinstruction as
fast possible.
In executing, a microprogram, the address of the next
microinstruction to be executed is in one of these categories:
1. Determined by instruction register
2. Next sequential address
3. Branch
11
Microinstruction sequencing
Sequencing techniques
1. Two address fields
2. Single address field
3. Variable format
12
Microinstruction sequencing
CAR
Branch control logic,
two address fields
Address decoder
Control
memory
CBR
Flags
Control
Branch
logic
Address
1
Address
2
Multiplexer
Address
selection
IR
13
Microinstruction sequencing
Branch control logic,
Address decoder
single address field
Control
memory
CBR
Flags
Control
Branch
logic
Address 1
+1
CAR
Multiplexer
Address
selection
IR
14
Microinstruction sequencing
Address decoder
Branch control logic,
Variable format
Control
memory
CBR
Branch
control
field
Enable
Flags
Entire
field
Address
field
Gate and
function
logic
+1
Branch
logic
Multiplexer
CAR
Address
selection
IR
15
Microinstruction sequencing
Address generation
Explicit
Implicit
Two field
Mapping
Unconditional branch
Addition
Conditional branch
Residual control
16
Microinstruction executing
Instruction register
Control unit organization
ALU Flag
Clock
Sequencing
logic
Control address
register
Control memory
Control buffer
register
Control logic
Internal
control
signals
External
control
signals
17
Microinstruction executing
The microinstruction spectrum
Characteristics
Unencoded
Highly encoded
Many bits
Few bits
Detailed view hardware
Aggregated view of hardware
Difficult to program
Easy to program
Concurrency fully exploited
Concurrency not fully exploited
Little or no control logic
Complex control logic
Fast execution
Slow execution
Optimize performance
Optimize programming
Terminology
Unpacked
Packed
Horizontal
Vertical
Hard
Soft
18
Microinstruction executing
Microinstruction encoding
Field
Decode
logic
Field
Decode
logic
Field
Field
Field
Decode
logic
Decode
logic
Decode
logic
Decode
logic
Decode
logic
Field
Decode
logic
Control signals
Control signals
(a) Direct encoding
(b) Indirect encoding
19
Microinstruction executing
Vertical microinstruction
repertoire
Special sequencing operations
0
1
0
0
0
0
0
0
CSAR  Decoded MDR
0
1
0
0
0
1
0
0
CSAR  Constant (in next byte)
0
1
0
0
1
0
0
0
Skip
Simple register transfers
0
0
0
0
0
MDR  Register
0
0
0
0
0
0
1
Register  MDR
0
0
0
0
1
0
MAR  Register
ALU operations
0
1
1
0
0
0
ACC  ACC + Register
0
1
1
0
0
1
ACC  ACC - Register
Register select
Memory operation
0
0
1
0
0
0
0
0
Read
0
1
1
0
1
0
ACC  Register
0
0
1
0
0
1
0
0
Write
0
1
1
0
1
1
Regsiter  ACC
0
1
1
1
0
0
ACC  Register + 1
Register select
20
Microinstruction executing
Horizontal microinstruction
repertoire
0
Field
1
1
2
3
2
4
5
3
6
7
4
8
9
10 11 12 13 14 15 16 17 18
5
6
Field definition
1 - Register transfer
2 - Memory operation
3 - Sequencing operation
4 - ALU operation
5 - Register selection
6 - Constant
21
Applications of microprogramming
The set of current applications for microprogramming includes
• Realization of computers
• Emulation
• Operating system support
• Realization of special-purpose devices
• High level language support
• Micro diagnostics
• User tailoring
22
Download