ImageVerifierCode 换一换
格式:DOCX , 页数:28 ,大小:241.04KB ,
资源ID:15734253      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-15734253.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(优化与防止被优化.docx)为本站会员(b****6)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

优化与防止被优化.docx

1、优化与防止被优化注册登录*论坛搜索帮助导航CEEZCSSoCVista - IC/FPGA设计家园? 30分钟必答-无限制提问专区 ?设计未完成阶段进行面积评估如何防止被优化|l 2下一页返回列表回复发帖1#打印字体大小:tTmen torOO超级通 吃版主发表于2009-11-8 09:48 |只看该作者设计未完成阶段进行面积评估如何防止被优化(本文来自anthonyyi的来信。请大家一起来解答。)为了对整个设计进行性能和面积的评估在模块尚未全部完成的阶段进入 FPGA综合阶段在顶层设计中instance 了所有已完成的模块但这些模块中有的由于后续模块没有完成 ,其输出悬空,即没有load在

2、 Synplify 下使用 Syn_noprune 属性发现在compile阶段能保留上述模块,其RTL view显示模块存在在map之后观测Technology view 发现上述模块已经被优化掉只剩下输入端口,且无drive故综合报告无实际意义和参考价值想请教在如何不改变顶层模块的输出管脚而使综合保留上述无输出的模块个人想到一种,用syn_probe将输出net probe 出来,但这样会有风险因为综合工具似乎只会保留这些与该输出有关的逻辑而优化掉其他的部分而且该步骤没有进行实战确认:(本主题由admin 于2009-12-2 07:56 力卩入精华收藏分享评分回复引用订阅TOP2#3发表

3、于2009-11-8 10:04 |只看该作者我想可以参考一下下面的转载内容提问:我使用的是synplify pro综合verilog 语言,例化了一个BUF,在综合结果里也看到了这个 BUF,men torOO超级通吃版主但是在MAP是这个BUF还是被优化掉了,请问用什么方法将这个 BUF保留下来?解答:在这个BUF两端的信号线上加上下面的属性一一wire bufin /* synthesis syn_keep=1 xc_props=X */;wire bufout /* synthesis syn_keep=1 xc_props=X */;解释下:1、 syn_keep=1就是保留这个信号

4、线,是它成为一个 instance ( synplify 的),然后就可以对它添加XILINX的约束属性;2、 xc_props=是 synplify 为XILINX保留留的约束属性,可以透传到 ISE的实现中去,从而约束实现过程。3、“X”属性是在 MAP时识别的KEEP属性,如果用XST综合就只需要在信号线的两端加上 X属 性就可以透传到 MAP中去。但是synplify 并不能识别,因此需要通过以上的方法将 X属性透传至U MAP中去。回复引用TOP3#发表于2009-11-8 10:04 |只看该作者如果是VHDL可以这样来解决LIBRARY ieee;USE ieee.std_log

5、ic_1164.all;USE ieee.std_logic_arith.all;library synplify;USE synplify.attributes.all;ENTITY delay_cell ISPORT (men torOO超级通吃版主dly_in : IN STD_LOGIC;dly_out : OUT STD_LOGIC);END delay_cell;ARCHITECTURE archi OF delay_cell IS-attribute syn_keep : boolean;SIGNALtemp01, temp02, temp03, temp04, temp05,

6、temp06, temp07, temp08, temp09, temp10, temp11, temp12, temp13 : STD_LOGIC;attribute syn_keep of temp01, temp02, temp03, temp04, temp05, temp06, temp07, temp08, temp09, temp10, temp11, temp12, temp13 : signal is true;attribute xc_props of temp01, temp02, temp03, temp04, temp05, temp06, temp07, temp0

7、8, temp09, temp10, temp11, temp12, temp13 : signal is X;BEGINtemp01 =NOT dly_in;temp02 =NOT temp01;temp03 =NOT temp02;temp04 =NOT temp03;temp05 =NOT temp04;temp06 =NOT temp05;temp07 =NOT temp06;temp08 =NOT temp07;temp09 =NOT temp08;tempIO =NOT temp09; templl =NOT tempIO;temp12 =NOT templl; temp13 =N

8、OT temp12; dly_out =NOT temp13;END archi;回复引用TOPvimicro通吃版主4#发表于2009-11-8 20:38 |只看该作者对一些 buffer 设置 set dont touch回复引用TOP5#发表于2009-11-8 21:42 |只看该作者以下是我根据mentor00老师的帖子进行实验的一个小例子anthonyyi通吃版主module test(clk,rst_n);input clk;input rst_n;counter u_counter /*synthesis syn_noprune =1 */(.clk (clk ),.rst_

9、n(rst_n ),.p0 (p0 ),.p1 (p1 );endmodulemodule counter(clk,rst_n,p0,p1);input clk;input rst_n;output p0;output p1;wire p0 /* synthesis syn_keep=1 xc_props=X */;wire p1;reg 3:0 counter;assign p0 = counter2;assign p1 = counter3;always (posedge clk or negedge rst_n)if(!rst_n)counter = 4h0;elsecounter =

10、counter + 1b1;endmodule从综合的结果来看,发现添加 syn_keep 和 xc_props 的 P0 端口在 mapping 之后保留其 technology view 可以看到综合结果包括三个寄存器 counter0 : 2未添加约束的 counter3 被优化掉了按照这种方法需要将所有需要保存模块输出加上 syn_keep 属性此外根据 synplify 最新版本的提示W: FX350 |xc_props attribute is obsolete and will not be supported in a futurerelease. Please use the

11、 attributes inside the xc_props string directly orgenerics/parameters if they are available这个属性要改成个什么样子呢回复引用TOPanthonyyi通吃版主6#发表于2009-11-8 21:43 |只看该作者原帖由 vimicro 于 2009-11-8 20:38 发表对一些 buffer 设置 set dont touchHow can I do it, where is the key position for me to find the buffer回复引用TOP发表于2009-11-8 2

12、2:03 |只看该作者此外由于希望在整个评估过程中尽量不改动模块级的 RTL代码an tho nyyi通吃版主顶层的syn_noprone属性一定需要添加否则compile都过不了,直接就被优化掉了而且syn_keep的属性必须放在wire定义的那行,放在 assign的位置也会被优化掉并且由于syn_keep属性只能针对 wire类型必须从rtlview 中找到对应的线添加到 sdc文件中才行:)请大家一起试试,看看有没有别的方法回复引用men tor00超级通吃版主TOP8#乙发表于2009-11-9 07:45 |只看该作者谢谢anthony的及时反馈与共享。回复引用TOP9#in ee

