Tải bản đầy đủ (.pdf) (10 trang)

tổng hợp luận lý vi mạch

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (223.21 KB, 10 trang )

BK
TP.HCM
2008
dce
Tổng hợpluậnlývi mạch
2010
dce
Giớithiệu
•Mônhọc: Tổng hợpluậnlývi mạch
–Mãsố:
–Số tín chỉ: 3
•Giảng viên:
– Dr. Tran Ngoc Thinh
• Email:
• Phone: 8647256 (5843)
• Office: A3 building,
• Office hours: Tuesdays, 9:30-11:00
2
2010
dce
Giớithiệumônhọc
•Nội dung:
–Giớithiệuvề thiếtkế vi mạch
–Biến đổitừ các đặctả ngôn ngữ HDL
–Nắm quy trình tổng hợp, kiểmtra, kiểmthử các mạch 2
lớpvànhiềulớp
• Đốitượng:
– Sinh viên cao học
– Sinh viên đạihọcnăm3-4
• Đánh giá
–Tiểuluận: 30%


– Trình bày: 30%
–Kiểmtracuốikỳ: 40%
3
2010
dce
Nội dung môn học
•Tổng quan về thiếtkế luậnlývi mạch
•Mạch tổ hợp2 mức
•Tổng hợpmạch tổ hợp2 mức
•Kiểmthử mạch tổ hợp2 mức
•Mạch tổ hợp nhiềumức
•Tổng hợpmạch tổ hợp nhiềumức
•Kiểmthử mạch tổ hợp nhiềumức
4
2010
dce
Tài liệu tham khảo
[1]. Logic Senthesis – Srinivas Devadas, Abhijit Ghosh, Kurt
Keutzer
[2]. Synthesis and Optimization of Digital Circuits –
Giovanni De Micheli
5
BK
TP.HCM
2008
dce
Chương 1: Giớithiệutổng quan
¾Tổng quan
¾Mạch tổ hợp2 mức
¾Mạch tổ hợp nhiềumức

¾Kiểm tra (verification)
¾Kiểmthử (testing)
2010
dce
Tổng quan
•Mạch số tích hợp
•Phương pháp thiếtkế IC
•Bố trí mứctransistor
•Mứccổng
• Initial use of Logic Optimizaion
• Emergence of Synthesis-Base Design
• A Logic Synthesis Design Methodology
7
2010
dce
Design of Integrated Circuits
System Level
System Level
Register Transfer Level
Register Transfer Level
Gate Level
Gate Level
Transistor Level
Transistor Level
Layout Level
Layout Level
Mask Level
Mask Level
D
e

s
i
g
n
D
e
s
i
g
n
V
e
r
i
f
i
c
a
t
i
o
n
V
e
r
i
f
i
c
a

t
i
o
n
2010
dce
System Level
• Abstract algorithmic description of high-level behavior
– e.g. C-Programming language
– abstract bởi vì nó không chứabấtcứ hiệnthực chi tiết nào cho thời
gian hoặcdata
–Hiệuquảđểđạt đượcmộtmôhìnhthựcthirútgọn ở giai đoạn đầu
tiên củathiếtkế
–Khókhăn để duy trì sự xuyên suốtdự án bởi vì không liên kết đến
phầnhiệnthực
Port*
compute_optimal_route_for_packet(Packet_t *packet,
Channel_t *channel)
{
static Queue_t *packet_queue;
packet_queue = add_packet(packet_queue, packet);

}
2010
dce
RTL Level
module mark1;
reg [31:0] m[0:8192];
reg [12:0] pc;
reg [31:0] acc;

reg [15:0] ir;
always
begin
ir = m[pc];
if (ir[15:13] == 3b’000)
pc = m[ir[12:0]];
else if (ir[15:13]==3’b010)
acc = -m[ir[12:0]];

end
endmodule
module mark1;
reg [31:0] m[0:8192];
reg [12:0] pc;
reg [31:0] acc;
reg [15:0] ir;
always
begin
ir = m[pc];
if (ir[15:13] == 3b’000)
pc = m[ir[12:0]];
else if (ir[15:13]==3’b010)
acc = -m[ir[12:0]];

end
endmodule
• Cycle accurate model
“close” to the hardware
implementation
–Những kiểudữ liệubit-

vector và cách hoạt động
đượctrừutượng hóa từ
hiệnthực bit-level
–Cấutrúctuầntự (e.g. if -
then - else, while loops) để
ủng hộ mô hình dòng điều
khiểnphứctạp.
2010
dce
Gate Level
• Model on finite-state machine level
–Những mô hình chứcnăng trong luận lý Boolean
sử dụng registers và gates
– Các mô hình delay khác nhau cho gates và wires
1ns
1ns
4ns
4ns
3ns
3ns
5ns
5ns
2010
dce
Transistor Level
• Model on CMOS transistor level
– Được dùng trong kiểmtrasự tương đương chức
năng
–Hoặc phân tích chi tiếtvề timing
2010

