You are on page 1of 54

Project

– Adder Design

Digital Microelectronics
2019 - 2

VLSI SYSTEM LABORATORY


School of Electrical and Electronic Engineering, Yonsei University
Outline
Outline
▪ Combinational circuit을 이용한 32-bit adder 설계
▪ Carry-ripple, … , carry-increment adder 장단점 분석
▪ Area, delay, power 고려한 adder design choice
▪ 선택한 adder design의 critical path 분석, logical effort를 사용하여
critical path의 delay 및 TR size estimation
▪ Estimated delay과 simulated delay 비교
▪ Area check (by sum of TR widths)
▪ 최종 결과 조별 area, delay 비교 (power X)
▪ 추가 점수 : power estimation
▪ 2인 1조 팀
▪ Due date : 11/29 (금) 23:59

3
채점 기준
▪ Combinational circuit을 이용한 32-bit adder 설계
▪ Structure 장단점 분석 및 target 선정 [10]
▪ Critical path를 얼마나 명확히 찾아내는가 [25]
▪ Logical effort를 통한 critical path의 delay, sizing [25]
▪ 시뮬레이션을 통한 검증 [20]
▪ 최종 결과 조별 area, delay 비교 (power X) [20]
▪ 추가 점수 : power estimation

4
Design condition
▪ Initial input load : 5fF
▪ Output load : 500fF

▪ Supply voltage 1.1V and 25℃

▪ Model parameter: PTM model 45nm technology


▪ Website : http://ptm.asu.edu → Latest Models → November 15,
2008 → 45nm PTM LP model: V2.1

5
조 정보

조 번호 이름 조 번호 이름
1조 이상훈 조용민 10조 이건재 도형빈
2조 이정후 황순욱 11조 변윤수 엄도윤
3조 김태령 윤정현 12조 허광회 장재혁
4조 오지상 김준서 13조 양광명 황주영
5조 김세건 고동한 14조 제강민 김영빈
6조 임선묵 최광열 15조 이종훈 이동호
7조 박지아 김재윤 16조 이승훈 문영기
8조 허성수 이수령 17조 신재윤 여동준
9조 이재홍 석민호 강우찬 18조 유재승 김민규

1) 앞에 위치한 조원의 메일로 시뮬레이션을 위한 id/password를 제공하도록 하겠습니다.


2) Copy에 대하여 엄격하게 확인하도록 하겠습니다.

6
Adder 장/단점 분석
및 design choice
Carry-Ripple Revisited

Gi: j = Gi:k + Pi:k  Gk −1: j

A4 B4 A3 B3 A2 B2 A1 B1 Cin

G4 P4 G3 P3 G2 P2 G1 P1 G0 P0

G3:0 G2:0 G1:0 G0:0

C3 C2 C1 C0

C4

Cout S4 S3 S2 S1

8
Carry-Ripple PG Diagram

Bit Position

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

tripple =

Delay
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0

9
Carry-Skip Adder
▪ Carry-ripple is slow through all N stages
▪ Carry-skip allows carry to skip over groups of n bits
▪ Decision based on n-bit propagate signal

A16:13 B16:13 A12:9 B12:9 A8:5 B8:5 A4:1 B4:1

P16:13 P12:9 P8:5 P4:1


1 C12 1 C8 1 C4 1
Cout Cin
0 + 0 + 0 + 0 +

S16:13 S12:9 S8:5 S4:1

10
Carry-Skip Adder PG Diagram
A16:13 B16:13 A12:9 B12:9 A8:5 B8:5 A4:1 B4:1

P16:13 P12:9 P8:5 P4:1


1 C12 1 C8 1 C4 1
Cout Cin
0 + 0 + 0 + 0 +

S16:13 S12:9 S8:5 S4:1

16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0

For k n-bit groups (N = nk)


tskip =
11
Variable Group Size: CSA

16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
Delay grows as O(sqrt(N))

