Chapter 16 Micro-programmed Control - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Chapter 16 Micro-programmed Control

Description:

Chapter 16 Micro-programmed Control EEL 4709C Alan Garcia Arturo Linares Henry Mitzler * * * * * * * * * * * * * * * * * * * Vertical microprogramming Each ... – PowerPoint PPT presentation

Number of Views:512
Avg rating:3.0/5.0
Slides: 43
Provided by: Adria173
Category:

less

Transcript and Presenter's Notes

Title: Chapter 16 Micro-programmed Control


1
Chapter 16Micro-programmed Control
  • EEL 4709C
  • Alan Garcia
  • Arturo Linares
  • Henry Mitzler

2
16.1 Microprogrammed Control Basic Concepts
3
Micro-programmed Control
  • Use sequences of instructions to control complex
    operations
  • An alternative to a hardwired control unit
  • Called micro-programming, microcode, or firmware

4
Control Unit Organization
5
Implementation (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

6
Implementation (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

7
Micro-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

8
Micro-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.

9
Vertical 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

10
Horizontal Micro-programming
  • Wide memory word
  • High degree of parallel operations possible
  • Little encoding of control information

11
Typical Microinstruction Formats
12
Compromise
  • Divide control signals into disjoint groups
  • Implement each group as separate field in memory
    word
  • Supports reasonable levels of parallelism without
    too much complexity

13
Organization ofControl Memory
14
Control Unit
15
Control 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

16
Next 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

17
Functioning of Microprogrammed Control Unit
18
Wilkes 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

19
Wilkes's Microprogrammed Control Unit
20
Advantages 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

21
Advantages 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.

22
Interesting 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.

23
Tasks Done By Microprogrammed Control Unit
  • Microinstruction sequencing
  • Microinstruction execution
  • Must consider both together

24
17.2 Microinstruction Sequence
25
Microinstruction Sequencing
  • Design Considerations
  • Size of microinstruction
  • Address-generation time
  • Determined by instruction registers
  • Next sequential branch
  • Branch

26
Microinstruction Sequencing
  • Sequencing Techniques
  • Two address fields
  • Single address field
  • Address-generation time
  • Determined by instruction registers
  • Next sequential branch
  • Branch

27
Microinstruction Sequencing
  • Branch Control Logic
  • Two Address Fields

28
Microinstruction Sequencing
  • Branch Control Logic
  • Single Address Field

29
Microinstruction Sequencing
  • Branch Control Logic
  • Variable Format

30
Microinstruction Sequencing
  • Microinstruction Address Generation
  • Techniques
  • Explicit Implicit
  • Two-Field Mapping
  • Unconditional Branch Addition
  • Conditional Branch Residual Control

31
17.3 Microinstruction Execution
32
The 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.

33
Control Unit Organization
  • Sequencing Logic Module
  • Generates the address of the next
    microinstruction
  • Control Logic Module
  • Generates control signals

34
Microinstruction 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

35
Microinstruction 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

36
Microinstruction 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.

37
Aspects 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.

38
References
  • 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

39
References
  • http//en.wikipedia.org/wiki/Erratum

40
Summary
  • 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).

41
Review Questions
  1. What is the difference between horizontal and
    vertical microinstructions?
  2. Why is micro programmed control used instead of
    hardwired control for the control unit.
  3. What are the advantages and disadvantages of
    micro programmed control compared with a
    hardwired control unit implementation?
  4. What are the main tasks performed by a micro
    programmed control unit?

42
Review Questions
  1. Why are vertical microinstructions slower than
    horizontal microinstructions?
  2. What is the preferred sequencing technique?
  3. What are the differences between explicit
    techniques and implicit techniques?
  4. What range of values does the length of vertical
    and horizontal microinstructions fall under?
  5. What does the control memory contain?
  6. What concerns are involved in the design of a
    microinstruction sequencing technique?
Write a Comment
User Comments (0)
About PowerShow.com