tutorial on quartus, modelsim & krypton cpld boardwel_iitb/course-material/quartus.pdf ·...

24
Create project Create project Simulate design Programming the CPLD (Krypton) Tutorial on Quartus, Modelsim & Krypton CPLD Board Reshma Roshan Wadhawani Electronics Lab (WEL) Department of EE IIT Bombay May 5, 2018 1 / 24

Upload: others

Post on 31-Mar-2021

24 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Tutorial on Quartus, Modelsim & Krypton CPLDBoard

Reshma Roshan

Wadhawani Electronics Lab (WEL)Department of EE

IIT Bombay

May 5, 2018

1 / 24

Page 2: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Objectives

Create a project in Quartus

Simulate the design in Modelsim

Do timing analysis before putting the design into CPLD

Program the CPLD device (Krypton V1.2)

Verify the design loaded into the CPLD

References

2 / 24

Page 3: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Create a project in Quartus

Click on Create New Project Wizard

3 / 24

Page 4: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Create a project in Quartus

Name of the project should be same as the top level entity name

4 / 24

Page 5: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Create a project in Quartus

Select Empty project

5 / 24

Page 6: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Create a project in Quartus

Add files required for the project.

6 / 24

Page 7: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Create a project in Quartus

Select the device

7 / 24

Page 8: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Create a project in Quartus

Simulation will be done using Modelsim

8 / 24

Page 9: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Create a project in Quartus

Summary

9 / 24

Page 10: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Compile the project in Quartus

Compile the project with Ctrl + L or go to Processing − > StartCompilation

10 / 24

Page 11: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Simulate the design in Modelsim

Tools > Run Simulation Tool > RTL Simulation or Gate-LevelSimualtionExpand work directory in the Library tab and double click on thetop module name to simulate it

11 / 24

Page 12: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Simulate the design in Modelsim

To force the values, Right-click the wave and select Force.

12 / 24

Page 13: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Simulate the design in Modelsim

If the value to be given is clock, Right-click and select Clock andgive the required time period.

13 / 24

Page 14: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Simulate the design in Modelsim

Click on Run to get the simulated results

14 / 24

Page 15: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Simulate the design using Testbenches

For the simulation with Test bench. Go to Assignments >Settings.

Click on Test Benches...

15 / 24

Page 16: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Simulate the design using Testbenches

Give the test bench and top level module name. From Test benchand simulation files, browse and select the test bench and clickAdd.

16 / 24

Page 17: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Compile the project in Quartus

Compile the project with Ctrl + L or go to Processing − > StartCompilation

17 / 24

Page 18: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

RTL Simulation in Modelsim

Tools > Run Simulation Tool > RTL Simulation

18 / 24

Page 19: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Gate-level Simulation in Modelsim

Tools > Run Simulation Tool > Gate Level Simulation... OnEDA Gate Level Simulation pop-up Click Run

19 / 24

Page 20: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Assign Pins

Go to Assignments > Pin Planner

Give corresponding PINs in Location column. Compile the project.

20 / 24

Page 21: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Programmer

Now go to Tools >Programmer

Click on Add Files.... Open the Output files folder in projectfolder and select projectname.pof

21 / 24

Page 22: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Generate SVF file

Go to File > Generate (JAM, SVF...)

Browse the directory to store the .svf file

Select the file format to Serial Vector Format(.svf).

Click OK.

22 / 24

Page 23: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Load .svf file to CPLD board

Connect the Krypton board to your PC.Open terminal

Type jtag

In the command console type cable ft2232 vid=0x0403pid=0x6010

Type detect

Load the svfsvf <full-path-of-svf-file> progress

Note: If you are using laptops, you might need to use sudo jtag

23 / 24

Page 24: Tutorial on Quartus, Modelsim & Krypton CPLD Boardwel_iitb/course-material/quartus.pdf · Create projectCreate projectSimulate designProgramming the CPLD (Krypton) Load .svf le to

Create project Create project Simulate design Programming the CPLD (Krypton)

Thank you

24 / 24