zoukankan      html  css  js  c++  java
  • Integrate Logic Analyzer入门

    ILA入门

    ILA即Vivado的integrated logic analyzer

    Reference

    ug908(chapter 10, chapter)

    0.解释

    ILA:集成逻辑分析仪,相当于一个放在FPGA内部的示波器,但是只能看。

    VIO:能看也能灌入数据,实时驱动FPGA。这个东西只能在RTL代码当中实现,所以需要实现考虑好要驱动什么线。他的IP核在Debug category目录下。

    IBERT:集成式误码率分析仪,可以用于系统内的串行I/O验证和调试。

    JTAG-to-AXI Master:用来产生AXI通讯信息以便debug各种AXI协议设备。

    1.Into vivado program debug

    Vivado把debugging flow分成三个过程,或者叫三个phase

    1. probing phase:确定需要测量的是哪些信号
    2. implementation phase:把带有debug IP的比特流写到硬件当中
    3. analysis phase:与硬件进行交互,分析结果

    今天只关注第一阶段。一般情况下,添加debug IP的方式有两种,第一种是在HDL代码当中手动添加(设置mark_debug自动添加),另一种是在post-synthesis的netlist当中自动添加(使用synthesis之后的set up debug向导自动添加),或者通过添加约束文件,在约束文件当中设置ILA(page 106)。(请不要以为这两者是互相补充的关系,实际上两者是相互独立的两种方法。)

    1.1 在网表当中自动添加ILA模块

    在添加之前先保存一下constraints和project确保内存当中的constraints和memory当中的constraints内容一致,然后再tcl里面输一下refresh_design(注:refresh_design会重新从硬盘上的原始文件读取数据,这可能会覆盖存储在内存当中没有保存的任何修改;保存memory当中的constraints可以使用save_constraints命令,他会把内存当中任何对当前约束文件的修改保存到硬盘上。)。

    Set up debug在Tools->Set up debug或者在Flow Navigator的Synthesis选项下的Synthesis Design->Set up debug。具体步骤参考ug908(v2016.4), page 95, chapter 9的内容。这里只是做一个简单的记录。

    1. 当在Nets to Debug窗口添加要debug的网表的时候,一个单独的时钟域clock domain对应着一个ILA实例化模块,当有多个时钟域的时候每个时钟域都会对应着一个单独的ILA实例化模块,所以监控的时钟域越多,生成的ILA实例化模块的数量就越多,占用的资源也就会越多。
    2. 在通过Set up debug建立debug core之后,会多出一个debug窗口,在这个窗口当中可以新建debug core实体,或者修改debug core实体的属性。
    3. ILA的几个关键属性如下所示:
      • C_DATA_DEPTH:Maximum number of data samples that can be stored by the ILA core. Increasing this values causes more block RAM to be consumed by the ILA core and can adversely affect design performance.
      • C_TRIGIN_EN:Enables the TRIG_IN and TRIG_IN_ACK ports of the ILA core. Note that you need to use the advanced netlist change commands to connect these ports to nets in your design. If you wish to use the ILA trigger input or output signals, you should consider using the HDL instantiation method of adding ILA cores to your design.
      • C_TRIGOUT_EN:Enables the TRIG_OUT and TRIG_OUT_ACK ports of the ILA core. Note that you need to use the advanced netlist change commands to connect these ports to nets in your design ...(Same as the above contents)
      • C_ADV_TRIGGER:Enables the advanced trigger mode of the ILA core(TT_Q).
      • C_INPUT_PIPE_STAGES:Enable extra levels of the pipe stages (for example, flip-flop registers) on the PROBE inputs of the ILA core. This feature can be used to improve timing performance of your design by allowing the Vivado tools to place the ILA coore away from critical sections of the design.
      • C_EN_STRG_QUAL:Enables the basic capture control mode of the ILA core(TT_Q).
      • C_ALL_PROBE_SAME_MU:Enables all PROBE inputs of the ILA core to have the same number of comparators(also called "match units"). This property should always be set to true.
      • C_ALL_PROBE_SAME_MU_CNT: The number of comparators (or match units) per PROBE input of the ILA core. The number of comparators that are required depends on the settings of the C_ADV_TRIGGER and C_EN_STRG_QUAL properties.
    4. 在debug窗口当中probe type有三种配置选项datatrigger或者data and trigger。当被配置有trigger属性的时候数据将可以被用来作为配置的出发选项或者用来被设置某个指定情况下捕捉,而且此时不占用板子的BRAM空间,但是此时没办法在Waveform窗口显示波形。被配置为data类型的时候优势和缺点则反过来。

    通过Set up debug工具设置了需要进行调试的Nets之后可以使用Debug窗口进一步设置。首先一个最明显的变化在Debug窗口会出现若干个ila实例化模块。

    1.2 安全下车

    不论是通过哪种添加了ILA Core。都会造成Memory当中的Constraints的变动,所以需要将在Memory当中的constraints保存到target才算完成。

    唉,总是遇到说constraints读了好多次的错误,好气。明明试过好多次了。

    1.3 ILA模块对于整体时序收敛特性的影响

    对ILA核的配置对整体的设计时序的收敛特性有一定的影响,一下有一些这方面的建议(ug908,page120):

    • 谨慎选择probe width。这个probe width的宽度越大,对FPGA整体设计的资源和时序占用就越大;

    • 谨慎选择ILA core data depth参数,这个值越大对block RAM的资源占用就越高对整体时序的影响也就越大;

    • 确保驱动ILA核心的时钟是free-running的时钟(没有时钟使能,不可中断)否则可能导致显示结果失败;

    • 在加上debug cores之前应该确保时序已经收敛;一般不要使用ILA来调试时序问题;

    • 如果由于添加了ILA模块导致时序表现恶化,可以遵循以下步骤(参见ug908,page120)

    2使用ILA调试AXI设备

    ILA有一种分类叫做System ILA IP,用这个东西可以实现对Post-implemented的设计进行分析和调试(参见ug908-page170)。按照ug908这个说明,system ila应该放到ip block design里面才对。

    System ILA debug可以直连AXI协议。连上AXI协议接口线之后,Waveform的窗口会显示每个接口的连线信号,事件。如果有不止一个AXI连到一个ILA上面,各个AXI会以几个不同的slot展现出来。每个slot都会显示各个AXI接线上相关的Read,Write,Address events和Data channel evets。

    AXI Channel Events那个组(一般有XXX channel Events和XXX Channel Signal)一般情况下会显示AXI Read Address, Read Data, Write Address或者Write Data的事件。这几种时间有几种不同的响应方式,以Read Address为例,在ILA当中会有两组信号与Read Address的检测对应,一组是Read Address Event,另一组是Read Address Channel Signal Group。

  • 相关阅读:
    iOS 判断两个日期之间的间隔
    iOS UITextField设置placeholder颜色
    iOS 当键盘覆盖textFiled时简单的处理方法
    iOS 点击空白处收回键盘的几个简单代码
    iOS 字符串和图片互转
    JDBC连接数据库
    Java虚拟机原理和调优
    java读写文件IO
    MultipartFile 获取上传TXT文件字数
    Runtime.getRuntime().exec()实现Java调用python程序
  • 原文地址:https://www.cnblogs.com/lafiizh/p/11342070.html
Copyright © 2011-2022 走看看