Presentation on theme: "CHAPTER 16 MICROPROGRAMMED CONTROL DR. H. WATSON FRANCISCO VASQUEZ"— Presentation transcript:
1CHAPTER 16 MICROPROGRAMMED CONTROL DR. H. WATSON FRANCISCO VASQUEZ FOR:DR. H. WATSONBY:FRANCISCO VASQUEZSHINA AHMADCARLOS FERNANDEZNINGYUAN WANGMIGUEL RONDONCARLOS LAGUERREMICHAEL BOZAFLORIDA INTERNATIONAL UNIVERSITY – ENGINEERING CENTERSUMMER 2011
2Chapter # 16: Microprogrammed Control Topics:Basic ConceptsMicroinstructionsMicroprogrammed Control UnitWilkes ControlAdvantages and DisadvantageMicroinstruction SequencingDesign ConsiderationsSequencing TechniquesAddress GenerationLSI–11 Microinstruction SequencingMicroinstruction ExecutionA Taxonomy of MicroinstructionsMicroinstruction EncodingLSI–11 Microinstruction ExecutionIBM 3033 Microinstruction ExecutionTI 8800Microinstruction FormatMicrosequencerRegistered ALU
3Chapter # 16: Microprogrammed Control Registers diagram:
4Chapter # 16: Microprogrammed Control Basic Elements of a Processor:ALURegistersInternal data pathsExternal data pathsControl Unit
5Chapter # 16: Microprogrammed Control Functions of Control Unit:SequencingCauses the CPU to step through a series of micro-operationsExecutionThe Control Unit causes each micro-operation to be performed (Using control signals)
6Chapter # 16: Microprogrammed Control Data Paths and Control Signals:
7Chapter # 16: Microprogrammed Control Types of Micro-operations:Transfer data between registersTransfer data from register to external (Memory, I/O)Transfer data from external to registerPerform arithmetic or logical operations
8Chapter # 16: Microprogrammed Control A microprogram has a sequence of instructions in a microprogramminglanguage.This are very simple instructions that specify micro-operations.
9Chapter # 16: Microprogrammed Control As in a hardwired control unit, the control signal generated by a microinstruction are used to cause register transfers and ALU operations .Use sequences of instructions to control complex operations.Called micro-programming or Firmware.
10Chapter # 16: Microprogrammed Control All the control unit does is 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 micro-instruction, depending on conditions.
11Chapter # 16: Microprogrammed Control Typical Microinstruction Formats:
12Chapter # 16: Microprogrammed Control Organization of Control Memory:
13Chapter # 16: Microprogrammed Control Control Unit:
14Chapter # 16: Microprogrammed Control Functioning of Microprogrammed Control Unit:
15Chapter # 16: Microprogrammed Control Processor block diagram example:
16Chapter # 16: Microprogrammed Control Wilkes Control - Diode Matrix:A diode memory is just a collection of diodes connected in a matrix.
17Chapter # 16: Microprogrammed Control Wilkes’s Microprogrammed Control Unit:
18Chapter # 16: Microprogrammed Control Wilkes Control – key points:Developed by Maurice Wilkes in the early 1950sMatrix partially filled with diodesDuring cycle, one row is activatedGenerates signals where diode presentFirst part of row generates controlSecond part generates address for next cycle
19Chapter # 16: Microprogrammed Control Advantages and disadvantages:Hardwired:It is difficult to design and test such piece of hardware.The design is relatively inflexible. For example to add a new instruction.It is relatively faster.Microprogrammed:Simplifies design of Control UnitCheaperLess error-proneSlower
28Microinstruction Address Generation Techniques ExplicitImplicitTwo-FieldMappingUnconditional branchAdditionConditional branchResidual control
29Explicit Memory Address Generation Address LocationTwo Field ApproachConditional Branch Instruction
30Implicit Memory Address Generation Control MemoryMapping ApproachAdding Approach
31Microinstruction Execution A Taxonomy of Microinstruction&Microinstruction EncodingNinyuan Wang
32Microinstruction Cycle The basic event on a microprogrammed processor.Two parts: fetch and execute.Fetch: determined by the generation of a microinstruction address.
33ExecuteThe effect of the execution of a microinstruction is to generate control signals.Some of these signals control points internal to the processor.The remaining signals go to the external control bus or other external interface.As an incidental function, the address of the next microinstruction is determined.
35A Taxonomy of Microinstructions Microinstructions can be classified in a variety of ways. Distinctions that are commonly made in the literature include the following:Vertical/horizontalPacked/unpackedHard/soft microprogrammingDirect/indirect encoding
36How to EncodingK different internal and external control signals to be driven by the control units.In Wilkes’s scheme:K bits of the microinstruction would be dedicated to this purpose.2 𝐾 possible combinations of control signals to be generated during any instruction cycle.
37Not all be used – can do better Two sources cannot be gated to same destination.A register cannot be both source and destination.Only one pattern of control signals can be presented to ALU at a time.Only one pattern of control signals can be presented to external control bus at a time.Require 𝑄< 2 𝐾 which can be encoded with 𝑙𝑜𝑔 2 𝑄<𝐾 bits.
38In practice, this form of encoding is not used, for two reasons: It is as difficult to program as pure decoded (Wilkes) scheme.It is requires complex and therefore slow control logic module.Instead, some compromises are made. These are of two kinds:More bits than necessary used to encode the possible combination.Some combinations that are physically allowable are not possible to encode.
39Microinstruction Encoding In practice, microprogrammed control units are not designed using a pure unencoded or horizontal microinstruction format.The basic technique for encoding is illustrated in Figure 16.11a.
41The microinstruction is organized as a set of fields. Each field contains a code, which, upon decoding, activates one or more control signals.The design of an encoded microinstruction format can now be stated in simple terms:
42Organize the format into independent fields. Each field 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
49Q busThe Q-bus was one of several bus technologies used with PDP computer systems.Over time, the physical address range of the Q-bus was expanded from 16 to 18 and then 22 bits. Block transfer modes were also added to the Q-bus.
50LSI-11 cont.The three LSI are the data, control, and control store chips.
51Data ChipData chip contains an 8 bit ALU, twenty six 8 bit registers, and CCR storage.Registers include PSW, MAR and MBR.Sixteen of the twenty six 8 bit registers are used to implement the eight 16 bit PDP-11 general purpose registers.ALU needs 2 passes to implement the 16 bit arithmetic.
52Control store chip 22 bit wide control memory. More than one control store chip could be used.Logic for sequencing and executing instructions are stored in this chip.Registers include CAR, CDR, and a copy of the IR.
53Men In Black? MIB Ties all components together. During fetch: Control chip generates 11 bit address.Control store chip uses this to produce a 22 bit microinstruction.Low order 16 bits go to data chip, low order 18 bits to the control chip and high order 4 bits to bus control and processor board logic.
54LSI-11 Microinstruction Vertical, 22 bit wide microinstruction format.High order 4 bits control special functions on processor board.Translate bit enables the translation array to check for interrupts.Load return register bit enables the next microinstruction address to be loaded from the return register.The remaining 16 bits are used for encoded micro operations.
55IBM 3033 Memory consists of 4k words. Addresses FF contain 108 bit microinstructions.Addresses FFF contain 126 bit microinstructions.Horizontal format.
56IBM 3033 cont ALU inputs are four dedicated registers. A, B, C, and D. These registers are non-user-visible.Microinstruction format contains fields to load these registers from user visible registers.The ALU results are stored in user visible registers.
60objectiveThe TI 8800 is a 32 bit programmable microprocessor chip equipped with:Writeable control storeImplemented in RAM rather than ROMUsage consist of:Educational implementationsUseful in creating multifunctional prototypesEtc….
61Why microprogrammingcreating logic controls through basic interconnections are difficult to:AnalyzeDesignModifySolution: Develop microinstructions to attain the control settings
62microinstructionDef.An instruction that controls data flow and instruction-execution sequencing in a processorNot visible or changeable by a programmerOnly run on its designated processorMicrocode differs from one machine to the next
638800 Microinstruction format The format for the 8800 comprise of 128 bits decoded into 30 functional fields.The field are categorized in 5 groups:Control of board8847 floating-point and integer processor chip8832 registered ALU8818 microsequencerWCS data field
7632-bit registered aluincluded are fields 17-27Can be configure to work as 4-8bit alu, 2-16bit alu, or 1-32bit aluthere is a total of 32-bits involved but with inputs and settings of the alu there are 39 bitsField 27 provides opcode of operation to be performed by alu
77cONT11 , welh, selryfymx, , r3, r2, r1, pass+ add We want to add contents of register 1 to contents of register 2 and put the result on register 3cONT11 , welh, selryfymx, , r3, r2, r1, pass+ add
78cONT11 , welh, selryfymx, , r3, r2, r1, pass+ add Basic NOP instructionWELHField 17 changed to WELH (Write Enable Lo and Hi)SELRYFYMXField 18 changed to SELRYFYMX (select feedback from ALU Y MUX output)R3Field 24 changed to designate R3 as destination registerR2Field 25 changed to designate R2 as a source registerR1Field 26 changed to designate R1 as a source registerPASS+ ADDField 27 changed to specify ALU to ADD. PASS to denote ALU not to shift.
79NOT NECESSARY TO DENOTE FIELDS WHEN CONSECUTIVE FIELDS ARE USEDGROUP 1 MUST BE USED ALONGSIDE WITH GROUP; ATNO TIME SHOULD GROUP BE USED WITH GROUPS 3-5GROUP 1 AND 2 ARE FOR ARITHMETIC FUNCTIONSGROUP 3-5 ARE FOR LOGICAL FUNCTIONS
83QUESTIONS NAME AN INPUT TO THE CONTROL UNIT WHAT PICKS UP THE NEXT INSTRUCTIONFROM THE CONTROL STORE AND SENDSIT TO MICROMEMORY
84QUESTIONS NAME AN INPUT TO THE CONTROL UNIT CLOCK, ALU FLAGS, IR, CAR WHAT PICKS UP THE NEXT INSTRUCTIONFROM THE CONTROL STORE AND SENDSIT TO MICROMEMORY
85QUESTIONS NAME AN INPUT TO THE CONTROL UNIT CLOCK, ALU FLAGS, IR, CAR WHAT PICKS UP THE NEXT INSTRUCTIONFROM THE CONTROL STORE AND SENDSIT TO MICROMEMORYMICROSEQUENCER 8818
86MORE QUESTIONS HOW MANY BITS IS THE MICROINSTRUCTION FORMAT FOR THE TI8800 PROCESSORWHAT ARE THE TWO MAIN FUNCTIONS OF THE CONTROL UNITWHAT IS THE FORMAT OF THE LSI-11 MICROINSTRUCTION
87MORE QUESTIONS HOW MANY BITS IS THE MICROINSTRUCTION FORMAT FOR THE TI8800 PROCESSOR128 BITSWHAT ARE THE TWO MAIN FUNCTIONS OF THE CONTROL UNITWHAT IS THE FORMAT OF THE LSI-11 MICROINSTRUCTION
88MORE QUESTIONS HOW MANY BITS IS THE MICROINSTRUCTION FORMAT FOR THE TI8800 PROCESSOR128 BITSWHAT ARE THE TWO MAIN FUNCTIONS OF THE CONTROL UNITSEQUENCING AND EXECUTINGWHAT IS THE FORMAT OF THE LSI-11 MICROINSTRUCTION
89MORE QUESTIONS HOW MANY BITS IS THE MICROINSTRUCTION FORMAT FOR THE TI8800 PROCESSOR128 BITSWHAT ARE THE TWO MAIN FUNCTIONS OF THE CONTROL UNITSEQUENCING AND EXECUTINGWHAT IS THE FORMAT OF THE LSI-11 MICROINSTRUCTIONVERTICAL FORMAT
90EVEN MORE QUESTIONSWHAT IS THE DIFFERENCE BETWEEN VERTICAL AND HORIZONTALMICROINSTRUCTIONNAME AN ADVANTAGE AND DISADVANTAGE TO USE A MICROCONTROLLEDCONTROL UNIT
91EVEN MORE QUESTIONSWHAT IS THE DIFFERENCE BETWEEN VERTICAL AND HORIZONTALMICROINSTRUCTIONVERTICAL ENCODED- EASIER TO PROGRAMHORIZONTAL DETAILED-FASTER DUE TO LESS ENCODINGNAME AN ADVANTAGE AND DISADVANTAGE TO USE A MICROCONTROLLEDCONTROL UNIT
92EVEN MORE QUESTIONSWHAT IS THE DIFFERENCE BETWEEN VERTICAL AND HORIZONTALMICROINSTRUCTIONVERTICAL ENCODED- EASIER TO PROGRAMHORIZONTAL DETAILED-FASTER DUE TO LESS ENCODINGNAME AN ADVANTAGE AND DISADVANTAGE TO USE A MICROCONTROLLEDCONTROL UNITADVANTAGE-FLEXIBILITY, CHEAPER, SIMPLER DESIGN, LESS ERROR PRONEDISADVATAGES-SLOWER