Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram?...

21
Design of Control Path Debdeep Mukhopadhyay IIT Madras

Transcript of Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram?...

Page 1: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Design of Control Path

Debdeep MukhopadhyayIIT Madras

Page 2: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Hardwired Hardware

Page 3: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

GCD Processor

Page 4: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

An Example

Page 5: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Hardware for the GCD processor

Page 6: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

State Table for the Control Unit

What kind of state machine is this?

Page 7: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Classical methodS0 = 00, S1 = 01, S2 = 10 and S3 = 11

Excitation Table

Page 8: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Is this a Moore or Mealy Machine?

Page 9: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Design based on Microprogram

Page 10: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Concept of Microprogram• High Level description of a double

precision ADD:– ADD AL, BL– ADDC AH, BH

• Low level description: Microprogram

Read AL, Read BL, Write ALReadAH,Read BH, Write AH

Add

Add with carry

1

2

Data Routing

Storage Control

FunctionSelect

Cycle

Page 11: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

What is a Microprogram?Microprogram

- Program stored in memory that generates all the control signals required to execute the instruction set correctly- Consists of microinstructions

Microinstruction- Contains a control word and a sequencing word

Control Word - All the control information required for one clock cycle

Sequencing Word - Information needed to decidethe next microinstruction address

Control Memory(Control Storage: CS)- Storage in the microprogrammed control unit to store the microprogram

Page 12: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

What is a Microprogram?

• Microprogramming is so named because it uses concepts from regular programming. The microprefix should remind you, however, that the microprogram used by a processor is different from the program executed by the processor.

• The main thing to remember is that we have a computer inside a computer, but that the inner computer is much simpler and more restricted

Page 13: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Micro-programmed Control Unit

Page 14: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Symbolic Micro-programBegin: A=0, Count=0, F=0, M=InBusInput: Q=InbusTest1: If Q[0]=0 then goto RSHIFT;Add: A[7:0]=A[7:0]+M[7:0], F=(m[7] and Q[0])or FRshift: A[7]=F, A[6:0],Q=A,Q[7:1], Cnt=Cnt+1

if cnt≠7 then goto Test1Test2: If Q[0]=0 then go to Output1Subtract: A[7:0]=A[7:0]-M[7:0], Q[0]=0Output1: Outbus=AOutput2: Outbus=BEnd: Halt

c9, c10

c8

c0,c1,c11

c2,c3,c4,c5

c6

c7

END

c2,c3,c4

Page 15: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Control Signals

Page 16: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Branching

No BranchingBranch if Q[0]=0Branch if Count≠7Unconditional Branch

Hence a 2-bit conditional select field is needed.There are 10 states, so 4 bits are enough to

encode the states.

Page 17: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Binary Microprogram

0

0

0

0

0

1

0

0

0

0

c11

1000000000001001111001

0000100000000000001000

0000010000000000000111

0000001111000000000110

0000000000000111010101

0000000000110010100100

0000000111000000000011

0000000000000100010010

000 1000000000000000001

0110000000000000000000

END

c10c9c8c7c6c5c4c3c2c1c0BranchAddress

Condition Selct

Address in CM

Page 18: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Control Path Design

ControlMemory

(10x19 bits)

µPCMUX

Increment

Reset

0

~Q(0)

~Count(7)

1

Load

BranchAddress

c0,…,c11,END

4 bits

4 bits

19 bits

Page 19: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Data Path Design

Page 20: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Comments

• Micro-programming helps in making Control Units which may be changed by changing the content of the memory.

• But slow due to the fetch timing of the instruction from the memory.

Page 21: Design of Control Pathdebdeep/teaching/VLSI/slides/ControlPath.pdf · What is a Microprogram? Microprogram - Program stored in memory that generates all the control signals required

Assignment 2

1. Write a verilog code to implement the control path for a gcd processor.

2. Write a verilog code to implement the micro-programmed control unit of a 2’s complement signed fraction multiplier.

Deadline: 21/3/08