搭建Xilinx开发环境使用ChipScope进行调试

合集下载

ISE10.1使用教程简介

ISE10.1使用教程简介

ISE 10.1Steps1 new project (1)2 new source (3)3 run behavior simulation (5)4 ChipScope (7)5 Constraints (12)6 synthesize your design (13)7 implement your design (13)8 Generate Programming File (13)9Analyze Design Using Chipscope (13)1 new project1. 双击桌面Xilinx ISE10.1 快捷方式打开ISE 工程管理器(Project Navigator)。

2. 打开 Project Navigator 后,选择File → New Project ,弹出新建工程对话框,填写工程名字,工程存放发热位置。

注意,不要填写含有中文的名字,以免发生错误。

3.点击 Next 按钮,弹出器件特性对话框。

Device Family选择“Virtex2P”,Device选“XC2VP30 ,Package选择ff896,Speed选 -7”,其他选择如下图所示。

其中这些选择由按FPGA开发板的型号来决定的。

然后点击NEXT,继续单击Next 按钮,然后单击Finish按钮完成对工程的建立和基本设置。

2 new source1在工程的Source for下在的空白处单击右键选择New Source菜单2然后在弹出的对话框中选择Verilog Module,并且在右边的File name中输入你的模块名称,然后单击Next按钮。

2.这是一个设置输入输出端口的对话框,可以设置,也可以不设置。

一般选择不设置,直接点击NEXT,最后单击Finish按钮完成成对Verilog Module模块资源的添加。

3.双击Source for下面的.v文件(本实验双击counter.v)进入源代码编辑框中,并在里面编写Verilog源程序,然后点击保存按钮。

ISE_Design_Flow_14.7

ISE_Design_Flow_14.7

ISE设计流程指导手册——14.7在本手册中,我们将以一个简单的实验案例,一步一步的完成ISE的整个设计流程。

一、新建工程1、打开ISE Design Suite 14.7开发工具,可通过桌面快捷方式或开始菜单中Xilinx Design Tools->ISE Design Suite 14.7->ISE Design Tools->64-bit Project Navigator(注:32-bit系统为Project Navigator)打开软件,开启后,软件如下所示:2、单击上述界面中New Project图标,弹出新建工程向导,输入工程名称、选择工程存储路径,并将Top level source type一项设置为HDL。

建议为工程在指定存储路径下建立独立的文件夹\work。

设置完成后,点击Next。

注意:工程名称和存储路径中不能出现中文和空格,建议工程名称以字母、数字、下划线来组成。

3、根据使用的FPGA开发平台,选择对应的FPGA目标器件。