dce
Layout Level
• Transistors và wires được đặtnhư các
polygons trong các lớp khác nhau như
diffusion, poly-silicon, metal, etc.
2010
dce
Design of Integrated Systems
Relative Effort
Relative Effort
Project Time
Project Time
System
System
RTL
RTL
Logic
Logic
-
-
Design phases overlap to large degrees
Design phases overlap to large degrees
-
-
Parallel changes on multiple levels, multiple teams
Parallel changes on multiple levels, multiple teams
-
-
Tight scheduling constraints for product
Tight scheduling constraints for product

Transistor
Transistor
2010
dce
Design Challenges
• Systems đang trở nên lớnhơn, thờigianthiếtkế ngày càng
phải rút ngắn
– > 100 Mio gates càng phổ biến cho ASICs
– > 0.4 Mio dòng của C-code để mô tả hành vi hệ thống
– > 5 Mio dòng của RLT code
• Design teams rấtlớn cho những projects lớn
–Vàitrămngười
–Kỹ năng khác nhau
– Làm việc đồng thời ở nhiềumức khác nhau
–VIệcquảnlýđộ phứctạpvàliênlạcthiếtkế là rấtkhókhăn
• Design tools đang ngày càng phúc tạphơnnhưng vẫnchưa
đáp ứng yêu cầu
– Thông thường ngườithiếtkế phảichạykhoảng 50 tools cho mỗi
component
– tools có nhiềulỗi, interfaces chưa thân thiệnetc.
2010
dce
Design Challenges
•Quyết định về design point là rấtkhó
– performance / costs / time-to-market
–Quyết định phải đượcthựchiện2-3 years trước khi hoàn
thành thiếtkế before design finished
–Cácthời điểmthiếtkế rấtkhóđoán trướcnếu không làm
thậtsự
–Xácđịnh vòng đờisảnphẩm

• Functional verification
–Môphỏng vẫnlàcôngcụ chính cho kiểmtrachứcnăng
nhưng không đủ bởivìkíchthướccủa không gian thiếtkế
–Cáclỗi trong released hardware thì rất đắt để khắcphục
(khác với software)
2010
dce
Design Challenges
• Tradeoffs cơ bảngiữacácmức mô hình hóa khác
nhau:
– modeling detail and team size to maintain model
• high-level models có thểđượckiểm soát bởi1 hoặc2 người
• detailed models cần được phân hoạch mà kếtquả là sự khó khăn
trong việc liên lạcgiữacáckhối
– modeling accuracy versus modeling compactness
• compact models bỏ qua các chi tiếtvàđưarachỉ những ước
lượng sơ khai cho hiệnthực
• detailed models thì kéo dài và khó khăn để thích nghi vớinhững
thay đổi trong thiếtkế
– simulation speed versus hardware performance
• high-level models có thể mô phỏng nhanh nhưng không thể hiện
thựchiệuquả vớinhững phương tiệntựđộng
• low-level models có thể hiệnthực nhanh chóng nhưng khó mô
phỏng
2010
dce
Full Custom Design Flow
• Application: những thiếtkế hiệusuấtcựccao
– general-purpose processors, DSPs, graphic chips, internet
routers, games processors etc.

• Target: thị trường lớnvàlợi nhuậncao
– e.g. PC business
• Complexity: rấtcaovàđòi hỏilab hiện đại
– Độingũ lớn, đầutư cao và rủirocũng cao
• Vai trò Logic Synthesis:
–Hạnchế chỉ cho components không chuẩn hóa về hiệu
suấthoặccóthể thay đổisauđótrongchutrìnhthiếtkế
• non-critical data paths logic và control logic
–Mộtlượng lớn data-path components và fast control logic
đượcthiếtkế thủ công để tối ưuhiệusuất
2010
dce
Full Custom Design Flow
ISA Specification
ISA Specification
RTL Spec
RTL Spec
Gate Level Netlist
Gate Level Netlist
Transistor Level Circuit
Transistor Level Circuit
Layout
Layout
Circuit Simulation
Circuit Simulation
Simulation
Simulation
Design Rule Checker
Design Rule Checker
Formal

Formal
Equivalence
Equivalence
Checking
Checking
Simulation
Simulation
Logic Synthesis
Logic Synthesis
Manual or
Manual or
semi
semi
-
-
automatic
automatic
Design
Design
Extract&Compare
Extract&Compare
2010
dce
ASIC Design Flow
• Application: thị trường IC thông dụng
– peripheral chips in PCs, toys, handheld devices etc.
• Target: thị trường trung bình và nhỏ, thờigianthiết
kế hạnchế
– e.g. consumer electronics
• Complexity of design: kiểuthiếtkế chuẩn, đoán

