1 Pertemuan 20 Microprogrammed Control Matakuliah: H0344/Organisasi dan Arsitektur Komputer Tahun:...
-
date post
22-Dec-2015 -
Category
Documents
-
view
221 -
download
0
Transcript of 1 Pertemuan 20 Microprogrammed Control Matakuliah: H0344/Organisasi dan Arsitektur Komputer Tahun:...
1
Pertemuan 20Microprogrammed Control
Matakuliah : H0344/Organisasi dan Arsitektur Komputer
Tahun : 2005
Versi : 1/1
2
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Menjelaskan konsep dasar microprogrammed control
3
Outline Materi
• Basic Concepts
• Microinstruction Sequencing
• Microinstruction Execution
• Application of Microprogramming
4
Basic conceptsMicroinstructions
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
5
Basic conceptsOrganization of
control memory
Jump to indirect or execute
Jump to execute
Jump to fetch
Jump to opcode routine
Jump to fetch or interrupt
Jump to fetch or interrupt
Jump to fetch or interrupt
Fetch cycleroutine
Indirectcycle routine
Interrputcycle routine
Execute cycle beginning
AND routine
ADD cycleroutine
IOF cycleroutine
6
Basic conceptsControl unit microinstruction
Sequencinglogic
Control addressregister
Control unit
Control bufferregister
Read
7
Basic conceptsFunctioning of
microprogrammed
control unit
Sequencinglogic
Control addressregister
Control unit
Control bufferregister
Read
Decoder
Instruction register
Decoder
Control signalswithin CPU
Control signalsto system bus
Control Unit
ALU Flag
Clock
8
Basic conceptsWilkes’s microprogrammed control unit
Register II
Register I
Addressdecoder
Clock
Clock
From instructionregsiter
Control signals
Conditionalsignal
9
Basic conceptsAdvantages 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.
10
Microinstruction sequencing
The two basic tasks performed by microprogrammed control unit as follows:
1. Microinstruction sequencing
2. Microinstruction execution
11
Microinstruction sequencing
Two concerns are involved in he design of microinstruction sequencing technique: the size of microinstruction and address-generation 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.
Design considerations
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
12
Microinstruction sequencingSequencing techniques
1. Two address fields
2. Single address field
3. Variable format
13
CAR
Address decoder
Controlmemory
ControlAddress
1Address
2
Branchlogic
Multiplexer
IR
Flags
CBR
Addressselection
Microinstruction sequencingBranch control logic,
two address fields
14
Microinstruction sequencingBranch control logic,
single address field
Address decoder
Controlmemory
Control Address 1
Branchlogic
Multiplexer
IR
Flags
CBR
Addressselection
CAR+1
15
Microinstruction sequencingBranch control logic,
Variable format
Address decoder
Controlmemory
Branchlogic
Multiplexer
IR
Flags
CBR
Addressselection
CAR+1Gate andfunction
logicEnable
Branchcontrol
field
Entirefield
Addressfield
16
Microinstruction sequencingAddress generation
Explicit Implicit
Two field Mapping
Unconditional branch Addition
Conditional branch Residual control
17
Microinstruction executingControl unit organization
Sequencinglogic
Control addressregister
Control memory
Control bufferregister
Instruction register
Control logic
Internalcontrolsignals
Externalcontrolsignals
ALU Flag
Clock
18
Microinstruction executingThe 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
19
Field Field Field
Decodelogic
Decodelogic
Decodelogic
Control signals
Field Field Field
Decodelogic
Decodelogic
Decodelogic
Control signals
Decodelogic
Decodelogic
(a) Direct encoding (b) Indirect encoding
Microinstruction executingMicroinstruction encoding
20
0 0 0 0 0 0
0 0 0 0 0 1
0 0 0 0 1 0
Register select
Simple register transfers
MDR Register
Register MDR
MAR Register
0 0 1 0 0 0
0 0 1 0 0 1
Memory operation
Read
Write
0 0
0 0
0 1 0 0 0 0
0 1 0 0 0 1
0 1 0 0 1 0
Special sequencing operations
CSAR Decoded MDR
CSAR Constant (in next byte)
Skip
0 0
0 0
0 0
0 1 1 0 0 0
0 1 1 0 0 1
0 1 1 0 1 0
ALU operations
ACC ACC + Register
ACC ACC - Register
ACC Register
0 1 1 0 1 1 Regsiter ACC
0 1 1 1 0 0 ACC Register + 1
Register select
Microinstruction executingVertical microinstruction repertoire
21
Microinstruction executingHorizontal microinstruction repertoire
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
1 2 3 4 5 6Field
Field definition1 - Register transfer2 - Memory operation3 - Sequencing operation4 - ALU operation5 - Register selection6 - Constant
22
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