13、dpower管理员发表于2009-11-9 09:46 |只看该作者原帖由 anthonyyi 于 2009-11-8 22:03发表而且syn_keep的属性必须放在 wire定义的那行,放在assign的位置也会被优化掉一直以来都以为对于 wire和reg类型都可以使用的回复引用TOPanthonyyi通吃版主#10发表于2009-11-9 10:20 |只看该作者寄存器用syn_preservesyn_preserve ensures that registers are not optimized away回复发帖#11in eedpower 发表于 2009-11-9 10:37 |

14、 只看该作者官理员 4 - Verilog 开发仿真» Synplify SCOPE 属性 高手的秘密曲可惜好像还是 to be continued 回复引用TOP12#vimicro通吃版主0右金发表于2009-11-11 09:57 |只看该作者回复6#的帖子不太明白你的意思 我的意思是直接在例化的 module name上面设对了我是说DC是ASIC流程,FPGA上面我不知道能否这样做sharedVerilog综合时 wire与reg如何防止被优化(1)2009-11-29 14:14Abstract撰寫Verilog 時,雖然每個 module都會先用ModelSim或Qu

15、artus II自帶的 simulator仿真過,但真的將每個 module合併時,一些不可預期的run-time問題可能才一一浮現,這時得靠 SignalTap II來幫忙debug。In troductio n使用環境:Quartus II 8.0 + DE2-70 (Cycl one II EP2C70F896C6N)實際使用SignalTap II時,會發現有些reg與wire可以觀察,有些又無法觀察,在(原創)如何使用 SignalTap II 觀察 reg 值? (IC Design) (Quartus II)(SignalTap II) (Verilog)中,我利用將reg接到t

16、op module的方式來觀察reg, 雖然可行,但老實說並不是很好的方式。當初有網友發表評論,說這是因為 reg被Quartus II優化掉不見了,導致無法使用 SignalTap II觀察,本文整理出完 整的reg與wire觀察方法。觀察reg如同(原創)如何使用 SignalTap II 觀察 reg 值? (IC Design) (Quartus II) (Sig nalT ap II) (Verilog) 的範例,我再重複一次。SSig nalTapll_register_ no t_preserve.v / Verilog1 /*2(C) OOMusou 2008 33File n

17、ame : Sig nalTapll_register_ no t_preserve.v4Compiler : Quartus II 8.05Description : Demo how to preserve register with SingalTap II6Release : 10/17/2008 1.07*/98module SignalTapll_register_not_preserve (9in put iCLK,10in put iRST_N11);1412reg 3:0 cnt;1613always(posedge iCLK, negedgeiRST_N) begin14i

