我是靠谱客的博主 贪玩猫咪,最近开发中收集的这篇文章主要介绍VHDL中attribute keep of xxx: signal is "true";的用法,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

attribute keep of error_channelb: signal is "true"; 

用法就是 keep a signal after mapping; 如果要用chipscope和在ucf文件中直接使用信号名的,可用keep这保持,这样可方便我们添加观察信号和添加约束.

 

Often you want to assign a constraint to a particular signal in your design, or you want be able to find a particular signal in Chipscope inserter. In both cases, the signal must be in the physical design database (ie. in the .NCD file – Native Circuit Description) which is generated by the mapper. Not all signal names in your HDL code will end up in the NCD, some of them will be absorbed into logic blocks and grouped into a different signal name. To ensure that a particular signal name ends up in the NCD, it’s important to use the “keep” signal constraint.

When a design is mapped, some nets may be absorbed into logic blocks. The mapping tool does this because as a signal passes from one logic block to another, it can change name in your HDL code (eg. from data_in to data_out). As it is the same signal, the mapping tool gives it ONE name and it chooses among the names you have given it in your code.

When a net is absorbed into a block, it can no longer be seen in the physical design database. What this means in a practical sense is that you will no longer be able to refer to it in your UCF, and you will not find it in Chipscope inserter.

The “keep” constraint is a constraint that you put in your HDL code that prevents the signals you specify from being absorbed away.

In VHDL, before the “begin” statement, you must define “keep” as a string attribute and then assign the keep attributes as “true” for all the signals you want to keep.

attribute keep : string;
attribute keep of MyRefClk : signal is "true";
attribute keep of MyData   : signal is "true";

 

In Verilog, you would use the following lines:

// synthesis attribute keep [of] MyRefClk [is] "true";
// synthesis attribute keep [of] MyData [is] "true";

 

Both examples will keep the signal names “MyRefClk” and “MyData” in the physical design database and you will be able to refer to them in your UCF file and find them in Chipscope inserter.

 

Examples:

signal channela_plus_one : std_logic_vector(13 downto 0);
attribute keep of channela_plus_one: signal is "true";
signal channelb_plus_one : std_logic_vector(13 downto 0);
attribute keep of channelb_plus_one: signal is "true";  
signal error_channela : std_logic;
attribute keep of error_channela: signal is "true";
signal error_channelb : std_logic;
attribute keep of error_channelb: signal is "true";

 

Related Link:http://www.fpgadeveloper.com/2011/06/how-to-keep-a-signal-name-after-mapping.html

Xilinx link : http://forums.xilinx.com/t5/Synthesis/How-to-avoid-signal-optimizing-in-synthesis/td-p/76056

Made by Tim.

 

转载于:https://www.cnblogs.com/sundance/archive/2012/08/13/2636486.html

最后

以上就是贪玩猫咪为你收集整理的VHDL中attribute keep of xxx: signal is "true";的用法的全部内容,希望文章能够帮你解决VHDL中attribute keep of xxx: signal is "true";的用法所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(81)

评论列表共有 0 条评论

立即
投稿
返回
顶部