网上查找了许多资料,几乎没一个说明白的,后来找到的是官网的英文文档,参考了一下最终实现了Planahead调用Chipscope,官网文档:PlanAhead_Tutorial_Debugging_w_ChipScope;下载地址:https://www.xilinx.com/support/documentation/sw_manuals/xilinx14_7/PlanAhead_Tutorial_Debugging_w_ChipScope.pdf
主要步骤如下:
1、先将Planahead的工程建好,将ucf文件添加好
2、向项目中添加调试网络
2.1、在左边Synthesis 选项, 点击Open Synthesized Design.
2.2、点击 Netlist tab in the Synthesis pane
2.3、展开net
2.4、右键点击选中连线 选择 Mark Debug. If a confirmation dialog box opens, click OK to close it.
选中ChipScope选项卡后,可以看到刚刚选择的未分配网络
3、运行设置ChipScope向导
3.1. 选中ChipScope选项卡后,选择所有未分配的调试网络,右键单击它们,然后选择set up ChipScope。打开set up chipscope。
3.2、 在向导中单击以创建ChipScope Analyzer调试内核,保留默认设置
4、完成后生成bit文件并下载到FPGA中
4.1、open the Implement folder, and click on
Run Implementation.
4.2、In the Save Project pop-up menu, select Save;When the implementation process ends, an Implementation Completed dialog box opens. Click Cancel.
Note: Implementation could take a few minutes
4.3、Select the Generate Bitstream option and click OK.
4.4、In the Generate Bitstream dialog box, click OK to start generating the bitstream. A Bitstream Generation Completed pop-up appears to let you know the process is finished. Click OK.If another pop-up appears saying Do you want to close ‘Synthesized Design’ before opening ‘Implemented Design’ click OK
5、使用ChipScope工具调试硬件
5.1、将JTAG和FPGA板通电接好
5.2、选择Launch chipscope analyzer
5.3、In ChipScope Pro Analyzer, configure the JTAG Chain to the Platform USB JTAG cable and communication parameters:
a. Select JTAG Chain > USB Platform Cable.
b. The USB Platform JTAG Cable Parameters dialog box opens. Verify that the speed is set to 3 MHz and Device is connected to JTAGSmt/SN:xxxxxxxxxxxx.
4、在ChipScope Pro Analyzer对话框中,单击OK
5、
6、在ChipScope Pro Analyzer的左上窗格中,右键单击“项目:Project:csdefaultproj”下列出的JTAG链设备,然后选择“Configure”。通过此对话框添加bit和cdc文件
7. With the item DEV:0 MyDevice0 (XC6SLX16) expanded, as shown in Figure 9, doubleclick Trigger Setup. The Trigger Setup display appears in the upper right pane
8. Double-click Waveform to add the Waveform display to the upper right pane.
9. In the tool bar menu, click T! to trigger immediately and capture data.
以上可以实现了,中间有些英文你们能看懂的对吧 ,haha~~