Professional Documents
Culture Documents
Bai Tap DTTT
Bai Tap DTTT
3
4
Module
5
Module (cont.)
6
Basic gates
7
Ví dụ: Thực hiện bộ bán tổng
Thực hiện bộ bán tổng (Half Adder) bằng Verilog
myHalfAdder
myXOR
myAND
8
Ví dụ: Thực hiện bộ bán tổng (tt)
myHalfAdder
// Half Adder
myXOR
module myHalfAdder(S, C, a, b);
output S, C;
input a, b;
myAND
xor myXOR (S, a, b);
and myAND (C, a, b);
endmodule
9
Mô phỏng kiểm tra với Test Bench
A B andOut orOut
00 0 0
01 0 1
10 0 1
11 1 1
TEST
10
Test bench cho module AND_OR
11
ModelSIM PE student edition
http://www.mentor.com/company/higher_ed/modelsim-student-edition
12
Installation & Registration
13
Installation & Registration (cont.)
14
Installation & Registration (cont.)
15
ModelSIM project flow
16
Hierarchy (Phân cấp thiết kế)
17
18