18、f (!iRST_N)15cnt = 4h0;16else17cnt = cnt + 4h1;18end2319endmodule這是個很簡單的計數器,我故意讓 cnt不做output,而想用SignalTap II去觀察ent這個reg的值ent都是0,顯然不合理,表示SignalTap II 無法capture ent 這個reg的值 為什麼會這樣呢?若我們將SignalTap II 拿掉,重新用 Quartus II 編譯,觀察其compilationreport , 顯示 register 為 0。flaw StatusSuccessful - Fri Oct 17 2213:13 2

19、008QuartuH VersionG O Build 215 05/29/2008 SJ Full VersionRevision NameSigrialTa pH_reg i ate r_n Gt_p reseiveTop-level Entity NameSignalTd pH_reg i tte r_n o tja reserveFamilyCyclone UDeviceEP2C70FS96C6Timing ModelsFinalMet timing requirementsYesTotal logic elements-0/68.416(0%)Total coonbinationaH

20、unclions口edicated logic reaisteri0/68,416(0%I oaTreg isterTotal pi ns7622 (iCLK (GND)r 這證明了一件事情,Quartus II在合成時,發現ent並沒有需要output,而自 動最佳化不合成ent,導致SignalTap II 無法觀察reg,不過有時為了 debug方便,我們就是想觀察這種reg,有辦法讓Quartus II暫時不要啟動最佳化嗎?使用Synthesis Attribute 避免最佳化Sig nalTapll_register_preserve.v / Verilog1 /*2(C) OOMu

21、sou 2008 33File name : Sig nalTapll_register_preserve.v4Compiler : Quartus II 8.05Description : Demo how to preserve register in SignalTap II6Release : 10/17/2008 1.07*/10module SignalTapII_register_preserve (11input iCLK,12input iRST_N13)1415 reg 3:0 cnt /*synthesis noprune*/ ;1617always(posedge iC

22、LK, negedgeiRST_N) begin18if (!iRST_N)19cnt = 4h0;20else21cnt SOF Managei:log. 2005/10/17 23:02.05 #0Cl国 Data 皋I SetupHierarchy DisplayX r rataLoc:囤171 Si gnalT ap 11_registei_pies6rv e|SI auto_signaltap_0團 auto_signaltap_0 For Help, press FlQuartus II 也支援 Verilog 2001 的語法1 /*2(C) OOMusou 2008 33Fil

23、e name : Sig nalTapll_register_preserve.v4Compiler : Quartus II 8.05Description : Demo how to preserve register in SignalTap II6Release : 10/17/2008 1.07*/98module SignalTapII_register_preserve (9in put iCLK,10in put iRST_N11);1412/ Verilog 200113/(*noprune*) reg 3:0 cnt;1714always(posedge iCLK, neg

24、edgeiRST_N) begin15if (!iRST_N)16ent = 4hO;17else18ent = ent + 4h1;19end2420endmodule16行(*noprune*) reg 3:0 ent;這是Verilog 2001 的語法,Quartus II 8.0 也能看得懂。放在若希望整個 module的reg都不被最佳化,可將 synthesis attribute module。1 /*2(C) OOMusou 2008 http:/oomusou.enblogs.eom33File name : Sig nalTapll_register_preserve.v

25、4Compiler : Quartus II 8.05Deseription : Demo how to preserve register in SignalTap II6Release : 10/17/2008 1.07*/98module SignalTapII_register_preserve (9in put iCLK,10in put iRST_N11) /*synthesis noprune*/ ;1412reg 3:0 ent;1613always(posedge iCLK, negedgeiRST_N) begin14if (!iRST_N)15ent = 4h0;16el

26、se17ent = ent + 4h1;18end2319endmodule13行module Sign alTapll_register_preserve (in put iCLK,input iRST_N);)/*synthesis noprune*/ ;將/*synthesis noprune*/放在module,這樣整個 module的reg將不被最佳化,不用再一一指定。另外一個與 reg 相關的 Synthesis Attribute : /*synthesis preserve*/跟reg相關的attribute /*syn thesis preserve*/,除了 /*synth

27、esis noprune*/ 可用,還有一個可用,兩者的差異在於:/*syn thesis noprune*/避免Quartus II 優化掉沒output的reg。/*syn thesis preserve*/ reg。避免Quartus II將reg優化為常數,或者合併重複的也可以使用Verilog 2001的寫法/(*preserve*) reg 3:0 cnt;或者整個module的寫法module Sig nalTapll_register_preserve ( in put iCLK, input iRST_N)/*synthesis preserve*/;类别:Ic |转贴卜|添加到搜藏|分享到i贴吧|浏览(329) |评论(0) ffi上一篇:sharedUb untu 下安装 Cade nee 51.下一篇:sharedVerilog 综合时 wire 与 reg. mi最近读者:kimi169 coffin didi jadek ung 盖塔 Q peipeiha

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2