12
Carry-Select Adder
▪ Trick for critical paths dependent on late input X
▪ Precompute two possible outputs for X = 0, 1
▪ Select proper output when X arrives
▪ Carry-select adder precomputes n-bit sums
▪ For both possible carries into n-bit group

A16:13 B16:13 A12:9 B12:9 A8:5 B8:5 A4:1 B4:1

0 0 0
+ + +

Cout C12 C8 C4
1 1 1 Cin
+ + + +
1

1
0

0
S16:13 S12:9 S8:5 S4:1

13
Carry-Increment Adder
▪ Factor initial PG and final XOR out of carry-select

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

13:12 9:8 5:4

14:12 10:8 6:4

15:12 11:8 7:4

15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0

tincrement =

14
Critical path & TR size
Group PG cell analysis

Black cell Gray cell Buffer


i:k k-1:j i:k k-1:j i:j

i:j i:j i:j

Gi:k Gi:k
Gi:j Gi:j
Pi:k Pi:k Gi:j Gi:j
Gk-1:j Gk-1:j
Pi:j Pi:j
Pi:j
Pk-1:j

▪ Group PG cell design 및 분석


▪ AND, OR를 NAND, NOR, INV로 변경 → logical effort 계산
▪ Bitwise PG logic, sum logic design

16
Example
Step 0. Critical path를 결정

Step 1. Critical path를 구성하는 gate를 파악

Step 2. Logical effort 이론을 적용하여 sizing

Step 3. Delay 계산

* Branch의 계산에 유의할 것


bi = (Conpath+Coffpath) / Conpath , B = Π bi

* F1/N을 구했을 시 이상적인 4가 아닐 수 있으나,


# of stage를 구하는 것이 아닌 정해진 stage의
delay를 줄이는 것에 유의할 것

17
Simulation
서버 접속

클릭

▪ 교내 ip에서만 접속이 가능하므로, 컴퓨터실이나 개인 노트북을 이용할 것


▪ MobaXterm 실행, (무료로 설치 가능하니, 노트북인 경우 설치 필요)
▪ 다운로드 링크는 https://mobaxterm.mobatek.net/download.html (portable이나 installer나 상관 없음)
▪ Seesion 클릭

19
서버 접속

1. 설정

2. 클릭

▪ 서버 주소 입력 (165.132.112.166)
▪ Specify username 체크 후, 조별 ID 입력
▪ OK 클릭

20
서버 접속

▪ Password 입력 후 엔터 (*이나 문자로 표시되지 않으니 유의)


▪ 접속 완료

21
Simulation Flow

<Hspice Simulation>
<Cadence Tool> Netlist와 model을 이용하여
회로 schematic Draw Netlist simulation 진행
→ Script 작성 필요

Simulation
Result
<Cscope>
분석 및 보고서 Delay Data Simulation 결과 확인

22
Cadence Schematic Editor
▪ ‘ls’ commend 를 치면 파일 및 폴더들을 볼 수 있다. 또한, 왼쪽의 창을
통하여도 확인할 수 있다.

23
Cadence Schematic Editor
▪ Cadence라는 tool은 꼭 cadence라는 folder로 들어가서 실행해야 함
▪ ‘cd cadence’를 치면 cadence라는 folder로 들어간다는 명령어이다.
▪ 참고) 다시 상위 folder로 이동하는 경우에는 ‘cd ..’입력

24
Cadence Schematic Editor
▪ virtuoso & 를 치면 cadence 창이 뜬다.

▪ 나오는 팝업(What’s New)을 닫고, Tools  Library manager 클릭

25
Cadence Schematic Editor
1. Library manager File →New Library 2.Type any name

26
Cadence Schematic Editor
▪ ‘Do not need process information’ 선택 후 OK

▪ Library 생성 완료

27
Cadence Schematic Editor
1. 생성한 library 선택 후, File  New  Cell View

Cell Name: inverter


Type: schematic
Open with: Schematics L

28
Cadence Schematic Editor
▪ 이제, Inverter를 그리면 된다. 여기서
는 Unit inverter를 예제로 보여준다.
▪ 다시 켜기 위해서는 Library Manager
에서 생성된 inverter의 schematic을
더블 클릭

