5 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
6 Implementation (2) Today’s large microprocessor Many 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 widthDue to the large number of control points to be manipulated
7 Micro-program Word Length Based 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
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 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
10 Horizontal Micro-programming Wide memory wordHigh degree of parallel operations possibleLittle encoding of control information
15 Control Unit Function Sequence logic unit issues read command Word 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
16 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
18 Wilkes Control Microprogram 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
20 Advantages and Disadvantages of Microprogramming Simplifies 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
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 FactsThe Nintendo 64’s graphics and audio co-processor (MIPS based) utilized programmable microcodeAllowed for tuning of the processor for extra speed and quality e.g. to run at 640x480.Playstation 2’s 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.
23 Tasks Done By Microprogrammed Control Unit Microinstruction sequencingMicroinstruction executionMust consider both together
32 The microinstruction cycle is the basic event on a micro programmed processor. Each cycle is made up of two eventsFetchDetermined by generation of microinstruction addressExecuteTo generate control signals.
33 Control Unit Organization Sequencing Logic ModuleGenerates the address of the next microinstructionControl Logic ModuleGenerates control signals
34 Microinstruction Classification Vertical microprogrammingEach microinstruction specifies a single (or few) micro- operations to be performedWidth 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
35 Microinstruction Classification Horizontal microprogrammingEach 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
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 Resource 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.
40 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).
41 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?
42 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?