17 Micro-Programmed Control

download 17 Micro-Programmed Control

If you can't read please download the document

  • date post

  • Category


  • view

  • download


Embed Size (px)



Transcript of 17 Micro-Programmed Control

  • William Stallings Computer Organization and Architecture7th EditionChapter 17Micro-programmed Control

  • Control Unit Organization

  • Micro-programmed ControlUse sequences of instructions (see earlier notes) to control complex operationsCalled micro-programming or firmware

  • Implementation (1)All the control unit does is generate a set of control signalsEach control signal is on or offRepresent each control signal by a bitHave a control word for each micro-operationHave a sequence of control words for each machine code instructionAdd an address to specify the next micro-instruction, depending on conditions

  • Implementation (2)Todays large microprocessorMany instructions and associated register-level hardwareMany control points to be manipulatedThis results in control memory thatContains a large number of wordsco-responding to the number of instructions to be executedHas a wide word width Due to the large number of control points to be manipulated

  • Micro-program Word LengthBased on 3 factorsMaximum number of simultaneous micro-operations supportedThe way control information is represented or encodedThe way in which the next micro-instruction address is specified

  • Micro-instruction TypesEach micro-instruction specifies single (or few) micro-operations to be performed (vertical micro-programming)Each micro-instruction specifies many different micro-operations to be performed in parallel(horizontal micro-programming)

  • Vertical Micro-programmingWidth is narrown control signals encoded into log2 n bitsLimited ability to express parallelismConsiderable encoding of control information requires external memory word decoder to identify the exact control line being manipulated

  • Horizontal Micro-programmingWide memory wordHigh degree of parallel operations possibleLittle encoding of control information

  • Typical Microinstruction Formats

  • CompromiseDivide control signals into disjoint groupsImplement each group as separate field in memory wordSupports reasonable levels of parallelism without too much complexity

  • Organization ofControl Memory

  • Control Unit

  • Control Unit FunctionSequence login unit issues read commandWord specified in control address register is read into control buffer registerControl buffer register contents generates control signals and next address informationSequence login loads new address into control buffer register based on next address information from control buffer register and ALU flags

  • Next Address DecisionDepending on ALU flags and control buffer registerGet next instructionAdd 1 to control address registerJump to new routine based on jump microinstructionLoad address field of control buffer register into control address registerJump to machine instruction routineLoad control address register based on opcode in IR

  • Functioning of Microprogrammed Control Unit

  • Wilkes Control1951Matrix partially filled with diodesDuring cycle, one row activatedGenerates signals where diode presentFirst part of row generates controlSecond generates address for next cycle

  • Wilkes's Microprogrammed Control Unit

  • Advantages and Disadvantages of MicroprogrammingSimplifies design of control unitCheaperLess error-proneSlower

  • Tasks Done By Microprogrammed Control UnitMicroinstruction sequencingMicroinstruction executionMust consider both together

  • Design ConsiderationsSize of microinstructionsAddress generation timeDetermined by instruction registerOnce per cycle, after instruction is fetchedNext sequential addressCommon in most designedBranchesBoth conditional and unconditional

  • Sequencing TechniquesBased on current microinstruction, condition flags, contents of IR, control memory address must be generatedBased on format of address informationTwo address fieldsSingle address fieldVariable format

  • Branch Control Logic: Two Address Fields

  • Branch ControlLogic: Single Address Field

  • Branch Control Logic: Variable Format

  • Address Generation

    ExplicitImplicitTwo-fieldMappingUnconditional BranchAdditionConditional branchResidual control

  • ExecutionThe cycle is the basic eventEach cycle is made up of two eventsFetchDetermined by generation of microinstruction addressExecute

  • ExecuteEffect is to generate control signalsSome control points internal to processorRest go to external control bus or other interface

  • Control Unit Organization

  • A Taxonomy of MicroinstructionsVertical/horizontalPacked/unpackedHard/soft microprogrammingDirect/indirect encoding

  • Improvements over WilkesWilkes had each bit directly produced a control signal or directly produced one bit of next addressMore complex address sequencing schemes,using fewer microinstruction bits, are possibleRequire more complex sequencing logic moduleControl word bits can be saved by encoding and subsequently decoding control information

  • How to EncodeK different internal and external control signals Wilkess:K bits dedicated 2K control signals during any instruction cycleNot all usedTwo sources cannot be gated to same destinationRegister cannot be source and destinationOnly one pattern presented to ALU at a timeOnly one pattern presented to external control bus at a timeRequire Q < 2K which can be encoded with log2Q < K bitsNot doneAs difficult to program as pure decoded (Wilkes) schemeRequires complex slow control logic moduleCompromisesMore bits than necessary usedSome combinations that are physically allowable are not possible to encode

  • Specific Encoding TechniquesMicroinstruction organized as set of fieldsEach field contains codeActivates one or more control signalsOrganize format into independent fieldsField depicts set of actions (pattern of control signals) Actions from different fields can occur simultaneouslyAlternative actions that can be specified by a field are mutually exclusiveOnly one action specified for field could occur at a time

  • Microinstruction EncodingDirect Encoding

  • Microinstruction EncodingIndirect Encoding

  • Required ReadingStallings chapter 17