Tổng quan thiết kế IC số Nguyễn Nam Phong... Phân loại IC theo chức năng IC số IC tương tự Tín hiệu Tín hiệu số Tín hiệu tương tự Đối tượng Hệ thống Standard Cells... Phân loại IC the
Trang 1Tổng quan thiết kế IC số
Nguyễn Nam Phong
Trang 2Nội dung
• Thiết kế IC số
• Thiết kế hệ thống số
Trang 4IC là gì?
• IC: Integrated Circuit – Vi mạch tích hợp
Trang 5Phân loại IC theo chức năng
IC số IC tương tự
Tín hiệu Tín hiệu số Tín hiệu
tương tự Đối tượng Hệ thống Standard
Cells
Trang 6Phân loại IC theo nền tảng
Trang 7Mô hình thiết kế IC
• BOTTOM UP
Trang 8Mô hình thiết kế IC
• TOP DOWN
Trang 9Quy trình thiết kế IC số
Design specification
Behavioral description
RTL coding
Functional verification and testing
Logic synthesis
Layout verification and implementation
Physical layout
Floor planning, place and route
Gate level nestlist
FAB
Logic verification and testing
Front end Back end
Trang 10Kiến thức cần có
• Các kiến thức cơ bản về thiết kế số
• Electronic Design Automation (EDA) tools
• Hardware Design Language (HDL)
Trang 11Electronic Design Automation tools
Trang 12Synopsys EDA tools
Behavioral Description
RTL Coding
Function Verification
ICC, VCS, Primetime
12
Trang 13VCS
Trang 14Design Compiler
Trang 16Formality
Trang 17IC Compiler
Trang 18Quartus II, Altera DE2
Trang 19Các kiến thức cơ bản về thiết kế số
• Hệ đếm
• Đại số Bool
• Mạch logic tổ hợp
• Mạch logic tuần tự
Trang 20tự từ trên xuống dưới
Trang 22Mux4-1
module unsyn_mux (input a,b,c,d, input [1:0] sel, output out);
wire [1:0] sel_b;
not not0 ( sel_b[0], sel[0] );
not not1 ( sel_b[1], sel[1] );
wire n0, n1, n2, n3;
and and0( n0, c, sel[1] );
and and1( n1, a, sel_b[1] );
and and2( n2, d, sel[1] );
and and3( n3, b, sel_b[1] );
wire x0, x1;
nor nor0( x0, n0, n1 );
nor nor1( x1, n2, n3 );
wire y0, y1;
or or0( y0, x0, sel[0] );
or or1( y1, x1, sel_b[0] );
nand nand0( out, y0, y1 );
endmodule
Trang 23Mux4-1
module unsyn_mux ( input a,b,c,d, input [1:0] sel, output out);
wire t0, t1;
assign out = ~( (t0 | sel[0]) & (t1 | ~sel[0]) );
assign t1 = ~( (sel[1] & d) | (~sel[1] & b) );
assign t0 = ~( (sel[1] & c) | (~sel[1] & a) );
endmodule
Xảy ra song song
Trang 24t0 = ~( (sel[1] & c) | (~sel[1] & a) );
t1 = ~( (sel[1] & d) | (~sel[1] & b) );
out = ~( (t0 | sel[0]) & (t1 | ~sel[0]) );
end
endmodule
Xảy ra tuần tự
Trang 25else if (sel==1) out=b;
else if (sel==2) out=c;
else if (sel==3) out=d;
end
endmodule
Trang 26Mux4-1
module mux4 ( parameter WIDTH = 1 )
( input [WIDTH-1:0] a, b, c, d, input [1:0] sel,
output [WIDTH-1:0] out );
wire [WIDTH-1:0] out, t0, t1;
assign t0 = (sel[1]? c : a);
b (op2), c (op3), d (op4), sel (alu_mux_sel), out (alu_mux_out) );
Trang 27input clk, input d, output reg q );
always @( posedge clk ) begin
q <= d;
end endmodule
Trang 30FSM
• Mealy and Moore
• Cách mã hóa trạng thái:
– Straight forward: 000, 001, 010, 011, 100, 101 v v – Onehot: 0001, 0010, 0100, 1000
– Minimum bit change: 000, 001, 011, 010, 110,
111, 101, 100
Trang 31Moore FSM
• Kiểm tra chuỗi đầu vào =
“1011”, nếu chuỗi đầu vào =
“1011” thì đầu ra = 1
• Chọn kiểu mã hóa straight
forward => S0 = 0, S1 = 1, S2 =
2, S3 =3, S4 = 4
Trang 32Moore FSM
module seq_dect (
input clk, data_in, reset,
output reg data_out
state <= S2; S3:
if (data_in) state <= S4; else
state <= S2; S4:
if (data_in) state <= S1; else
state <= S2; default: state <= S0; endcase
end
Trang 33endcase // case (state)
end // always @ (state)
endmodule // moore_mac