Title: Chapter 16 Micro-programmed Control
1Chapter 16Micro-programmed Control
- EEL 4709C
- Alan Garcia
- Arturo Linares
- Henry Mitzler
216.1 Microprogrammed Control Basic Concepts
3Micro-programmed Control
- Use sequences of instructions to control complex
operations - An alternative to a hardwired control unit
- Called micro-programming, microcode, or firmware
4Control Unit Organization
5Implementation (1)
- All the control unit does is generate a set of
control signals - Each control signal is on or off
- Each control signal is represented by a bit
- Have a control word for each micro-operation
- Have a sequence of control words for each machine
code instruction - Add an address to specify the next
micro-instruction, depending on conditions
6Implementation (2)
- Todays large microprocessor
- Many instructions and associated register-level
hardware - Many control points to be manipulated
- This results in control memory that
- Contains a large number of words
- co-responding to the number of instructions to be
executed - Has a wide word width
- Due to the large number of control points to be
manipulated
7Micro-program Word Length
- Based on 3 factors
- Maximum number of simultaneous micro-operations
supported - The way control information is represented or
encoded - The way in which the next micro-instruction
address is specified
8Micro-instruction Types
- Each micro-instruction specifies single (or few)
micro-operations to be performed - (vertical micro-programming)
- Vertical instructions must be decoded to produce
control signals. - Slower than horizontal microprogramming, but take
up less memory (ROM) space. - Each micro-instruction specifies many different
micro-operations to be performed in parallel - (horizontal micro-programming)
- Requires more memory, but does requires little if
any decoding.
9Vertical Micro-programming
- Width is narrow
- n control signals encoded into log2 n bits
- Limited ability to express parallelism
- Considerable encoding of control information
requires external memory word decoder to identify
the exact control line being manipulated
10Horizontal Micro-programming
- Wide memory word
- High degree of parallel operations possible
- Little encoding of control information
11Typical Microinstruction Formats
12Compromise
- Divide control signals into disjoint groups
- Implement each group as separate field in memory
word - Supports reasonable levels of parallelism without
too much complexity
13Organization ofControl Memory
14Control Unit
15Control Unit Function
- Sequence logic unit issues read command
- Word specified in control address register is
read into control buffer register - Control buffer register contents generates
control signals and next address information - Sequence logic loads new address into control
buffer register based on next address information
from control buffer register and ALU flags
16Next Address Decision
- Depending on ALU flags and control buffer
register - Get next instruction
- Add 1 to control address register
- Jump to new routine based on jump
microinstruction - Load address field of control buffer register
into control address register - Jump to machine instruction routine
- Load control address register based on opcode in
IR
17Functioning of Microprogrammed Control Unit
18Wilkes Control
- Microprogram was coined by Wilkes in the early
1950s. - 1951 Wilkes first proposed microprogrammed
control. - Matrix partially filled with diodes
- During cycle, one row activated
- Generates signals where diode present
- First part of row generates control
- Second generates address for next cycle
19Wilkes's Microprogrammed Control Unit
20Advantages and Disadvantages of Microprogramming
- Simplifies design of control unit
- Cheaper
- Less error-prone
- Slower than a pure hard-wired implementation
- RISC processors typically use hardwired control
units because of their simpler instruction
formats. - Bugs and Errata can be corrected by microcode
update - E.g. Intel Core 2 Duo bugs and possible
security vulnerabilities resolved via microcode
update
21Advantages and Disadvantages of Microprogramming
- Instructions can be easily be added with
microprogramming compared with hardwired control
units. - Specifying the architecture and instruction set
becomes a software programming issue rather than
hardware design problem.
22Interesting Facts
- The Nintendo 64s graphics and audio co-processor
(MIPS 4000 based) utilized programmable microcode - Allowed for tuning of the processor for extra
speed and quality e.g. to run at 640x480. - Playstation 2s vector processor units were
microprogrammable via microcode. - 3D Geometry and floating point arithmetic
- Microcode allows for programmers to fine-tune the
processors at a below assembly code level, allows
for more optimization.
23Tasks Done By Microprogrammed Control Unit
- Microinstruction sequencing
- Microinstruction execution
- Must consider both together
2417.2 Microinstruction Sequence
25Microinstruction Sequencing
- Design Considerations
- Size of microinstruction
- Address-generation time
- Determined by instruction registers
- Next sequential branch
- Branch
26Microinstruction Sequencing
- Sequencing Techniques
- Two address fields
- Single address field
- Address-generation time
- Determined by instruction registers
- Next sequential branch
- Branch
27Microinstruction Sequencing
- Branch Control Logic
- Two Address Fields
28Microinstruction Sequencing
- Branch Control Logic
- Single Address Field
29Microinstruction Sequencing
- Branch Control Logic
- Variable Format
30Microinstruction Sequencing
- Microinstruction Address Generation
- Techniques
-
- Explicit Implicit
- Two-Field Mapping
- Unconditional Branch Addition
- Conditional Branch Residual Control
3117.3 Microinstruction Execution
32The microinstruction cycle is the basic event on
a micro programmed processor.
-
- Each cycle is made up of two events
- Fetch
- Determined by generation of microinstruction
address - Execute
- To generate control signals.
33Control Unit Organization
- Sequencing Logic Module
- Generates the address of the next
microinstruction - Control Logic Module
- Generates control signals
34Microinstruction Classification
- Vertical microprogramming
- Each microinstruction specifies a single (or
few) micro-operations to be performed - Width is narrow n control signals can be encoded
into log2n control bits - Limited ability to express parallelism
- Considerable encoding of control information
requires external memory word decoder to identify
the exact control line being manipulated
35Microinstruction Classification
- Horizontal microprogramming
- Each microinstruction specifies many different
micro-operations to be performed in parallel. - Wide memory word
- High degree of parallel operations are possible
- Little to no encoding of control information
36Microinstruction Encoding
- Microinstruction is organized as a set of fields.
- Each field is depicted as a set of actions.
- Only one of the actions specified for a given
field could occur at a time.
37Aspects of Encoding
- Functional Encoding
- Identifies functions within the machine and
designates fields by function type. - Resource Encoding
- Devotes one field to each source( e.g., I/O,
memory, ALU) - Direct or Indirect Encoding
- The difference is that with indirect encoding,
one field is used to determine the interpretation
of another field.
38References
- http//fourier.eng.hmc.edu/e85/lectures/processor/
node11.html - http//www.cs.binghamton.edu/reckert/hardwire3new
.html - http//en.wikipedia.org/wiki/Microcode
- http//en.wikipedia.org/wiki/Hardwired_control
- http//en.wikipedia.org/wiki/Control_unit
- http//en.wikipedia.org/wiki/Core_2_duo
39References
- http//en.wikipedia.org/wiki/Erratum
40Summary
- Microprogramming alternative to hard-wired
control units, provides more flexibility in
designing the processor and control unit. - Disadvantages not as fast as a hard-wired
implementation, RISC processors typically use
hardwired control units. - Microprogramming allows for errors microcode to
be corrected via patches (with writable memory
i.e. EEPROM) (as in C2D) - Horizontal microcode represents each control
signal as a bit with little or no encoding used. - Vertical microcode encodes mutually exclusive
control signals in different fields, which must
then be decoded to produce the control signals.
(Which requires more time because of additional
combinational circuits).
41Review Questions
- What is the difference between horizontal and
vertical microinstructions? - Why is micro programmed control used instead of
hardwired control for the control unit. - What are the advantages and disadvantages of
micro programmed control compared with a
hardwired control unit implementation? - What are the main tasks performed by a micro
programmed control unit?
42Review Questions
- Why are vertical microinstructions slower than
horizontal microinstructions? - What is the preferred sequencing technique?
- What are the differences between explicit
techniques and implicit techniques? - What range of values does the length of vertical
and horizontal microinstructions fall under? - What does the control memory contain?
- What concerns are involved in the design of a
microinstruction sequencing technique?