trước được
– standard flows, standard off-the-shelf tools
• Vai trò Logic Synthesis:
– Đượcsử dụng tỉ lệ cao trong thiếtkế ngoạitrừ những khối
đặcbiệtnhư RAM’s, ROM’s, analog components
2010
dce
ASIC Design Flow
Informal Specification
Informal Specification
RTL Spec
RTL Spec
Gate Level Netlist
Gate Level Netlist
Modifies Gate Level Netlist
Modifies Gate Level Netlist
Static Timing Analysis
Static Timing Analysis
Formal
Formal
Equivalence
Equivalence
Checking
Checking
Simulation
Simulation
Logic Synthesis
Logic Synthesis
Manual Changes
Manual Changes

to fix timing
to fix timing
ASIC Foundry
ASIC Foundry
Test Logic Insertion
Test Logic Insertion
2010
dce
What is Logic Synthesis?
• Definition: To design a logic circuit such that it
meets the specifications and can be
economically manufactured:
• Performance – đạtnhững yêu cầuvề delay hoặctối
thiểu delay.
• Cost – dùng hardware ít nhất, diện tích chip nhỏ nhất,
số lượng gates hoặc transistors nhỏ nhất.
• Power – đạtcácyêucầuvề power, tiêu thụ power ít
nhất.
• Testablility – không có dư thừa logic và dễ kiểmtra.
Fall 2008, Oct 24 . . .
Fall 2008, Oct 24 . . .
ELEC2200
ELEC2200
-
-
002 Lecture 6
002 Lecture 6
22
22
2010

dce
What is Logic Synthesis?
D
D
X
X
Y
Y
λ
δ
Given:
Given:
Finite
Finite
-
-
State Machine F(X,Y,Z, , ) where:
State Machine F(X,Y,Z, , ) where:
λ
δ
X: Input alphabet
X: Input alphabet
Y: Output alphabet
Y: Output alphabet
Z: Set of internal states
Z: Set of internal states
: X x Z Z (next state function)
: X x Z Z (next state function)
: X x Z Y (output function)
: X x Z Y (output function)

λ
δ
Target:
Target:
Circuit C(G, W) where:
Circuit C(G, W) where:
G: set of circuit components g {Boolean gates,
G: set of circuit components g {Boolean gates,
flip
flip
-
-
flops, etc}
flops, etc}
W: set of wires connecting G
W: set of wires connecting G

2010
dce
Quy trình thiếtkế tổng hợp thông thường
Behavioral
Specification
Manual
Entry
Behavioral
Synthesis
Tools
RTL Description
Translation
Tools

Unoptimized Logic
Description
Logic Optimization
Technology
Mapping
Optimized Logic
Description
Physical
Design Tools
Layout
Integrated Circuit
Module
Generators
Custom
Layout
Test
Generation
Test
Library
24
2010
dce
MụctiêucủaSynthesis
• Minimize area
–số lượng cell, register, etc.
• Minimize power
–Hoạt động chuyểnmạch trong individual gates, deactivated circuit
blocks, etc.
• Maximize performance
–Tối ưu clock frequency của synchronous systems, throughput của

asynchronous systems
•Kếthợp các giảipháptrên
–Kếthợpvớinhững trọng số khác nhau
– Công thức hóa như mộtvấn đề ràng buộc
• “minimize area for a clock speed > 300MHz”
• More global objectives
– feedback from layout
• actual physical sizes, delays, placement and routing
2010
dce
Constraints on Synthesis
• Given implementation style:
–Hiệnthực hai mức (PLA, CAMs)
–Hiệnthực nhiềumức, FPGAs
• Given performance requirements
–Yêucầutốithiểucủa clock speed
–Yêucầutốithiểu latency, throughput
• Given cell library
–Tập các cells trong cell library
– fan-out constraints (tối đasố gates đượcnốivới gate
khác)
2010
dce
Brief History of Logic Synthesis
• 1960s: first work on automatic test pattern generation used
for Boolean reasoning
– D-Algorithm
• 1978: Formal Equivalence checking introduced at IBM in
production for designing mainframe computers
– SAS tool based on the DBA algorithm

• 1979: IBM introduced logic synthesis for gate array based
main frame designed
– LSS, next generation is BooleDozer
• End 1986: Synopsys founded
– first product “remapper” between standard cell libraries
– later extended to full blown RTL synthesis
• 1990s other synthesis companies enter the marker
– Ambit, Compass, Synplicity. Magma, Monterey,
2010
dce
Why learning about Logic Synthesis?
• Logic synthesis là hạt nhân của các CAD tools
ngày nay cho thiếtkế IC và system.
–Baogồmnhiềugiảithuậtsử dụng rộng rãi trong
CAD tools
–Cơ bảnchocáckỹ thuậttối ưukhác, e.g.
embedded software
–Cơ bảnchocáckỹ thuậtkiểmtrachứcnăng
•Phầnlớngiảithuật là khó tính toán
2010
dce
Phương pháp thiếtkế IC
• Hai tham số ràng buộc quá trình thiếtkế IC:
–Chấtlượng củamạch
–Thờigianđưasảnphẩmrathị trường
29
2010
dce
Mạch số tích hợp
• Integrated circuit

