Chapter 4 - Processor - p3
Chapter 4 - Processor - p3
Vertical
Horizontal
Micro-instruction Implementation
• By now, it is clear that more the
encoding, the less is the width of the
Control Word.
• Thus
– Vertical formats require less width for
Control Word.
• while
– the horizontal format with least encoding
demands larger width for Control Word.
Horizontal versus Vertical Microinstruction
• Horizontal Microinstructions
– Individual bits in horizontal microinstructions
correspond to
• individual control lines.
– Horizontal microinstructions are
• long and
• allow maximum parallelism
since each bit controls a single control line.
Horizontal versus Vertical Microinstruction
• Vertical Microinstructions
– control lines are
• coded into specific fields within a microinstruction.
– Decoders are needed to map a field of k bits to 2k
possible combinations of control lines.
Horizontal versus Vertical Microinstruction
• Difference:
– Because of the encoding,
• vertical microinstructions are much shorter than
horizontal ones.
– Control lines encoded in the same field cannot be
activated simultaneously when using vertical
microinstructions. Therefore,
• vertical microinstructions allow only limited parallelism.
Add Sub Mu Di & | SR SL
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
R0 R1 R2 .. R14 R15
0 0 1 0 0 0
1 0 0 0 0 0 0 0 0 0
0 0 0 1
0 0 0 0 1
0 0 0 1 0
0 0 0 0 0
Example 3
• Refer to the previous example but now
suppose two bus data path.
• Write the format of the microinstruction if
– Horizontal implementation
– Vertical implementation
Is used.
! Horizontal
• Source 1: 16 GPRS+4 SPRS+A
• Source 2: 16 GPRS
• Destination:16 GPRS+4 SPRS+A
• ALU functions: 8 functions
Add Sub Mu Di & | SR SL
1 0 0 0 0 0 0 0
R0 R1 R2 R3 … R14 R15 A PC IP MA MD
R R
0 1 0 0 0 0 0 0 0 0 0 0
R0 R1 R2 R3 … R14 R15
0 0 1 0 0 0 0
R0 R1 R2 R3 … R14 R15 A PC IP MA MD
R R
0 0 0 0 0 0 0 1 0 0 0 0
Add Sub Mu Di & | SR SL
0 0 0 0 0 0 0 0
R0 R1 R2 R3 … R14 R15 A PC IP MA MD
R R
0 0 0 0 0 0 0 1 0 0 0 0
R0 R1 R2 R3 … R14 R15
0 0 0 0 0 0 0
R0 R1 R2 R3 … R14 R15 A PC IP MA MD
R R
1 0 0 0 0 0 0 0 0 0 0 0
! VERTICAL
• ALU FUNCTION: 8+none 4 bits
• SOURCE 1: 16+4+A= none 5 bits
• SOURCE 2: 16+ none 5 bits
• DESTINATION:16+4+A+none 5 bits
FUN CODE S1 D CODE D CODE
NONE 0000 R0 R0 00000 R0 00000
ADD 0001 R1 R1 00001 R1 00001
SUB 0010 R2 R2 00010 R2 00010
… … R3 R3 00011 R3 00011
… … … …. ….
R14 R14 01110 R14 01110
R15 R15 01111 R15 01111
A A 10000 NONE 10000
PC PC 10001
IR IR 10010
MAR MAR 10011
MDR MDR 10100
NONE NONE 10101
0 0 0 1
0 0 0 0 1
0 0 0 1 0
1 0 0 0 0
0 0 0 0
1 0 0 0 0
1 0 0 0 0
0 0 0 0 0
hw
• Submit the following hw due to next
Sunday 20-10 (written by hands).
Merits and Demerits
of
Microprogrammed Control Units
Merits of Microprogrammed
Control Units
• Easy to design, write and modify
• Design architecture and microcode
can be done in parallel
• Bugs in the control logic can usually
be fixed by changing the contents of
the RAM/ROM
• Can make use of internal registers
more effectively
Demerits of Microprogrammed
Control Units
• Speed is often slower than the
computation in hardwired logic
• Parallelism in machine cycle is
restricted
• When State Space goes off, it
demands very large Control Store;
– When memory is costly, this becomes a
serious limitation.
Demerits of Microprogrammed
Control Units
• ISAs with very complex instructions
benefit more from the
Microprogrammed Control Unit.
• However, Microprogramming is out of
favors when the entire Processor Chip is
fabricated at one time, including
Control Unit.
– In this scenario,
• the ability to do bug fixing by changing the
Control Store is a less useful feature.
Nano programming
• Nano means smaller than Micro.
• Instead of a microprogram decode
– another level of control memory is used
for decoding and generating control
signals.
• This second-level control store is
called Nano control memory
• This method of generating control
signals is called Nano Programming.
Nano programming
• Nano control memory controls the hardware
and contains nano instructions.
• The objective of nano programming is
– to reduce the total size of control memory
– have design flexibility in generating control
signals.
• The design flexibility results from
– the relaxation of the words between instructions
and Hardware with two intermediate levels of
control store rather than one.
Nano programming
• The disadvantages of nano
programming are:
– the two-level approach causes loss of
speed due to extra memory access
– more complex control unit organization
Dynamic Programming
• Dynamic Programming is another
microprogramming technique
implemented in a WCM (Writable
Control Memory).
• It allows a systems programmer to
dynamically change a processor’s
instruction set by changing
microprogram that interprets the
instruction set.
Dynamic Programming
• In principle, provide the same
machine with multiple instruction
set, tailored to special applications.
• Since the Control Memory contents
are altered under program control,
the name dynamic programming.
• Set-Top boxes used with television is
a practical application and a good
example.