Module III Processor Organization and Architecture Control Unit

  • Slides: 51
Download presentation
Module III Processor Organization and Architecture

Module III Processor Organization and Architecture

Control Unit

Control Unit

Control Unit Implementation • Control unit implementations fall into one of two categories: •

Control Unit Implementation • Control unit implementations fall into one of two categories: • Hardwired implementation • Microprogrammed implementation

Hardwired implementation • In this, the control unit is essentially a state machine circuit.

Hardwired implementation • In this, the control unit is essentially a state machine circuit. • Its input logic signals are transformed into a set of output logic signals, which are the control signals

Control Unit Inputs • Inputs: – Instruction Register, Clock, – Flags & control bus

Control Unit Inputs • Inputs: – Instruction Register, Clock, – Flags & control bus signals (can be directly used) • Instruction Register – Uses opcodes to perform different actions for different instruction – There should be unique logic input for each opcode : performed by decoder (n-bits 2 n outputs , each will activate a single unique output)

Control Unit Inputs • Clock – CU requires different control signals at different time

Control Unit Inputs • Clock – CU requires different control signals at different time units and hence a timing generator is used

Control Unit with decoded inputs

Control Unit with decoded inputs

Hardware Control Unit Design • Consider the operation of the control unit – E.

Hardware Control Unit Design • Consider the operation of the control unit – E. g. 2’s compliment multiplier

Control Unit for Multiplier

Control Unit for Multiplier

Hardware Control Unit Design • List the control signals needed for the control unit.

Hardware Control Unit Design • List the control signals needed for the control unit. – A control signal is associated with each distinct action/operation. – A common control signal can be used for parallel operations – E. g. Control signals for 2’s compliment multiplier

Control Signals for Multiplier

Control Signals for Multiplier

Hardware Control Unit Design • With this information , we can apply 4 design

Hardware Control Unit Design • With this information , we can apply 4 design techniques for hardware implementation. • The methods are: – State -table Method – Delay-element Method – Sequence-counter Method – PLA Method

State-table Method • It is the standard algorithmic approach for sequential circuit design •

State-table Method • It is the standard algorithmic approach for sequential circuit design • In this method every micro-operation block is associated with a state in state table for control circuit

Example of multiplier

Example of multiplier

Example of multiplier • State table for the control unit can be directly derived

Example of multiplier • State table for the control unit can be directly derived from the flowchart.

State table for Multiplier

State table for Multiplier

State-table Method • Once the state table is ready it can be implemented using

State-table Method • Once the state table is ready it can be implemented using JK flipflops. • Advantages: – Simplest method to implement • Disadvantages: – If there is large number of states and input combinations, the size of table becomes large and thus it will be difficult to implement

State-table Method • Disadvantages: – State table hides useful information like loops and repeated

State-table Method • Disadvantages: – State table hides useful information like loops and repeated patterns. Thus two states with same behavior may require different hardware. – Circuits designed tends to have a random structure and thus difficult to debug and maintain.

Delay-element Method • Since the control signals are to be activated in a proper

Delay-element Method • Since the control signals are to be activated in a proper sequence, there is a specific time delay between activation of two conjugative control signals • Thus a sequence of delay elements can be used to generate control signals • To synchronize, the delay elements are made of D flipflops and controlled by common clock signal.

Delay-element Method • A control unit using delay elements can be constructed directly from

Delay-element Method • A control unit using delay elements can be constructed directly from flowchart. • It is also called one-shot method.

Rules to derive control circuit from flowchart • Rule 1: – Each sequence of

Rules to derive control circuit from flowchart • Rule 1: – Each sequence of two successive micro-operations require a delay element. – The control signals are taken directly from input and output of delay element.

Rules to derive control circuit from flowchart • Rule 1: – The signals for

Rules to derive control circuit from flowchart • Rule 1: – The signals for same control line are logically ORed to get one common output signal

Rules to derive control circuit from flowchart • Rule 2: – The n lines

Rules to derive control circuit from flowchart • Rule 2: – The n lines from the flow chart merge to a common line are transformed into OR gate

Rules to derive control circuit from flowchart • Rule 3: – A decision box

Rules to derive control circuit from flowchart • Rule 3: – A decision box is implemented by 2 AND gates

Delay-element Method. Multiplier

Delay-element Method. Multiplier

Delay-Element Method • Advantage: – In case of loop, same hardware can be used

Delay-Element Method • Advantage: – In case of loop, same hardware can be used and hence hardware requirement is less. • Disadvantage: – No. of delay elements is equal to the no. of states, thus for lots of states circuit becomes large. – Synchronization becomes difficult , if there are lots of D-flipflops

Sequence-counter Method • The sequence counter consist of – Modulo k- counter – 1/k

Sequence-counter Method • The sequence counter consist of – Modulo k- counter – 1/k decoder – Input signals to control the operation of counter

Sequence-counter Method • When count enable input is connected to clock source, decoder generates

Sequence-counter Method • When count enable input is connected to clock source, decoder generates k phase signals separated by one clock period

Sequence-counter Method • Two input lines begin and end turn the counter on and

Sequence-counter Method • Two input lines begin and end turn the counter on and off • Begin causes the counter to begin • End disconnects the clock and resets the counter

Sequence-counter Method • The phase signal activates control lines for each micro-operation • As

Sequence-counter Method • The phase signal activates control lines for each micro-operation • As instruction changes, micro-ops change which must activate another set of control lines • To activate this, logic circuit is connected to the counter

Sequence-counter Method

Sequence-counter Method

Multiplier using Sequence Counter

Multiplier using Sequence Counter

Phase 1 • Do initial Settings • Step 1: A 0 Q-1 0 COUNT

Phase 1 • Do initial Settings • Step 1: A 0 Q-1 0 COUNT n B INBUS • Step 2: Q INBUS

Phase 2 • Phase 2 is repeated n times and has 2 steps: •

Phase 2 • Phase 2 is repeated n times and has 2 steps: • Step 1: A A – B or A A+B and • Step 2: Arithmetic Shift A, Q, Q-1 and Count -1

Phase 3 • • Phase 3 involves 3 steps Step 1: OUTBUS A Step

Phase 3 • • Phase 3 involves 3 steps Step 1: OUTBUS A Step 2: OUTBUS Q Step 3: Activate END

Multiplier using Sequence Counter

Multiplier using Sequence Counter

Phase 1

Phase 1

Phase 2

Phase 2

Phase 3

Phase 3

Sequence-counter Method • Advantage: – The use of hardware is minimal, hence suits large

Sequence-counter Method • Advantage: – The use of hardware is minimal, hence suits large complex control circuits • Disadvantage: – It is expensive for simple control circuits.

PLA Method • For large control units VLSI Technology is used to design control

PLA Method • For large control units VLSI Technology is used to design control units. • E. g. PLA (Programmable Logic Array) • PLA consists of an array of AND gates followed by an array of OR gates. • It can be used to implement combinational logic functions of several variables

Blok Diagram of PLA

Blok Diagram of PLA

PLA Method • We can give instruction code, contents of control step counter, flags

PLA Method • We can give instruction code, contents of control step counter, flags and condition codes as input to PLA to get control signals as output.

PLA Method

PLA Method

Advantages of Hardwired Control Unit • Works faster as combinational circuits generates control signals

Advantages of Hardwired Control Unit • Works faster as combinational circuits generates control signals based on input status.

Disadvantages of Hardwired Control Unit • Complex in design if it requires larger number

Disadvantages of Hardwired Control Unit • Complex in design if it requires larger number of control points • No flexibility : difficult to make corrections or to add a new feature • Uses too many logic gates.