• Transistor-level
– Silicon compiler
• Gate array và standard cell
–Mộttập các transitor và các kếtnối đượccấuhình
trong mộtIC
–Nor cell
• Gate-level
– Đượcsử dụng từ những năm 1970
30
2010
dce
Mạch tổ hợp2 mức
•Cónhiềudạng mạch logic 2 mức:
– Sum-of-Product (AND-OR)
– Product-of-Sum (OR-AND)
–NOR-NOR
– NAND-NAND
–AND-XOR
–…
31
2010
dce
Two-Level AND-OR Implementation
• Technology-independent circuit.
Fall 2008, Oct 24 . . .
Fall 2008, Oct 24 . . .
ELEC2200
ELEC2200
-
-

002 Lecture 6
002 Lecture 6
32
32
A
B
C
D
F1
F2
P1
P2
P3
P4
INPUTS AND OR
2010
dce
NAND-NAND Implementation
Fall 2008, Oct 24 . . .
Fall 2008, Oct 24 . . .
ELEC2200
ELEC2200
-
-
002 Lecture 6
002 Lecture 6
33
33
INPUTS NAND NAND
A

B
C
D
F1
F2
1P
2P
4P
3P
2010
dce
Mạch tổ hợp2 mức
• Ưu điểmcủamạch 2 mức
–PLA vàmạch logic 2 mứccóthể hiệnthựchiệu
quả các khối điềukhiểnlogic.
–Việctối ưudạng Sum-of-Product thường đượcsử
dụng trong giai đoạn đầutiêncủa quá trình tổng
hợpnhiềumức
•Nhược điểm:
–Nhiềuhàmquytắc có chung mộtdạng tốigiản2
mức
–Cókíchthướctăng theo cấpsố nhân khi tăng số
ngõ nhập
34
2010
dce
Mạch tổ hợp nhiềumức
•Thường đượcsử dụng nhiềuhơncácmạch tổ hợp2 mức
• Nhanh hơnvànhỏ hơnso vớiviệchiệnthựccủamạch 2
mức

•Mạch tổ hợp nhiềumứcthường đượcthể hiện ở dạng mạng
nhiềumứccủacáccổng (multi-level networks of logic gate)
Cho phép tự do hơn trong việcthiếtkế
–Tối ưudiện tích
–Delay
–Thỏa mãn các ràng buộc (ví dụ: các yêu cầuvề thờigiantrêncác
đường xuấtnhập khác nhau)
•Nhược điểm
– Khó mô hình hóa và tối ưumạng nhiềumức (multi-level networks)
35
2010
dce
Kiểmtra
•Kiểm tra tính chính xác củabảnthiếtkế
– Đượcthựchiệnbởi quá trình mô phỏng
(simulating) hoặckiểmtrahìnhthức(formal
methods)
–Môphỏng là mộtkỹ thuậtthường dùng nhấtcủa
quá trình kiểmtra
•Kiểm tra tính consistency giữa đặctả hành vi
và đặctả RTL
36
2010
dce
Kiểmthử
• Nguyên nhân: Quá trình sảnxuấtsảnxuất
phứctạp và không hoàn hảo
•Mục đích:
– Phát hiệnlỗicủamạch
–Phânloạichấtlượng trướckhiđưavàothị trường

– Phát hiệnnhững kiếmkhuyết trong quá trình sản
xuất
•Cácloạikiểmthử:
– Fault detection
– Fault Diagnosis
37
2010
dce
Kiểmthử
• Quy trình: Sử dụng các mẫukiểmthử và so
sánh kếtquả
•Cácloạilỗi
–Lỗivật lý (physical fault):
•Lỗitĩnh (static/logic fault)
•Lỗi động (dynamic/parametric fault)
38
2010
dce
Kiểmthử
• Các mô hình lỗi (fault model): các mô hình
đượcsử dụng trong quá trình sinh mẫukiểm
thử:
– Static fault model: single stuck-at, multiple stuck-
at, bridging fault
– Dynamic fault model: gate delay fault, transistor
stuck-open fault, path delay fault
– Comprehensive fault model: các mô hình có chỉ
định vị trí củalỗi.
• Debug lỗimạch
•Sửa (fix) lỗi quy trình sảnxuất

39
2010
dce
Tham khảo
• Chapter 1, Logic Senthesis – Srinivas
Devadas, Abhijit Ghosh, Kurt Keutzer
40

×