




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实验1 EDA工具的使用一、实验目的通过使用Verilog HDL语言创建一个简单的数字电路来了解Xilinx Vivado软件的使用方法,掌握其设计流程。一个典型的设计流程包括(如图1所示):模型创建、添加用户约束文件、创建一个Vivado工程、输入所创建的电路模型、对用户约束文件添加约束、行为仿真、设计综合、设计实现、生成下载文件,最后是将下载文件下载到硬件平台上进行实际验证。图1 设计流程图二、实验内容1. 创建一个Vivad工程,对设计源文件进行分析;2. 使用XSim仿真器对设计进行仿真;3. 设计综合;4. 设计实现;5. 进行时序仿真;6. 生成下载文件。三、实验步骤使用现成的设
2、计文件针对XC7A100TCSG324C-1器件完成整个设计流程。电路如图2所示,部分输入通过逻辑处理后送到输出。具体操作步骤如下:图2 整个电路图3.1 用IDE创建一个Vivado工程1. Open Vivado by selecting Start All Programs Xilinx Design Tools Vivado 2014.2 Vivado 2014.22. Click Create New Project to start the wizard. You will see Create A New Vivado Project dialog box. Click Next
3、.3. Click the Browse button of the Project location field of the New Project form, browse to, for example d:Lab1_source, and click Select.4. Enter tutorial in the Project name field. Make sure that the Create Project Subdirectory box is checked. Click Next. 5. Select RTL Project option in the Projec
4、t Type form, and click Next. 6. Select Verilog as the Target language and Simulator language in the Add Sources form. 7. Click on the Add Filesbutton, browse to the d:Lab1_source directory, select tutorial.v, click Open, and then click Next. 8. Click Next to get to the Add Constraints form. 9. Click
5、 Next if the entry is already auto-populated, otherwise click on the Add Filesbutton, browse to the d:Lab1_source directory and select tutorial.xdc, and click Open. 10. In the Default Part form, using the Parts option and various drop-down fields of the Filter section, select the XC7A100TCSG324-1 pa
6、rt. Click Next.11. Click Finish to create the Vivado project.12. Open the tutorial.v source and analyze the content.13. Open the tutorial.xdc source and analyze the content.14. Perform RTL analysis on the source file. Expand the Open Elaborated Design entry under the RTL Analysis tasks of the Flow N
7、avigator pane and click on Schematic. The model (design) will be elaborated and a logic view of the design is displayed. Notice that some of the switch inputs go through gates before being output to LEDs and the rest go straight through to LEDs as modeled in the file.3.2 用XSim Simulator对设计进行仿真1. Add
8、 the tutorial_tb.v testbench file. Click Add Sources under the Project Manager tasks of the Flow Navigator pane. Select the Add or Create Simulation Sources option and click Next. In the Add Sources Files form, click the Add Files Button. Browse to the d:Lab1_source folder and select tutorial_tb.v a
9、nd click OK. Click Finish. 2. Select the Sources tab and expand the Simulation Sources group. The tutorial_tb.v file is added under the Simulation Sources group, and tutorial.v is automatically placed in its hierarchy as a tut1 instance. 3. Double-click on the tutorial_tb in the Sources pane to view
10、 its contents. The testbench defines the simulation step size and the resolution in line 1. The testbench module definition begins on line 5. Line 15 instantiates the DUT (device/module under test). Lines 17 through 26 define the same module functionality for the expected value computation. Lines 28
11、 through 39 define the stimuli generation and compares the expected output with what the DUP provides. Line 41 ends the testbench. The $display task will print the message in the simulator console window when the simulation is run.4. Simulate the design for 200 ns using the XSim simulator. Select Si
12、mulation Settings under the Project Manager tasks of the Flow Navigator pane. A Project Settings form will appear showing the Simulation properties form. Select the Simulation tab, and set the Simulation Run Time value to 200ns and click OK. Click on Run Simulation Run Behavioral Simulation under th
13、e Project Manager tasks of the Flow Navigator pane. The testbench and source files will be compiled and the XSim simulator will be run (assuming no errors). You will see a simulator output similar to the one shown below. 5. Click on the Zoom Fit button () located left of the waveform window to see t
14、he entire waveform.6. Change display format if desired. Select i31:0 in the waveform window, right-click, select Radix, and then select Unsigned Decimal to view the for-loop index in integer form. Similarly, change the radix of switches7:0 to Hexadecimal. Leave the leds7:0 and e_led7:0 radix to bina
15、ry as we want to see each output bit.7. Add more signals to monitor lower-level signals and continue to run the simulation for 500 ns. Expand the tutorial_tb instance, if necessary, in the Scopes window and select the tut1 instance. The swt7:0 and led7:0 signals will be displayed in the Objects wind
16、ow. Select swt7:0 and led7:0 and drag them into the waveform window to monitor those lower-level signals. On the simulator tool buttons ribbon bar, type 500 in the time window, click on the drop-down button of the units field and select ns, and click on the () button.8. The simulation will run for a
17、n additional 500 ns. Click on the Zoom Fit button and observe the output.9. Close the simulator by selecting File Close Simulation. Click OK and then click No to close it without saving the waveform.3.3 设计综合1. Click on Run Synthesis under the Synthesis tasks of the Flow Navigator pane.2. Select the
18、Open Synthesized Design option and click OK as we want to look at the synthesis output before progressing to the implementation stage. Click Yes to close the elaborated design if the dialog box is displayed. 3. Select the Project Summary tab (Select default layout if the tab Is not visible) and unde
19、rstand the various windows.4. Click on Schematic under the Open Synthesized Design tasks of Synthesis tasks of the Flow Navigator pane to view the synthesized design in a schematic view. 3.4 设计实现1. Click on Run Implementation under the Implementation tasks of the Flow Navigator pane. The implementat
20、ion process will be run on the synthesis output files. When the process is completed an Implementation Completed dialog box with three options will be displayed.2. Select Open implemented design and click OK as we want to look at the implemented design in a Device view tab.3. Click Yes to close the
21、synthesized design. The implemented design will be opened. 4. In the Netlist pane, select one of the nets (e.g. n_0_led_OBUF1_inst_i_1) and notice that the net displayed in the X1Y1 clock region in the Device view tab (you may have to zoom in to see it). 5. Close the implemented design view and sele
22、ct the Project Summary tab (you may have to change to the Default Layout view) and observe the results.3.5 进行时序仿真1. Select Run Simulation Run Post-Implementation Timing Simulation process under the Simulation tasks of the Flow Navigator pane. The XSim simulator will be launched using the implemented
23、 design and tutorial_tb as the top-level module. Using the Windows Explorer, verify that timing directory is created under the tutorial.sim sim_1 impl directory. The timing directory contains generated files to run the timing simulation.2. Click on the Zoom Fit button to see the waveform window from
24、 0 to 200ns. 3. Right-click at 50ns (where the switch input is set to 0000000b) and select Markers Add Marker. 4. Similarly, right-click and add a marker at around 55.000ns where the leds changes. 5. You can also add a marker by clicking on the Add Marker button (). Click on the Add Marker button an
25、d left-click at around 60ns where e_led changes. Notice that we monitored the expected led output at 10ns after the input is changed (see the testbench) whereas the actual delay is about 5.000ns. 6. Close the simulator by selecting File Close Simulation without saving any changes. 3.6 生成下载文件1. Click on the Generate Bitstream entry under the Program and Debug tasks of the Flow Navigator pane. The bitstream generati
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 海洋产业集群空间布局
- 2025年四川大道致远供应链管理公司市场管理招聘考试笔试试题(含答案)
- 2025年宁波仑大碶街道招聘考试笔试试题(含答案)
- 铲车操作人员安全教育与培训合同
- 餐饮场地租赁及品牌形象设计合作协议
- 大学党务面试题库及答案
- 大理体彩考试题及答案
- 施工安全监督站
- 车辆及运输管理制度
- 初级安检考试题及答案
- 历史明清时期的科技与文化课件-2024-2025学年统编版七年级历史下册
- 爆破三员培训
- 2025-2030中国水溶性肥料行业市场发展分析及前景趋势与投资研究报告
- 《水上客运重大事故隐患判定指南(暂行)》知识培训
- 酒库管理安全知识
- 贷款申请资料清单表
- 2024年1月国家开放大学汉语言文学本科《古代诗歌散文专题》期末纸质考试试题及答案
- 弱电工程项目经理职责
- DB3301T 0410-2023 城市河道生态清淤管理规范
- 9.1 浮力(课件)2024-2025学年沪粤版物理八年级下册
- 双碳知识培训
评论
0/150
提交评论