MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius...

33
MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint- Hilaire Alberto Mollinedo Vinicius Schuina

Transcript of MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius...

Page 1: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

MICROPROGRAMMED CONTROL CH 17

Team # 2

Members:Wilmer Saint-HilaireAlberto MollinedoVinicius SchuinaLuis Perez

Page 2: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Microinstructions• Microprogramming• Microinstruction• Microprogram (Firmware)

Page 3: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Horizontal Microinstruction• 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

Page 4: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Control Unit Instruction Cycle• The set of microinstructions is

stored in the Control Memory

Instruction Execution1. Sequence logic unit issues a read

command to the control memory.2. The word whose address is

specified in the control address register is read into the buffer control register.

3. Control buffer generates control signals, and sends the next address information to the sequencing logic unit.

4. Seq. logic unit load the new address into the control address register.

Page 5: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Vertical Microinstruction

• In vertical microinstruction code is used for every action to be performed, such as: {MAR to PC}, and the decoder translates this code into individual code signals.

Page 6: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Advantages / Disadvantages

• The use of microprogramming simplifies the design to implement a control unit.

• Cheaper and less error prone to implement.

• Somewhat slower than a hardwire unit of comparable technology.

Page 7: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Questions

• Where does the Control Unit get the address for the next microinstruction?

• Where is the next microinstruction stored?

Page 8: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Typical Microinstruction Formats

VS

Page 9: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Horizontal Microinstruction or Control word

• There is one bit for each internal processor line and one bit for each bus control line

• There is a condition field indicating the condition under which there should be a branch

• There is a field with the address of the microinstruction to be executed when a branch is take

VS

Page 10: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Interpretation of the horizontal microinstruction

1- To execute this microinstruction, turn on all control lines indicated by 1 bit, and leave off all control lines indicated by 0 bit. This will cause the microinstruction to be performed.

2- if the condition indicated by the condition bit is false, execute the next microinstruction.

3- if the condition indicated by the condition bit is true, the next microinstruction address to be executed is indicated in the address filed.

VS

Page 11: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Organization ofControl Memory

Define and specify the sequencing of micro-operation to be performed during each cycle and it’s a way of implementing the control unit.

VS

Page 12: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Control Unit• What is a micro programmed

control unit?

• It’s a CU with control memory that contains a program that describes the behaviour of the control unit.

• It’s can be implemented by simply executing the program

VS

Page 13: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Control Unit Function1 - Sequence login unit issues read

command to the control memory 2 - Word specified in control address

register is read into control buffer register

3 - Control buffer register contents generates control signals and next address information

4 - Sequence logic unit loads new address into control buffer register based on next address information from control adderss register and ALU flags.

All this happens in one clock pulse

VS

Page 14: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Next Address Decision

• Depending on ALU flags and control buffer register– Get next instruction

• Add 1 to control address register

– Jump to new routine based on jump microinstruction• Load address field of control buffer register into control

address register

– Jump to machine instruction routine• Load control address register based on opcode in IR

VS

Page 15: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Functioning of Microprogrammed Control Unit

VS

Page 16: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Questions ?

• Q1 -What is the purpose of the control memory?

• A1 – The control memory is a internal memory of a programmable control unit that contains a program that describes the behavior of the control unit. The control unit can be implemented by simplify executing the this program.

Page 17: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Wilkes Control

• 1951• Matrix partially filled with diodes• During cycle, one row activated– Generates signals where diode present– First part of row generates control– Second generates address for next cycle

Page 18: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Wilkes's Microprogrammed Control Unit

Page 19: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.
Page 20: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Advantages and Disadvantages of Microprogramming

Advantages• Simplifies design of control unit• Emulation• Easy to debug and maintain• New Features can be added easily

Disadvantage• Slower

Page 21: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Tasks Done By Microprogrammed Control Unit

• Microinstruction sequencing• Microinstruction execution• Must consider both together

Page 22: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Design Considerations

• Size of microinstructions• Address generation time – as fast as possible• The Address of the next microinstruction to be

executed is one of these categories:– Determined by instruction register

• Once per cycle, after instruction is fetched

– Next sequential address• Common in most designed

– Branches• Both conditional and unconditional

Page 23: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Sequencing Techniques

• Based on current microinstruction, condition flags, contents of IR, control memory address must be generated

• Three general categories for a control memory address are as follows:– Two address fields– Single address field– Variable format

Page 24: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Branch Control Logic: Two Address Fields

Page 25: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Branch ControlLogic: Single Address Field

Page 26: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

Branch Control Logic: Variable

Format

Page 27: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

>THE MICROINSTRUCTION CYCLE IS THE BASIC EVENT OF THE CONTROL UNIT

>EACH CYCLE IS MADE UP OF 2 PARTS: FETCH & EXECUTE

>THE PURPOSE OF THE EXECUTE CYCLE IS TO GENERATE CONTROLSIGNALS

>SOME CONTROL SIGNALS ARE INTERNAL TO THE CPU, OTHERS ARE EXTERNAL (BUS, I/O, DEVICE)

Page 28: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

>THERE ARE 4 WAYS TO CLASSIFY MICROINSTRUCTIONSVERTICAL/HORIZONTALPACKED/UNPACKEDHARD/soft MICROPROGRAMINGDIRECT/INDIRECT ENCODING

Page 29: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

>CONTROL UNIT ORGANIZATION

Page 30: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

WILK51

>EACH BIT OF A MICROINSTRUCTION IS USED TO PRODUCE A CONTROL SIGNAL

>VERY DIFICULT TO PROGAM AS PURELY DECODED SCHEME

>VERY SLOW AND COMPLEXCONTROL LOGIC MODULE

>SOME COMBINATIONS WHICH ARE PHYSICAL ALOWED CANNOT BE ENCODED

Page 31: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

>2 WAYS TO ENCODE DIRECTINDIRECT

>DIRECT ENCODING

Page 32: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

>INDIRECT ENCODING

Page 33: MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.

>TWO APPROACHESFUNCTIONAL ENCODINGRESOURCE ENCODING