23
520.216 1 1 Andreas G. Andreou Pedro Julian Electrical and Computer Engineering Johns Hopkins University http://andreoulab.net Arithmetic CMOS circuits and Introduction to High Level Synthesis

Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Embed Size (px)

Citation preview

Page 1: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

520.216 1 1

Andreas G. Andreou Pedro Julian Electrical and Computer Engineering Johns Hopkins University http://andreoulab.net

Arithmetic CMOS circuits and Introduction to High Level Synthesis

Page 2: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Levels of Abstraction –CMOS 1 bit adder-

Introduction to VLSI Systems 2

PHYSICAL LOGICAL

Equation

Sum = A XOR B XOR Cin Cout = (A AND B) OR (B AND Cin) OR (A AND Cin)

Layout Symbol

FA

A B

Cin Cout

Sum

Cin A B Sum Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1

Truth Table

Circuit

A B B

A Cin

A B A B

C

Cout

Page 3: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Numbers in computers

Page 4: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Unsigned integers

Page 5: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Signed integers

Page 6: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Real numbers: Fixed point

Page 7: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Real numbers: Floating point

data = mantissa⇥ 2exponent

(0110100 · · · )(0 · · · 0101) = (20 + 2�1 + 2�3)⇥ (22 + 20)

= (1.0 + 0.5 + 0.125)⇥ (4 + 1)

= 1.625⇥ 25 = 52.0

Page 8: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

The Half Adder

Sum = A XOR B Cout = A AND B HA

A B

Cout

Sum

A B Sum Cout 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1

Page 9: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

The Full Adder

Sum = A XOR B XOR Cin Cout = (A AND B) OR (B AND Cin) OR (A AND Cin)

FA

A B

Cin Cout

Sum

Cin A B Sum Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1

Page 10: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Computer Aided Design Tools

520.216 10

MICROWIND Tool Design Flow

Contact: Sales : [email protected] Support : [email protected]

SPICE Simulator (3rd Party)

Schematic Modeling Analog & digital Library models

Digital Simulation SPICE Extraction

DSCH 3

Tape out to FAB. CIF

Functional Simulation

Floorplanning

Place & Route

Programming File

.bit or .jed

IO Cards Traffic Light Controller, Key Pad, Display (LCD, 7 segs)

Synthesis

ModelSim / other

ProTHUMB Advance post layout

simulator

Analysis DRC, ERC

Delay Analyzer Crosstalk Analyzer 2D Cross section

3D Analyzer

Layout Conversion SPICE, CIF

Constraints

Technology rule files

MICROWIND 3

Verilog Extraction

Verilog File

nanoLambda Layout Editor

Verilog Compiler

Place & Route

Layout Extraction

FPGA / CPLD Boards

FPGA Tools

MICROWIND Tool

3rd Party Tools

LTSpice WindSpice

http://www.microwind.net

Page 11: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Half Adder

HalfAdder.sch

Page 12: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Generate symbol and Verilog

Page 13: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Verilog file

Page 14: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Import from Microwind

Page 15: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Layout

Page 16: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

•  To add two n-bit numbers

N-Bit Ripple-Carry Adder: Series of FA Cells

EE 5323 - VLSI Design I - © Kia Bazargan

16

C0 FA

A0

S0

B0

FA

A1

S1

B1

FA

A2

S2

B2

FA

An-1

Sn-1

Bn-1

Cn . . .

•  Note: adder delay = Tc * n •  Tc = (Cin:Cout delay)

FA

A B

Cin Cout

Sum

Page 17: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

4-bit Ripple Carry Addition: Example

EE 5323 - VLSI Design I - © Kia Bazargan 17

C0 FA

A0

S0

B0

FA

A1

S1

B1

FA

A2

S2

B2

FA

A3

S3

B3

C4 C1 C2 C3

T=1 0 0 1 0 1 0 0 1

0 0 1 0 0 1 1 1

0

0 0 0 0 0 0 0 0 T=0

B=0101 A=0011

S=0000

S=0110

0 0 1 0 0 1 0 1 T=2 S=0100

0 0 0 1 0 1 0 1 T=3 S=0000

1 0 0 1 0 1 0 1 T=4 S=1000

Page 18: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

4-bit example

Page 19: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

4-bit adder layout

Page 20: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Fall 2008 EE 5323 - VLSI

Design I - © Kia Bazarga

n

20

includes 111

excludes 000

One-Bit Full Adder: Share Logic

•  An observation –  Almost always,

sum = NOT carry

Cin A B Sum Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1

Sum = A.B.Cin + (A+B+Cin).Cout

Page 21: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

One-Bit Full Adder: Transistor Implementation

EE 5323 - VLSI Design I - © Kia Bazargan 21

Sum = A.B.C + (A+B+C).Cout Cout = A.B + C.(A+B)

A B B

A C

A B A B

C

Cout

C B A A B C

C B A C B A

Sum

–  Use inverters to get Cout and Sum –  C transistors close to output –  Cout delay: 2 inverting stages (1-stage possible?) –  Sum delay: 3 inverting stages (not an issue, though)

28 transistors

Page 22: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

Inversion Property

From Rabaey 22

A B

S

CoCi FA

A B

S

CoCi FA

S A B Ci, ,( ) S A B Ci, ,( )=

Co A B Ci, ,( ) Co A B Ci, ,( )=

Page 23: Arithmetic CMOS circuits and Introduction to High Level ...andreou/216/Handouts/... · Arithmetic CMOS circuits and Introduction to High Level Synthesis . Levels of Abstraction –CMOS

•  Reducing Inverting Stages

–  Exploit inversion property –  Now we need 2 different type of cells

Critical Path

23

A0 B0

S0

Co,0Ci,0

A1 B1

S1

Co,1

A2 B2

S2

Co,2 Co,3FA’ FA’ FA’ FA’

A3 B3

S3

Odd CellEven Cell

Exploit Inversion Property

Note: need 2 different types of cells

From Rabaey