William Stallings Computer Organization and Architecture - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

William Stallings Computer Organization and Architecture

Description:

E.g., MAR (PC) n control signals encoded into log2 n bits ... monitoring, detection, isolation, error repair. User tailoring. 29. Required Reading ... – PowerPoint PPT presentation

Number of Views:648
Avg rating:3.0/5.0
Slides: 30
Provided by: adrianjpul6
Category:

less

Transcript and Presenter's Notes

Title: William Stallings Computer Organization and Architecture


1
William Stallings Computer Organization and
Architecture
  • Chapter 17
  • Microprogrammed Control

2
Topics
  • Basic Concepts
  • Microinstruction Sequencing
  • Microinstruction Execution
  • Applications of Microprogramming

3
Microprogrammed Control
  • Use sequences of instructions (see earlier notes)
    to control complex operations
  • Called microprogramming or firmware

4
Implementation (1)
  • All the control unit does is to generate a set of
    control signals
  • Each control signal is on or off
  • Represent each control signal 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
    microinstruction, depending on conditions

5
Implementation (2)
  • Control words are put in a memory (control
    memory), with each word having a unique address
  • Bits are added to specify conditions
  • Put everything together
  • ? Micro-instruction

6
Implementation (3)
  • 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
  • corresponding 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
Microprogram 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 microinstruction
    address is specified

8
Microinstruction Types
  • Horizontal microprogramming
  • Each microinstruction specifies many different
    micro-operations to be performed in parallel
  • Vertical microprogramming
  • Each microinstruction specifies single (or few)
    micro-operations to be performed

9
Horizontal Microprogramming
  • Wide memory word
  • 1 bit for each CPU control line
  • 1 bit for each system bus control line
  • Condition field indicates branch or not
  • Address field for branch target
  • High degree of parallel operations possible
  • Little encoding of control information

10
Horizontal Microprogrammed Diagram
Internal CPU Control Signals
Micro-instruction Address
Jump Condition
System Bus Control Signals
11
Horizontal Microprogramming
  • Interpretation of a microinstruction
  • Turn on/off all control lines indicated by a 1/0
    bit
  • If condition indicated by condition bits is false
    then
  • execute next instruction in sequence
  • else
  • execute microinstruction indicated in address
    field

12
Vertical Microprogramming
  • Width is narrow
  • A code is used for each action to be performed
  • E.g., MAR ? (PC)
  • 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
  • i.e., decoder translates the code into individual
    control signals

13
Vertical Micro-Programming Diagram
Micro-instruction Address
Function Codes
Jump Condition
14
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

15
Microprogrammed Control Unit
  • Key elements
  • Control memory
  • Store microinstructions
  • Control Address Register (CAR)
  • Contains address of next microinstruction to be
    read
  • Control Buffer Register (CBR)
  • Buffer where a read microinstruction is
    transferred to
  • Left-hand portion connects to control lines
  • ? reading a microinstruction ? executing a
    microinstruction
  • Sequencing unit
  • Loads CAR and issues a READ

16
Control Unit
(A)
(B)
17
Control Memory
Jump to Indirect or Execute
Fetch cycle routine
Jump to Execute
Indirect Cycle routine
Jump to Fetch
Interrupt cycle routine
Jump to Op code routine
Execute cycle begin
Jump to Fetch or Interrupt
AND routine
Jump to Fetch or Interrupt
ADD routine

18
Control Unit Function
  • Decoder (A) translates opcode of IR into a
    control memory address
  • 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
  • Decoder (B) is used for vertical microinstructions

19
Advantages and Disadvantages
  • Microprogrammed v.s. hardwired
  • Simplifies design of control unit
  • Cheaper
  • Less error-prone
  • Slower
  • CISC microprogramming
  • RISC hardwired

20
Tasks Done By Microprogrammed Control Unit
  • Microinstruction sequencing
  • Get next microinstruction from memory
  • Microinstruction execution
  • Generate control signals needed to execute the
    microinstruction
  • Must consider both together

21
Microinstruction Sequencing
  • Two concerns in design considerations
  • 1. Size of microinstructions (size? ? cost? )
  • 2. Next address generation time (faster ?
    better)
  • Next address
  • Determined by instruction register
  • Once per instruction cycle, after instruction is
    fetched
  • Next sequential address
  • Common in most designed
  • Branches
  • Both conditional and unconditional

22
Sequencing Techniques
  • Based on current microinstruction, condition
    flags, and contents of IR, control memory address
    must be generated
  • Categories based on format of address information
  • Two address fields
  • Single address field
  • Variable format

23
Address Generation Techniques (Optional)
  • Explicit Implicit
  • Two-field Mapping (from opcode)
  • Unconditional Branch Addition (base offset)
  • Conditional branch Residual control
    (e.g., subroutine)

24
Microinstruction Execution
  • The microinstruction cycle is the basic event on
    a microprogrammed CPU
  • Each cycle is made up of two events
  • Fetch
  • Determined by generation of microinstruction
    address
  • Execute

25
Execute
  • Effect is to generate control signals
  • Some control points internal to processor
  • Rest go to external control bus or other
    interface
  • Example of microinstruction encoding
  • Figure 17.12

26
Control Unit Organization
27
Applications of Microprogramming (1)
  • Realization of computers
  • Systematic technique for control unit
    implementation
  • Emulation
  • Use of a microprogram on one machine to execute
    programs originally written for another
  • Most common use aiding users in migrating from
    one (older) computer to another

28
Applications of Microprogramming (2)
  • OS support
  • Implement primitives to replace important
    portions of OS software
  • ? simplify OS implementation
  • improve OS performance
  • Realization of special-purpose devices
  • e.g., data communication board
  • High-level language support
  • Micro-diagnostics
  • monitoring, detection, isolation, error repair
  • User tailoring

29
Required Reading
  • Stallings chapter 17
Write a Comment
User Comments (0)
About PowerShow.com