(在本手册中,以Xilinx大学计划开发板Nexys3为例,Nexys2开发板请选择Spartan-3E XC3S500E-FG320-4的器件,即Family 为Spartan-3E,Device选择为XC3S500E,封装形式(Package)为FG320,速度等级(Speed grade)为-4。

点击Next。

4、确认相关信息与设计所用的的FPGA器件信息是否一致,一致请点击Finish,不一致,请修改。

5、得到如下的空白ISE工程界面,完成空白工程新建。

二、设计文件输入1、如下图所示,点击New Source快捷图标,或在空白处右击选择New Source,或在File->NewSource选项,打开设计文件添加向导对话框。

2、选择Verilog Module,并输入设计文件名称如图所示,点击Next。

3、在弹出的Define Module中的Port Definition,输入设计模块所需的端口,并设置端口防线,如果端口为总线型,勾选Bus选项,并通过MSB和LSB确定总线宽度。

Xilinx官方的6个EDK实验6

Xilinx官方的6个EDK实验6

试验6系统验证及调试:介绍这个试验通过XMD和ChipScope 对系统进行可观测的软件和硬件调试。

目标完成试验后,我们希望达到以下目标:•向系统中加入ChipScope片内逻辑分析仪•系统调试打开工程Step 1在D:\Lab\下创建lab6mb文件夹。

可以根据上面的实验建立工程,也可直接把lab6mb的内容直接拷贝至此目录。

编译器优化选项设置Step 2这个部分测试编译器优化水平的不同性能。

在这之前,我们要移除定时器中断服务程序用一个延时循环来代替它。

n使用Project → Software Platform Settings …打开软件平台设置GUIo点击Processor, Driver Parameters and Interrupt Handlers栏p删除Current Value的值timer_int_handler。

使其为空。

点击<OK>q从D:\Lab\lab_sources\lab6_sources路径复制system_delay.c到当前工程D:\Lab\labmb6\coder从工程MyProj移除system_timer.c并加入新的文件system_delay.cs双击MyProj标题选择Optimization Tab如图所示,设置编译器优先等级到No Optimization,点击<OK>。

图 6-1. 编译选项设置w选择Download那么这些源文件将重新编译并下载到板上去。

LED将连续0.1秒显示计数器。

w设置编译器优化等级,并再次下载到工程当中去。

注意显示速度取决于编译器的优化等级片内逻辑分析仪Step 3点击Project → Add/Edit Cores … (dialog),加入ChipScope 片内逻辑分析仪的。

配制以下端口。

如图6-2所示。

sys_clk_smb_halt (MicroBlaze)dbg_stop (MicroBlaze)图6-2 芯片域内核连接n 点击Project → Add Cores (dialog)o 在Peripherals 栏 加入chipscope_icon 与chipscope_opb_iba 参数p 在Bus connection 栏,连接chipscope_opb_iba 作为一个BA (总线分析器)器件到OPB 总线。

ChipScope Pro详细教程(Xilinx在线逻辑分析仪)

ChipScope Pro详细教程(Xilinx在线逻辑分析仪)

ChipScope Pro实例教程宋存杰1. ChipScope Pro简介ChipScope Pro的主要功能是通过JTAG口、在线实时地读出FPGA的内部信号。

基本原理是利用FPGA中未使用的BlockRAM,根据用户设定的触发条件将信号实时地保存到这些BlockRAM中,然后通过JTAG口传送到PC机,显示出时序波形。

一般来说,ChipScope Pro在工作时需要在用户设计中实例化两种核:一是集成逻辑分析仪核(ILA core,Integrated Logic Analyzer core),提供触发和跟踪捕获的功能;二是集成控制器核(ICON core,Integrated Controller core),负责ILA核和边界扫描端口的通信,一个ICON核可以连接1~15个ILA核。

ChipScope Pro工具箱包含3个工具:ChipScope Pro Core Generator(核生成器)、ChipScope Pro Core Inserter(核插入器)和ChipScope Pro Analyzer(分析器)。

ChipScope Pro Core Generator的作用是根据设定条件生成在线逻辑分析仪的IP核,包括ICON核、ILA核、ILA/ATC2核和IBA/OPB核等,设计人员在原HDL代码中实例化这些核,然后进行布局布线、下载配置文件,就可以利用ChipScope Pro Analyzer设定触发条件、观察信号波形。

ChipScope Pro Core Inserter除了不能生成IBA/OPB核和ILA/ATC2核以外,功能与ChipScope Pro Core Generator类似,可以生成ICON核和ILA核,但是它能自动完成在设计网表中插入这些核的工作,不用手工在HDL代码中实例化,在实际工作中用得最多。

下图为ChipScope的两种使用流程图,左侧为使用ChipScope Pro Core Generator流程。

片内逻辑分析仪工具——ChipScopePro

片内逻辑分析仪工具——ChipScopePro

第11章片内逻辑分析仪工具——ChipScope Pro11.1 ChipScope Pro工具介绍在FPGA调试阶段,传统的信号分析手段要求在设计时保留一定数量的FPGA管脚作为测试管脚,这种方法灵活性差,对PCB布线也有一定的影响。

当今先进的FPGA器件所具有的规模、速度和板级要求使得利用传统逻辑分析方法来调试采用FPGA器件进行的设计几乎是不可能的。

Xilinx公司推出的片内逻辑分析仪ChipScope Pro能够通过JTAG口,实时地读出FPGA的所有内部信号,而只需要片内的少量BlockRAM和逻辑资源,使得逻辑分析灵活方便。

ChipScope Pro是与ISE配套使用的,其版本经过了ChipScope 4.1i,ChipScope 4.2i,ChipScope Pro 5.1i,ChipScope Pro 5.2i和ChipScope Pro 6.1i的升级过程,ChipScope Pro 6.1i是与ISE 6.1配套使用的最新版本。

ChipScope Pro软件由3个工具组成:(1) ChipScope Pro内核生成器:为综合控制器(ICON)内核、CoreConnect™ OPB的总线分析内核(IBA/OPB)、逻辑分析(ILA)内核及安捷伦跟踪内核(ILA/ATC)提供网表和实例化的模板;(2) ChipScope Pro内核插入器:自动地为用户已经综合完的设计中插入ICON、ILA和ILA/ATC的内核;(3) ChipScope Pro分析仪:提供器件的配置、触发的设定和ILA、IBA/OPB及ILA/ATC核的踪迹显示功能。

各种内核实现了信号的触发和捕获,而ICON内核专门用于与边界扫描(Boundary Scan)管脚的通信。

使用ChipScope Pro工具的设计可以容易地同任何标准的FPGA设计流程结合起来,其中要用到标准的HDL综合工具和Xilinx ISE的实现工具,设计流程如图11.1所示。

ISE中chipscope的使用

ISE中chipscope的使用

ChipScope Debug LabIntroductionThis lab guides you through the process of inserting ChipScope-Pro cores into your design and performing on-chip verification.ObjectivesAfter completing this lab, you will be able to:• Create a new ChipScope-Pro source in ISE• Create ILA and ICON cores using ChipScope-Pro and insert it into a PicoBlaze design • Specify trigger options in ChipScope Analyzer• Download the bitstream and run the design in hardware• Perform an on-chip verification and view the wave forms in ChipScope AnalyzerDesign DescriptionYou will extend the lab 5 design by adding a ChipScope ILA core to the PicoBlaze output bus. Next, you will setup the trigger to capture data when text is entered via Hyper Terminal. You should see the resulting text displayed in ChipScope when the buffer is full.ProcedureThis lab is separated into steps that consist of general overview statements that provide information on the detailed instructions that follow. Follow these detailed instructions to progress through the lab. This lab comprises 4 primary steps: You will create a new ChipScope source, configure and connect an ILA core, configure ChipScope Analyzer trigger options and, finally, perform an on-chip verification. Note: If you are unable to complete the lab at this time, you can download the lab files for this module from the Xilinx University Program site at /universityGeneral Flow for this LabStep 1:Creating a New ChipScope SourceStep 2: Configure and Connect an ILA Core Step 3:Configure ChipScope Analyzer Trigger OptionsStep 4: Perform an On-chip VerificationCreate a New ChipScope Source Step 1 1-1. Open a ChipScope-Pro project from lab6 folder (under vhdl or verilog).1-1-1. Open the Xilinx ISE software by selecting Start All Programs Xilinx ISE Design Suite13.2 ISE Design Tools Project Navigator.1-1-2. Open the project by selecting File Open Project.○Verilog users: Browse to c:\xup\fpgaflow\labs\verilog\lab6\chipccope○VHDL users: Browse to c:\xup\fpgaflow\labs\vhdl\lab6\chipscope1-1-3. Select chipscope.xise and click Open.1-1-4. Create a new ChipScope Definition and Connection File source by selecting Project New Source and entering the name loopback_cs. Click Next to continue.Figure 1. New Source Dialog Box1-1-5. Click Finish. A ChipScope-Pro source will be added to the Sources in Project window.Genesys 6-2 /universityFigure 2. ChipScope Definition and Connection (.cdc) added to VHDL ProjectConfigure and Connect an ILA Core Step 2 2-1. Connect the ILA core to the PicoBlaze output.2-1-1. Double-click the loopback_cs.cdc file in the sources in project window to open the core inserter project.Figure 3. ChipScope-Pro Core InserterNote: Projects saved in the Core Inserter hold all relevant information about source files, destination files, core parameters and core settings.2-1-2. Click Next and then click New ILA Unit. Notice in the left hand window how an instance of the ILA core, U0:ILA, is added to the system.Genesys 6-4 /universityFigure 4. Insert a new integrated logic analyzer (ILA) Unit2-1-3. Click Next to setup the trigger parameters.Each ILA or ILA/ATC core can have up to 16 separate trigger ports that can be setup independently. The individual trigger ports are buses that are made up of individual signals or bits that can range from 1 to 256 bits. Each trigger port can be connected to 1 to 16 match units. A match unit is a comparator that is connected to a trigger port and is used to detect events on that trigger port. The results of one or more match units are combined together to form the overall trigger condition event that is used to control the capturing of data. The different comparisons or match functions that can be performed by the trigger port match units depend on the type of match unit. The ILA and ILA/ITC cores support six types of match units. In this lab, you will setup the ILA core to trigger via some UART control signals.2-1-4. Set the following ILA trigger parameters as follows and then click Next.Trigger Input and Match Unit Settings.• Number of input trigger ports: 3Trigger Port Trigger Width # Match Units Counter WidthMatch Type TRIG0 1 1 Disabled Basic TRIG1 1 1 Disabled Basic TRIG211DisabledBasicTrigger Condition Settings• Enable Trigger Sequencer: Checked (This allows you to specify a sequence of events to enable triggering)•Max Number of Sequencer Levels: 2Storage Qualification Condition Settings• Enable Storage Qualification: Checked (This allows you to specify which data will be stored in the internal buffer)Figure 5. Specify the Trigger ParametersThe maximum number of data sample words that the ILA core can store in the sample buffer is called the data depth. The data depth determines the number of data width bits contributed by each block RAM unit used by the ILA unit. The maximum number of data sample words that can be captured depends on the number and size of block RAM, which varies according to device family and density.2-1-5. Set the following capture parameters and click Next.• Data Depth: 1024• Sample On: Rising clock edge• Data Same as Trigger Port: unchecked• Data Width: 8Figure 6. Specify Trigger ParametersThe net connections tab allows you to choose the signals to connect to the ILA core. If trigger is separate from data, then clock, trigger, and data must be specified. Connections that have not been made will appear in red.Figure 7. Unconnected Net Connections2-1-6. Click the Modify Connections tab.Figure 8. Net ConnectionsThe Select Net dialog provides an easy interface to choose nets to connect to the ILA, ILA/ATC or ATC2 cores. The hierarchical structure of the design can be traversed using the Structure/Nets pane. All the design’s nets of the selected structure hierarchy appear in the table at the lower left pane. The Clock Signals and Trigger/Data Signals tabs illustrate the net connections between the design and the ILA core.2-1-7. With the Clock Signals tab under Net Selections selected, highlight the entry for clk55MHz in the listing of nets and click the Make Connections button to connect the clock signal in the design to the clock port of the ILA core.Figure 9. Connect the clockGenesys 6-6 /university2-1-8. Click the Trigger Signals tab, and connect the three trigger ports as follows:• TP0: data_present (this signal indicates that data is present in the uart_rx module• TP1: read_from_uart (input to uart_rx that indicates that a read operation will occur)• TP2: write_to_uart (input to uart_tx that indicates that a write operation will occur)2-1-9. Click the Data Signals tab and connect the output port of the PicoBlaze controller to the data port of the ILA core (see Figure 10), and click OK.Figure 10. Connect the PicoBlaze output port2-1-10. You will notice that the Clock, Trigger, and Data ports under Net Connections are highlighted in black, indicating valid connections. Click Return to Project Navigator and save the file.Figure 11. Connection between Design and ILA core EstablishedConfigure ChipScope Analyzer Trigger Options Step 3 3-1. You will download the bitstream using ChipScope and configure the ILA core to trigger when the UART reads text from Hyper Terminal.3-1-1. With the top-level file (loopback.v/vhd) selected, double-click on Analyze Design Using ChipScope in the Processes window.3-1-2. Connect up the download cable and power up the Genesys board.3-1-3. Click the Open Cable/Search JTAG Chain button.Figure 12. Establish JTAG Connection3-1-4. Chipscope Pro Analyzer will automatically detect the devices on the Genesys board and then click OK.Figure 13. Impact Detects Devices in JTAG Chain3-1-5. Right Click on the xc5vlx50t device and select configure.3-1-6. Click Select New File and select the loopback.bit bitstream file from the project directory. Note that the import cdc file field shows the cdc file located in the project directory. Also note that the tool will create a bus (out_port) automatically. Click OK.Double-click on Trigger Setup and Waveform entries in Project Tree to open the respective windows.The ChipScope Pro Analyzer interface consists of four parts:Genesys 6-8 /universityFigure 14. ChipScope Analyzer WindowEach ChipScope Pro ILA, ILA/ATC, and IBA core has its own Trigger setup window, which provides a graphical interface for the user to setup triggers. The trigger mechanism inside each ChipScope Pro core can be modified at run-time without having to recompile the design. There are three components to the trigger mechanism:• Match Functions: Defines the match or comparison value of each match unit• Trigger Conditions: Defines the overall trigger condition based on a binary equation or sequence of one or more match functions• Capture Settings: Defines how many samples to capture, how many capture windows, and the position of the trigger in those windowsIn this design, you will setup the triggers to capture text at the PicoBlaze output port, after being entered via Hyper Terminal.3-1-7. Specify the Match Units as follows:• M0:TriggerPort0 (data_present): Value 1• M1:TriggerPort1(read_from_uart): Value 1• M2:TriggerPort1(write_to_uart): Value 1Figure 15. Setup the Match Units3-1-8. Click the field under Trigger Condition Equation, set the equation M0 M1 in the Sequencertab, and then click OK.Genesys 6-10 /universityFigure 16. Trigger Condition Equation3-1-9. Check the field next to Storage Qualification , select the AND Equation , and check M2. ClickOK . This will enable the ILA core to capture data in the buffer only when data is present, and not on every single clock edge.Figure 17. Storage Qualification EquationPerform an On-Chip VerificationStep 44-1.Start Hyper-Terminal program. Set baud rate to 9600. Arm the trigger and view the waveforms of the captured data.4-1-1.Start the Hyper-Terminal program. Make sure that the baud rate is set to 9600.Lab WorkbookChipScope Debug Lab/university Genesys 6-11xup@4-1-2. Set the buffer depth to 16.Figure 18. Select Buffer Depth4-1-3. Cick the Apply Settings and Arm Trigger button.Figure 19. Apply Settings and Arm Trigger4-1-4. Type “Xilinx #1 FPGA!” in Hyper Terminal and view the message in ChipScope Analyzer.Figure 20. Output in Waveform Window4-1-5. Close all applications without saving ChipScope project.ConclusionYou inserted the ILA and ICON cores into the PicoBlaze design, set up trigger conditions in ChipScope Analyzer, performed an on-chip verification, and analyzed the waveforms in ChipScope-Pro Analyzer.。

搭建Xilinx开发环境

搭建Xilinx开发环境

搭建Xilinx开发环境目录1.编译Xilinx仿真库 (1)2.使用Modelsim进行功能仿真 (6)3.使用ChipScope进行调试 (11)4.使用Modelsim进行后仿真 (23)5.如何利用Modelsim仿真ROM (26)1.编译Xilinx仿真库首先介绍一下Xilinx几个主要的仿真库(路径:D:\Xilinx\11。

1\ISE\verilog\src\)1Unsim文件夹:Library of Unified component simulation models。

仅用来做功能仿真,包括了Xilinx公司全部的标准元件。

每个元件使用一个独立的文件,这样是为了方便一些特殊的编译向导指令,如`uselib等。

2XilinxCoreLib:CORE Generator HDL Library model。

仅用来做功能仿真,包括了使用Xilinx Core Generator工具产生的IP仿真模型,例如FIFO 等。

3SIMPRIM:Library of generic simulation primitives。

用来做时序仿真或者门级功能仿真。

4SmartModel:用来模拟非常复杂的一些FPGA设计,其中用到了Power PC 或者RocketIO等。

我们一般只用其中的三个库:simprims,unisims,xilinxcorelib。

编译Xilinx仿真库有多种方法,比如,可以在ISE软件中编译xilinx仿真库,这样在ISE调用Modelsim进行仿真了。

但是利用ISE调用Modelsim仿真虽然操作方便,但是每次仿真前都要先进行综合,这样会很费时间,如果单独用Modelsim进行仿真,则可以不用进行综合而直接进行功能仿真。

不进行综合就仿真的结果是可能本来的设计就是不可综合的。

但是只要按照可综合的代码风格进行设计一般不会出现这中问题。

这样做的好处是节省了综合需要耗费的时间,所以下面主要介绍直接利用Modelsim编译Xilinx库,并进行仿真的流程。

ChipScope使用说明

ChipScope使用说明

ChipScope使用说明目录1.建立工程...................................................................................................... 错误!未定义书签。

2.插入及配置核 (3)2.1运行Synthesize (3)2.2新建cdc文件 (3)2.3 ILA核的配置 (4)3. Implement and generate programming file (7)4.利用Analyzer观察信号波形...................................................................... 错误!未定义书签。

4.1连接器件........................................................................................... 错误!未定义书签。

4.2下载配置fpga (9)4.3载入信号端口名 (10)4.4设置触发信号 (10)4.5运行并观察信号波形 (11)补充 (12)1.建立工程ChipScope是配合Xilinx Ise使用的片内逻辑分析工具,使用的第一步是建立ise工程文件,详细步骤可参考ise使用说明。

如果已有建好的ise工程,可跳过此步骤,打开已有工程即可。

建立工程时注意正确添加.v源文件和.ucf管脚配置文件。

2.插入及配置核这里介绍的是ICON核和ILA核的使用方法。

ILA核提供触发和跟踪功能,根据用户设置的触发条件捕获数据;然后在ICON的控制下,通过边界扫描口将数据上传到PC;最后在Analyzer中显示出信号波形。

2.1运行Ise的Synthesize单击选中sources栏中的顶层源文件,右键点击processs栏中的Synthesize,点击Run,进行代码综合。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

搭建Xilinx开发环境使用ChipScope进行调试
Xilinx的ChipScope工具就相当于Altera的SignalTap II,能够捕捉FPGA内部的信号,方便了调试过程。

下面就以一个简单的实例描述一下使用ChipScope的过程(ISE版本为11.1)。

Step1:打开一个以后的ISE工程,进行管脚约束,并进行综合。

Step2:添加ChipScope Definition and Connection File
添加完成后,会在工程中多出一个.cdc文件。

Step3:双击*.cdc文件,弹出ChipScope Pro Core Inserter对话框。

首先是指定输入网表和输出网表的路径,以及所选的器件族。

由于ChipScope Pro Core Inserter是从ISE调用的,所以这些选项都已经设置好了,不用修改,直接点NEXT。

不用修改,继续点击NEXT
Step4:进行配置ILA核(Integrated Logic Analyzer Pro core)界面。

ILA核用来设置触发条件和捕获数据,并提供将ChipScope核信号和设计中的网表信号连接的功能。

首先是Trigger Parameters界面。

(1)、Number of Input Trigger Ports:用来设置需要观察的信号的数目,例如这里我们需要观察两个信号,所以这里设置为2。

一个ILA最多可以观察16个信号。

(2)、Trigger Width:设置每个要观察信号的位宽。

第一信号是一个计数器30bit计数器,所以第一个设置为30,第二个信号是一个8bit信号,所以这里设置为8
(3)、Match Type:设置每一观测信号的触发条件。

ChipScope可以对每一个要观察的信号设置触发条件,最后再采集数据时采用哪个触发条件可以再指定,在这里需要对每一个信号都指定一个触发条件。

主要设置这三个选型,其他保持默认,设置完成后点击NEXT
现在进入Capture Parameter界面。

(1)、设置采样深度
(2)、设置采用时钟边沿
(3)、Data Same As Trigger:这一个选项选中,可以节省逻辑资源和布局布线的使用。

前提是数据与触发信号相同。

这里选中这个选型。

点击NEXT进行NetConnections。

相关文档
最新文档