Upload
linh-phan
View
97
Download
10
Tags:
Embed Size (px)
Citation preview
Introduction to Simulation of
Verilog Designsusing ModelSim-Altera
Presenter: Phong Bui
Email: [email protected]
Digital Image Processing Group
IC Design Lab
Hanoi 29/01/2013
2
Contents
4. Simulate with testbench
3. Simulate without testbench
2. Design Project
1. Introduction
3
1. Introduction
ModelSim is a verification and simulation tool for
VHDL, Verilog, SystemVerilog, and mixed-language
designs.
Software : ModelSim-Altera 6.6d Starter Edition
References : Introduction to Simulation of Verilog Designs Using ModelSim
Graphical Waveform Editor (Altera).
ModelSim Tutorial (Mentor Graphics).
5
2. Design Project
Simple example : f(x1, x2, x3) = x1x2 + x2x3 + x3x1
Verilog code :
module majority(x1, x2 ,x3 ,f);
input : x1, x2, x3; output: f;
assign f = (x1&x2)|(x2&x3)|(x3&x1);
endmodule;
6
2. Design Project
Open the ModelSim simulator. In the displayed window select File > New > Project
7
2. Design Project
A Create Project pop-up box will appear…
1.Enter the name of the project
Choose Project Location
11
2. Design Project
After completed coding, select Compile > Compile all
Compile of majority.v was successfull
13
3. Simulate without testbench
Select Simulate > Start simulation…, Start Simulation window will appear…