Digital Integrated Circuitsesc.inu.ac.kr/~kcm/epc6055/Lab1.pdfSimulation Tool ModelSim PE 10.4a...
Transcript of Digital Integrated Circuitsesc.inu.ac.kr/~kcm/epc6055/Lab1.pdfSimulation Tool ModelSim PE 10.4a...
Simulation Tool
ModelSim PE 10.4a
ModelSim is an HDL Verification Tool
Developed by Mentor Graphics, an
EDA Tool Expert Company.
Both VHDL and Verilog Descriptions
can be Simulated.
ModelSim can Simulate Designs which
are Described in Mixed Languages (V
HDL, Verilog, and SystemC).
A Free Version can be Downloaded
from http://www.model.com
Chung 2 EPC6055
Contents
Toolchain Installation
Modelsim
Download
Installation
License
Simulation
Half Adder
Full Adder
4 bit Adder
4 bit Adder/Subtractor
Chung 8 EPC6055
Create New Project
Click the “Create New File” icon.
File Name
halfAdder.v
Add file as type
Verilog
10 Chung EPC6055
Half adder
Create Verilog File
x y 0
0 0 1 1 1 0 1 0 1 0 1 1 0 c s 0 0
carry sum
Carry Sum
x y c s
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
x
y s
c
x
y
s
c HA
11 Chung EPC6055
Select the “halfAdder.v” file.
Enter the code into the source window.
Create Verilog File
12 Chung EPC6055
Create Test Bench File
Project -> Add to Project -> New File
Filename
halfAdderTb.v
Add file as type
Verilog
13 Chung EPC6055
4 Bit Adder
Hierachy structure
fourBitAdder0 (4 bit Adder)
bit3
(Full Adder)
halfAdder2 (Half Adder)
halfAdder1 (Half Adder)
halfAdder2 (Half Adder)
halfAdder1 (Half Adder)
halfAdder2 (Half Adder)
halfAdder1 (Half Adder)
halfAdder2 (Half Adder)
halfAdder1 (Half Adder)
27
bit2
(Full Adder)
bit1
(Full Adder)
bit0
(Full Adder)
Chung EPC6055
4 Bit Adder
Hierachy structure
fourBitAdder0 (4 bit Adder)
halfAdder1 (Half Adder)
bit3
(Full Adder)
halfAdder1 (Half Adder)
halfAdder2 (Half Adder)
halfAdder1 (Half Adder)
bit2
(Full Adder)
halfAdder1 (Half Adder)
halfAdder2 (Half Adder)
halfAdder1 (Half Adder)
bit1
(Full Adder)
halfAdder1 (Half Adder)
halfAdder2 (Half Adder)
halfAdder1 (Half Adder)
bit0
(Full Adder)
halfAdder1 (Half Adder)
halfAdder2 (Half Adder)
28 Chung EPC6055