怎样才能使用ChipScope 加入被优化掉的信号

在调试过程当中经常遇到的一个问题就是,xilinx工具在逻辑综合的过程当中,将本身RTL代码中的不少变量都优化掉了,使得调试的抓信号的过程很纠结。如下是解决方法:ide

1.右键synthesis,在综合选项里将keep  hierarchy选择YES ,或者选择soft(在综合时保持层次,在实现时有利用ISE软件自动进行优化),这样有利于你从模块中找到你想抓取的信号和信号名不被更改。工具

 

2.在Constraints Guide中,有防止信号被优化掉的说明。具体在X:\Xilinx\13.4\ISE_DS\ISE\doc\usenglish\isehelp文件夹下。里面介绍了如何解决信号被优化的问题。其实ISE的工程设置有“keep_hierarchy”。在程序里面,也能够经过添加一些语句。若是是Verilog :优化

 

          Place the Verilog constraint immediately before the module or instantiation . ui

          Specify the Verilog constraint as follows:spa

          (* KEEP = “{TRUE|FALSE |SOFT}” *)调试

 

假如咱们要观察的一个信号cnt:reg   [10:0]  cnt;,那么就按照 文档中的介绍,要保持此信号不被综合,则:ip

    (* KEEP =  “TRUE” *)  reg  [10:0]  cnt ,或者     (* keep=  “true” *)  reg  [10:0]  cnt   ci

这样就能够实现ChipScope的观察而不被优化掉了。相似的VHDL:文档

 

 

         Declare the VHDL constraint as follows:string

         attribute keep : string;

        Specify the VHDL constraint as follows:

        attribute keep of signal_name: signal is “{TRUE|FALSE|SOFT}”;

相关文章
相关标签/搜索