搜档网
当前位置:搜档网 › Quartus-II使用教程-完整实例2

Quartus-II使用教程-完整实例2

Quartus-II使用教程-完整实例2
Quartus-II使用教程-完整实例2

Quartus □入门教程

(一个Verilog 程序的编译和功能仿真)

Quartus n 是Altera 公司推出的专业 EDA 工具,支持原理图输入、硬件描述语言的输 入等多种输入

方式。硬件描述语言的输入方式是利用类似高级程序的设计方法来设计出数字 系统。接下来我们对这种智能的

EDA 工具进行初步的学习。使大家以后的数字系统设计更 加容易上手。

\ £JJ 訓闿./ FYQcessho Ejdra Ihlo Inlo Wartimj —Citic-al Wairphj —入 E IKM A 5申卩旧貝6?:1 A Flaci /

[Mswage:

快捷工具栏:提供设置(setting ),编译(compile )等快捷方式,方便用户使用,用户也可 以在菜单栏的下拉菜单找到相应的选项。 菜单栏:软件所有功能的控制选项都可以在其下拉菜单中找到。

信息栏:编译或者综合整个过程的详细信息显示窗口,包括编译通过信息和报错信息。

For Help, press, Fl

Idb 恤

UM

菜单栏

第一步:打开软件

快捷工具栏

Ale

Proje

□ s : U Ci

1 |上电蛊"“ |「 ??■桥忸0 |

?锻

资源管理窗口

工作区

任务管理窗口

iTaAw. ----

-

H-fi* |CQirpild"a 血

T-AGf

E] ? CanpL14

K : Synl^d-Lks

信息栏

uartus □

Pfoject

Navioater

血!Hisrmidv ]色冋离 鼻1 Design

Uris ]

QUARTUS* I iOFTWARI vllt

GCT.THi^l^TrnVE

CiyppalQiLva Mierwchy

-K

entation

]

Ww Quartus II hrfwniBtlori

程中。

第二步:新建工程(file>new Project Wizard )

1工程名称:

工程名称

,要求

如果有已经存在的文 件就在

该过程中添加, 软件将直接将用户所

添加的文件添加到工 所建工程的保存路径

Use Existing Prefect Settrgs

2添加已有文件(没有已有文件的直接跳过

next )

取消

Hext 》 Finish

顶层模块名(芯片级设计为实体名) 与工程名称相同

What is the rame of the lop-level design enU^J for this project? This name case serisiliwe ardw*^ e*acily rrmteh the entity naime in the design He. pest

New Project Wizard: LMrectory ? Name, Top-Level Entity

5]

What is the working diiectory for this proiecl?

| C:\Dociments an d S ettings\LXQ 煌面 '国彖拮品课程傲件测试

name of this 迎呵日 ct?

|te 址

New Project Wizard: Add Files [page 2 of 5]

a

< Back I 恥毗〉" Finish | 恥弟

