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

download Chapter 16 Micro-programmed Control EEL 4709C Alan Garcia Arturo Linares Henry Mitzler.

of 42

  • date post

    04-Jan-2016
  • Category

    Documents

  • view

    214
  • download

    0

Embed Size (px)

Transcript of Chapter 16 Micro-programmed Control EEL 4709C Alan Garcia Arturo Linares Henry Mitzler.

  • Chapter 16Micro-programmed ControlEEL 4709C

    Alan GarciaArturo LinaresHenry Mitzler

  • 16.1 Microprogrammed Control Basic Concepts

  • Micro-programmed ControlUse sequences of instructions to control complex operationsAn alternative to a hardwired control unitCalled micro-programming, microcode, or firmware

  • Control Unit Organization

  • Implementation (1)All the control unit does is generate a set of control signalsEach control signal is on or offEach control signal is represented 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 executed

    Has 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)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.

  • 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 logic 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 logic 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 ControlMicroprogram was coined by Wilkes in the early 1950s.1951 Wilkes first proposed microprogrammed control.Matrix 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 than a pure hard-wired implementationRISC processors typically use hardwired control units because of their simpler instruction formats.Bugs and Errata can be corrected by microcode updateE.g. Intel Core 2 Duo bugs and possible security vulnerabilities resolved via microcode update

  • Advantages and Disadvantages of MicroprogrammingInstructions 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.

  • Interesting FactsThe Nintendo 64s graphics and audio co-processor (MIPS 4000 based) utilized programmable microcodeAllowed 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 arithmeticMicrocode allows for programmers to fine-tune the processors at a below assembly code level, allows for more optimization.

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

  • 17.2 Microinstruction Sequence

  • Microinstruction SequencingDesign Considerations:

    Size of microinstruction

    Address-generation time Determined by instruction registers Next sequential branch Branch

  • Sequencing Techniques:

    Two address fields Single address field Address-generation time Determined by instruction registers Next sequential branch Branch

    Microinstruction Sequencing

  • Branch Control Logic:Two Address Fields

    Microinstruction Sequencing

  • Branch Control Logic:Single Address Field

    Microinstruction Sequencing

  • Branch Control Logic:Variable Format

    Microinstruction Sequencing

  • Microinstruction Address Generation Techniques:

    ExplicitImplicitTwo-FieldMappingUnconditional BranchAdditionConditional BranchResidual Control

    Microinstruction Sequencing

  • 17.3 Microinstruction Execution

  • Each cycle is made up of two eventsFetchDetermined by generation of microinstruction addressExecuteTo generate control signals.

    The microinstruction cycle is the basic event on a micro programmed processor.

  • Control Unit OrganizationSequencing Logic Module Generates the address of the next microinstruction

    Control Logic Module Generates control signals

  • 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 bitsLimited ability to express parallelismConsiderable encoding of control information requires external memory word decoder to identify the exact control line being manipulated

    Microinstruction Classification

  • Horizontal microprogramming Each microinstruction specifies many different micro-operations to be performed in parallel.Wide memory wordHigh degree of parallel operations are possibleLittle to no encoding of control information

    Microinstruction Classification

  • 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.Microinstruction Encoding

  • Functional Encoding Identifies functions within the machine and designates fields by function type.Resource EncodingDevotes one field to each source( e.g., I/O, memory, ALU)

    Direct or Indirect EncodingThe difference is that with indirect encoding, one field is used to determine the interpretation of another field.Aspects of Encoding

  • Referenceshttp://fourier.eng.hmc.edu/e85/lectures/processor/node11.htmlhttp://www.cs.binghamton.edu/~reckert/hardwire3new.htmlhttp://en.wikipedia.org/wiki/Microcodehttp://en.wikipedia.org/wiki/Hardwired_controlhttp://en.wikipedia.org/wiki/Control_unithttp://en.wikipedia.org/wiki/Core_2_duo

  • Referenceshttp://en.wikipedia.org/wiki/Erratum

  • SummaryMicroprogramming 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).

  • Review QuestionsWhat 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?

  • Review QuestionsWhy 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?

    *************************