▪ 자주 쓰이는 단축키
Schematic editor
▪ I: Instance 불러오기
▪ C: copy
▪ W: wire 그리기
▪ L: label 입력
▪ P: pin 불러오기
▪ Q: Instance 상태보기
▪ F: 화면 크기 fit
▪ Ctrl + 휠 : 화면 확대 축소
▪ 방향키 : 화면 이동
▪ Shift + x : schematic 저장

29
Cadence Schematic Editor
1. Type the ‘I’ on the schematic editor.  Browse
2. analogLib  select cell you want  symbol
3. Editor 위에 마우스를 올리면 해당 cell이 보임 2
4. 클릭하여 그림 1

참고) nmos4와 pmos4를 사용

30
Cadence Schematic Editor
▪ Parameter setting

Determine the width


and length
• n (nm)
• u (μm)
You can specify this
values as
parameters.

31
Cadence Schematic Editor
▪ Put PMOS and NMOS on the editor
▪ Set Width and length, as shown below

5fF input capacitance을


갖는 inverter size이므로
이를 기준으로 설계 진행

32
Cadence Schematic Editor
▪ Type ‘w’ to link nodes using wires.

33
Cadence Schematic Editor
▪ Type ‘P’ for making ports.
▪ Input/ output/ vdd/ vss

Pin name

Pin direction
• Input: input port
• Output: output port
• Inputoutput: vdd or vss

34
Cadence Schematic Editor
▪ After you make up the whole circuit, click the save button. (혹은 Shift
+ x)

save

35
Cadence Schematic Editor
▪ 다른 cell에서 불러올 수 있도록, simbol을 만들어야 한다.
▪ Create→ Cellview→ From Cellview → 이어서 나오는 2개의 창 OK 클

36
Cadence Schematic Editor
▪ Symbol 완성

37
Cadence Schematic Editor
▪ Inverter 2단 연결  새로운 cellview를 만든다. (File  New  cell
view)

38
Cadence Schematic Editor
▪ ‘I’ 눌러서 instance 불러오자!

앞서 만든 inverter의
symbol을 불러 올 수 있다.

39
Cadence Schematic Editor
▪ Symbol 2개를 불러서 wire로 연결 후, port까지 연결 후, save한다.
▪ 참고) Label을 붙이면 같은 label의 node 및 같은 이름의 pin과 연결된
다.

40
Cadence Schematic Editor
▪ 설계된 inverter_chain11를 hspice용 hsp file로 export한다.
▪ Virtuoso main 창에서 file  export  CDL을 선택한다.

41
Cadence Schematic Editor
▪ Library Browser를 통해 추출할 schematic을 선택하고 Close한다.
▪ 추출할 file의 이름을 적고 OK 클릭 (가능하다면 Cell의 이름이랑 맞추
는 것이 헷갈리지 않는다.)

42
Cadence Schematic Editor
▪ 추출 완료

▪ 가끔 fail되는 경우가 있다. 이는 schematic editor 창에서 save를 안 했


기 때문이다. 매번 수정 때 마다 save를 눌러주는 습관을 들이도록 한
다.

43
Hspice
▪ Command 창에 ‘ls’를 치면 ‘inverter_chain11.hsp’라는 file이 생겨난 것
을 볼 수 있다. (Cadence folder 내부에)

44
Hspice
▪ ‘vi inverter_chain11.hsp’를 입력하면 vi 편집 창이 뜬다.

1. 왼쪽 그림의 세 줄은 지워주자
• 한 줄을 통째로 지우는 단축키는 ‘dd’.
• 문자 하나 하나를 지우는 건 ‘x’.

2. ‘PM’  pmos
‘NM’  nmos 로 바꿔주어야 한다.
• Insert키를 통해 insert 모드로 바꾼 뒤
입력 및 수정 가능

