Professional Documents
Culture Documents
2019 2 Digital Microelectronics Project
2019 2 Digital Microelectronics Project
– Adder Design
Digital Microelectronics
2019 - 2
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
5
조 정보
조 번호 이름 조 번호 이름
1조 이상훈 조용민 10조 이건재 도형빈
2조 이정후 황순욱 11조 변윤수 엄도윤
3조 김태령 윤정현 12조 허광회 장재혁
4조 오지상 김준서 13조 양광명 황주영
5조 김세건 고동한 14조 제강민 김영빈
6조 임선묵 최광열 15조 이종훈 이동호
7조 박지아 김재윤 16조 이승훈 문영기
8조 허성수 이수령 17조 신재윤 여동준
9조 이재홍 석민호 강우찬 18조 유재승 김민규
6
Adder 장/단점 분석
및 design choice
Carry-Ripple Revisited
A4 B4 A3 B3 A2 B2 A1 B1 Cin
G4 P4 G3 P3 G2 P2 G1 P1 G0 P0
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
10
Carry-Skip Adder PG Diagram
A16:13 B16:13 A12:9 B12:9 A8:5 B8:5 A4:1 B4: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
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
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
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
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
16
Example
Step 0. Critical path를 결정
Step 3. Delay 계산
17
Simulation
서버 접속
클릭
19
서버 접속
1. 설정
2. 클릭
▪ 서버 주소 입력 (165.132.112.166)
▪ Specify username 체크 후, 조별 ID 입력
▪ OK 클릭
20
서버 접속
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 창이 뜬다.
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
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
30
Cadence Schematic Editor
▪ Parameter setting
31
Cadence Schematic Editor
▪ Put PMOS and NMOS on the editor
▪ Set Width and length, as shown below
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
▪ 추출 완료
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을 만들어야 한다. (몇 초 동안 어떤 옵
션으로 돌 것인지 등등)
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)
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 측정
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)
54