3选择芯片型号(我们选择 cyl one II 系列下的EP2C70F896C6芯片) (注:如果不下载到开发板上进行测试,这一步可以不用设置

HardLopy: |

疋 Limit DSP & RAM to HardCopy device resoijrce

4选择仿真,综合工具(第一次实验全部利用 quartus 做,三项都选 None ,然后next )

Setaa the design files yoo wart to include in the protect.匚lick Add Alt to add all desig n files in Itie project directory to ths project. W ote: yuu can allways add design files to the project latar,

Speedy the path names ol anj/ non-default libraries. IJ^er Librai*e$

所选的芯片 的系列型号

Mew Project Wizard: Family & Device Settings [page 3 of 5J

Select the family arid devicepou want to taget for compilation.

快速搜索所需的芯片

Fandy:

■ny

Rih court:

Target device

C Auto device selected the Fitter

5pecMic device selected in 'Available devices 4 list

Sp^ed grade : Ar (y

P Show advanced devices r Hard Copy CGiripatible only

选择芯片

Available devices:

Name ____________________ Coiev... LEs

EP2C70FS72C7 ' 1.2V

6841S

EP2C70F672CS

1.2V

68416 EP2C70FS72ie

1.2V 5别 W EP2C7DF096C6 1.2V 68416 EP2C70F89eC7

1.2V

68416 EP2C70F996C8

1.2V

68416 EP2C70F89GI8 1.2V

68416

dJ.L_

r Con^panion device

Memor...

22222

22222

1152DOO 300 1152000 1152000 300 Ented... PLL

4

4 d 300 1152000 300 1152000 300 1152000 300

< Btck

彌\》—]F i ni wh | 职消

Devices

Cycfthe II

Show in Available device' li

Package: 4

4

4

选择第二方综合工具,如果 使用

Quartus 内部综合工具 贝U 选择none

选择第三方仿真工具,如果 使用

Quartus 内部仿真工具 贝U 选择none

5工程建立完成(点finish )

Hew Project Wizard: Suminary [page 5 of 5J |X

When>ou cbck Finish, the project wril be cieated with the following settings :

Projett name :

T gp-level design entity: lest Number of fifes added:

Number of u^r libraii&$ added : 0

Device assignments:

Family name ::

Cj^clone II Device:

EP2C70FE96C6

EDA tools:

Design entry/syntlhesis:

Simulation;

Timing analysis:

Operating condition:

Core voltage: 1 2V

Junction lemperMure range: 0'85^

Project direcltfy:

E -

/国家蓿品课程撒件测试/

工程建立完成,该窗口显示所建立工程所有 的芯片,其他第三方 EDA 工具选择情况, 以及模块名等等信息。

选择时序分析仪

第三步:添加文件(file>n ew> VHDL file),新建完成之后要先保存。

SOPC Builder System 人

-Design Files

AHDL File

E lock D iagram/S chenftatic File ________________________________________________________________________________

EDiFFiig 我们选择Verilog HDL File设计文件格式既选择Verilog文本输入形式

State Machine File

SystemVerilog HDL File

目HDLFil —

-Memoiy Files

Hewadecimal (InbekFcimat) File

Memoiy Initi日li拍lion File

-Verification/D ebugging Files

I n-Sy?tenri Sources and Probes File Logic Answer Inlerface File SignalTap II Logic Analyzer File Vector Waveform File

-Other Filec

AHDL Include File

Block Symbol File

Chain Description File

S^iopsys Design Constraints File T ext File

OK Cencel

第四步:编写程序

以实现一个与门和或门为例,Verilog描述源文件如下: module test(a,b,out1,out2); in put a,b; output out1,out2;

assig n out仁a&b;

assig n out2=a | b;

en dmodule

然后保存源文件;

第五步:检查语法(点击工具栏的这个按钮(start Analysis & synthesis))

global Settr

点击确定完成语法检查

第六步:(锁定引脚,点击工具栏的’—"(pin planner ))

(注:如果不下载到开发板上进行测试,引脚可以不用分配

双击location 为您的输入输出配置引脚

Flow Summary

语法检查成功,没有

error 级别以上的错误

Fl?v Statui

S'QiCC?EEf I ul -

Qu&rtu.3 II Version 9.0 Build 13: ReVfe S&Jlsfi test Top-levo-l Enti ty t q-st F?ily ryeldifift II Devi ce

SP2CT0J596C 6

TiaiaDg Nodels

F in?l Met tinsn^: requir entents

?/A Tot H 1

slsirTiAIltE 2

该窗口显示了语法检查后的详细 信息,包括所使用的io 口资源的多 少等内容,相应的英文名大家可以 pins bits

i pl i 9-bit eliarientE

D 4 fl 0

自己查阅

2

Fri 丁心 22 09 K 20 2011

'02/25/2009 SJ Full

Total ccrfnbinali^nd. funcIi ons

Dedalogri e sifters

To t al re jg.1 5 ters TfLiAL 航1i rim

Ars 3L$yrl±ieEtE gurceEsfLl

第七步:整体编译(工具栏的按钮(start Complilati on))

II Versi on Revision Hwe

1 op~l ijvel Entity Ham电

Fin辽y

Device*

Timing, Hodela

timimy r4"iuiran

Totil l>e el^nenlE

Total c^mbinafim?

Dedicat?ed_ logic registeiE Tot J Tigi =ltF5

Total pins

Totftl var 1 u.J pin玉

Total memory bits

Enlftdd?>d lultiplitr 9-bi I tlMuts Total PLLs Wuw.Mul - ¥rt Jul 22 09:37:56 2011

9.0 Build 132 CE/25/2009 SJ FoLl Version

last

认妣

CycloEtt II

EP2C7GF896C

6

Final

该窗口给出综合后代码的资源使用

情况既芯片型号等等信息。

第八步:testbench仿真

仿真环境配

置:y Settings - XUEX11T?i

2 / 68,116 ( < 1 % )

2 / 63. ( < 1 % J

0 i68, 41& ( fl % )

4/622 ( < 1 % )

fl / 1, 152,000 ( 0 ? )

0 / 3X ( 0 )

0/4 ( 0 % )

选择为使用端

口选项卡

E3

Categ&y :

相关主题