45
Hspice
▪ 다음은 수정한 hsp file이다.
⚫ vi file을 다 수정했으면 ESC 누르고 :wq
쓰고 enter치면 저장 후 vi 편집기를 나올
수 있다.
⚫ 수정 없이 끝내려면 :q!를 치고 enter치고
나오면 수정을 했더라도 반영되지 않고
편집기를 끝낸다.
⚫ 자세한 vi 편집기를 다루는 방법은
인터넷을 찾아보면 나온다.

46
Hspice
▪ 이제, 시뮬레이션을 위한 sp file을 만들어야 한다. (몇 초 동안 어떤 옵
션으로 돌 것인지 등등)

▪ Command 창에 vi inverter_chain11.sp 를 입력한다.

▪ 원래 있던 파일을 읽을 때도 vi 명령어를 사용하고, 새로운 파일을 만들


때도 ‘vi file 이름’을 치면 새로운 vi 편집창이 떠서 새로운 파일을 만들
수 있다.

47
Hspice
▪ 오른쪽 sp file form을 참고하여 만들
도록 한다.
▪ 주의할 점: 맨 첫 줄은 꼭 비워둘 것!
프로그램이 맨 첫 줄은 인식하지 못함.
▪ 이 파일을 만드는 폴더에
‘45nm_LP.pm’이라는 파일과
‘inverter2.hsp’파일이 있어야 하고 이
를 꼭 include 해야함
▪ v1과 v2는 각각 vddx/vssx를 전압 값
으로 갖는 voltage source이며, 가운
데의 두 값은 양단의 노드를 의미한다.
▪ Vin는 pulse형태의 voltage source이
며, 양단은 in과 gnd이다. 값은 vssx와
vddx를 스윙하며 td, tr, tf, pw, priod를
의미한다.
▪ .tran은 5p의 resolution으로 10n동안
transient simulaion을 진행한다는 의
미이다.

48
Hspice 실행
▪ Command 창에
‘ hspice –i inv_2.sp –o inv_2.lis’ 입력
Simulation하고자 Error 났을 때 확인할
하는 sp file 이름 file이름 및 결과 파일
(input) 이름 (output)

▪ Error가 없으면 다음과 같은 message가 뜸

▪ Error가 날 경우 abort되었다고 나오며 이 때 lis file을 열어 error를 확인


할 수 있음
▪ 시뮬레이션 완료

49
CosmosScope
▪ Command창에 ‘cscope &’를 입력
▪ File → Open → Plotfiles → tr0 files 선택 → Open
▪ tr0 file 이름은 output file이름과 같음

50
CosmosScope
▪ 확인하고자 하는 signal(in, out)을 선택
참고) Signal을 겹치고 한
domain에서 같이 보고 싶을
때는 signal을 끌어서 가지고
오면 됨.

51
CosmosScope
▪ Tools  Measurement tool  Measurement tab을 click  time
domain  delay 선택
▪ 오른쪽 창과 같이 setting
▪ Delay 측정

52
CosmosScope
▪ 파형 선택 후, 빨간 박스 누르
면 cursor가 생기며 움직이며
값 확인 가능
▪ Unit inverter의 FO1 delay
(RC_delay: 6RC / logical
effort: 2)는 아래와 같다.
▪ Rising delay : 39p
▪ Falling delay : 32p
▪ INV chain 구성으로 측정 →
INV 최소 6개 이상으로 구성
하고 뒤쪽 INV의 delay 측정

Rising과 falling에서 delay가 다


른 이유를 생각해보고 보고서
에 작성할 것.

53
Advanced tip
▪ 여태까지 내용은 P/N ratio = 2:1, pinv=1 을 가정함.
▪ 실제 technology 에서 위 가정이 성립하지 않음.
▪ INV chain을 이용한 측정
▪ FO=1, FO=4 delay 측정 → effort, parasitic delay 각각 측정 가능
▪ Rising, falling delay 측정을 통해 drive capability 측정 (P/N ratio)

▪ Delay 개선을 위한 technique → 단, 복잡성 증가


▪ Input ordering delay effect
▪ Asymmetric gates
▪ P/N ratios

54

You might also like