Digital Integrated Circuitsesc.inu.ac.kr/~kcm/epc6055/Lab1.pdfSimulation Tool ModelSim PE 10.4a...

37
Jaeyong Chung SoC Laboratory Incheon National University Digital Integrated Circuits Lab1

Transcript of Digital Integrated Circuitsesc.inu.ac.kr/~kcm/epc6055/Lab1.pdfSimulation Tool ModelSim PE 10.4a...

Jaeyong Chung

SoC Laboratory

Incheon National University

Digital Integrated Circuits

Lab1

Contents

Toolchain Installation

Modelsim

Download

Installation

License

Chung EPC6055 1

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

Download site

www.model.com

Download

Chung 3 EPC6055

Install program

Install modelsim-pe_student_edition

Chung 4 EPC6055

Fill out the form and click the Request License button

Download License File

Chung 5 EPC6055

Download License File

License file is attached to email.

Download license file.

Chung 6 EPC6055

Download directory

C:\Modeltech_pe_edu_10.4a

Download License File

Chung 7 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

Chung 9

Create a new project

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

Test bench source

Create Test Bench File

14 Chung EPC6055

Compile Project

Click the “Compile All” button.

15 Chung EPC6055

Start Simulation

Simulation -> Start Simulation

Select halfAdderTb

16 Chung EPC6055

Start Simulation

Wave window

17 Chung EPC6055

Start Simulation

Select all objects.

Right click and select Add Wave.

18 Chung EPC6055

Start Simulation

Objects are added to wave window.

19 Chung EPC6055

Start Simulation

Enter run into command line

20 Chung EPC6055

Start Simulation

Simulation result

21 Chung EPC6055

Full Adder

Full Adder

22 Chung EPC6055

Module code

Full Adder

23 Chung EPC6055

Test bench

Full Adder

24 Chung EPC6055

Simulation result

Full Adder

25 Chung EPC6055

4 bit Adder

4 Bit Adder

26 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

4 Bit Adder

Module code

29 Chung EPC6055

Test bench

4 Bit Adder

30 Chung EPC6055

4 Bit Adder

Simulation result

31 Chung EPC6055

4 bit Adder/Subtractor

4 Bit Adder/Subtractor

32 Chung EPC6055

Module code

4 Bit Adder/Subtractor

33 Chung EPC6055

Test bench

4 Bit Adder/Subtractor

34 Chung EPC6055

Simulation result

4 Bit Adder/Subtractor

35 Chung EPC6055

Homework

Put correct operators in each blank, and complete a 4

bit Adder/Subtractor.

Verify it through simulation.

36 Chung EPC6055