Modelsim10.1中代码覆盖率查看

所需积分/C币:48 2013-06-12 09:43:56 2.78MB PDF
110
收藏 收藏
举报

叫教你学会怎么用代码覆盖. Modelsim代码覆盖率功能Code coverage,能报告出statement(语句)、branch(分支)、condition(条件)、expression(表达)、toggle(信号翻转)、fsm(有限状态机)等多种覆盖率情况。
2、弹出 Projiect M Project Compiler Setting 覆盖率选项卡 2 Compiler Settings选9e0 项卡,单击 General Settings Coverage选项,如 T Do Not Compile Compile to library: work Place in Folder: Top Level 下图 File Properties Multiple files selected OK Cancel General Verilog &SystemVerilog Coverage Source code coverage(+cover) 这4个都选上 V Enable Statement Coverage(s) v Enable Branch Coverage) y Enable Condition Coverage(c) v Enable Expression Coverage(e) 这3个只能选一个, Toggle coverage(+cover) 01或10翻转 最好选上面二者之 C Enable 0/1 Toggle Coverage(t) 否则后面无法 Enable 0/1/ Toggle Coverage (xA 高阻变为0或 加载波形图 C Disable Toggle Coverage 也被认为是下 沿,在6.2之 Optimization level (-coveropt 后的版本才有 ptimization level 1 选择默认即可] C Optimization level 2 s C Optimization level 3 C Optimization level 4 选择前两项」 Other coverage v Enable Finite State Machine Coverage(+cover f) 3、选择如图,单击OK v Enable code coverage in cells(-covercells) Ignore case statement default choice(-coverexdudedefault) 后, Compile all Ignore Focused Expression/Condition Coverage(-nocoverfec) Disable Short Cirauit Elaboration(-nocovershort) OK Cancel Modelsim SE 10.1c File Edit View Compile Simulate Add Library Tools Layout Bool 曰翻战 A哥 3.唱号唱,以有国型 血 Library 函x回D: DA/ModelSim/AND2AND Name Type Path Ln# 4、如图,切换到 di work Libra module Optimized,. 2 inpu t opt1 Optimized Library空间,右键 opt2 Optimized outpu AND 2 Module D: / EDA/Model 4 reg AND 2 如图所示,选择 血 Roatfixlib Simulate di mc2_lib(e Simulate without Optimization a⊥way Simulate with ±血mt Simulate with full Optimizatio if( +i mt Simulate with Coverage ±mtPA Coverage,如下图 Edit 血 mtUP els di mtUvm Refresh 血 sy std Recompile endmodu ii vital2000Optimize di ieee Update ± modelsim 血std Create Wave +h std_develd Delete Delete 血血 synopsys erilog Copy Ctrl+c I File Edit View Compile Simulate Add Structure Tools Layout Bookmarks Window Help 国,日感卫20,影‖烛「翻步曲观酒‖电细會如国「10国国卦函|日型!击泳 甚土 T Threshold 1001叹x→‖ Layout covera ColumnLayout allColumns ‖吗,唱,号唱,‖以到B 盐占B5求<·静Sesh 3 sim ( Recursive Coverage Aggregation)-Default d xD:/EDAModelsim/AND2/AND_2_test.v(AND_2-test)-by file-Default +函x Instance Design unit Design unit type visibility Cover Options Total c Hts BcLns 厂AND_2tet Xs 8 rst =1 d inst AND_2(fast) Module +acc=dmu tcover =bcefst Xs =INITIAL#5 ANd 2 test, Process tacc=d A=0 e=ALWAYS#17 AND 2 test,Process Xs 10 B 0; e=ALWAYS#18 AND_ 2 test.,, Prc Xs #12st=0 =ALWAYS#19 AND_2 test.Process +acc=d 12 #24rst=1 =vsim_ capacity= #1000 Sstop()i 15 nd 16 7 ways #10 clk - Clk 18 lways #6 A lways #7 B 20 AND 2 inst( clk(clk) 222 rst(rst) 3 [山 Project Inste图「观如x一 4[WeAD21回Ao2ttyx t vsim -coverage work AND 2test Loading work AND 2 test(fast) Progect: AND 2 Now: Ons Delta sim: /AND_ 2_test Recursive Mode 「"6B四 M國”N 国曾l 18:21 2012/10/17 M ModelSim SE 10.lc file Edit View Compile Simulate Add Wave Tools Layout BockmarksWindow Help ‖由倒我到食略「191国回国| a?出盐工了me「11<?x‖ Layout coverage‖ Coumlayou: p11colum 6、添加波形窗口 叫路学 ,单击RunA(因 +oX Mave-De'aut MsOs 为我在 testbench中 AND 2 test AND 2 test. . Module /AND 2 tes /dk AND 2(fast) Module +c=dm」 AND_2 tes:/st 1 3A#5AD2把…Pocs 调用了系统函数 J :ALWAYS#1 AND 2 test Process cc=d AND 2 tes B J :ALWAYS#18 AND 2 test Process tacc=d /AND 2 test/C J =ALWAYS#19 AND 2 testProcess A #sim_capacty Capacity Sstop(),所以会自 访停止仿真。或者 多单击几次Run, 1036n5 1111111111111111111111 11111111111 Cursor 1 然后单击Beak暂 巴如图82国四e回402,A02=y 停仿真),如图 4 Break in Module AND 2 test at D: /EDA/ModelSim/AND 2/AND 2 teet. lin: 14 86ns to 850ns o9t:A02o:1057et:m:/02打#5 Recursive Mode Instance Coverage nstance Design unit Design unit type Total coverage s 7、这时仿真界面会 /AND 2 test AND 2 test Module 100% A/AND_2_test/inst AND_2 Module 100% 多出很多窗口,如右 图,有 nstance、 Files 最大化图标 等窗口选项。最大化 nstance窗口,如下图 tbay幽Pttn如图Fe"型 Transcript t Compile of AND 2 test. y was successful E Instance Coverage 回x File Bookmarks Window Help C Instance Coverage 图翻盛!:份· iNstance Design unit Design unit type Total coverage stmt count stmts hit stmts missed stmt stmt graph Branch count Branches hit Branches missed Branch Branch graph uDPC d /AND_2_test AND_2_test Module 100% 16 16 0100% A /AND_2_test/inst AND_2 Module 100% 覆盖率高显示绿色, 覆盖率低显示红色 如果覆盖率低,需要 修改代码,直到覆盖 率满足要求为止 lode elSim SE 10.1c File Edit View Compile Simulate Add Instance Coverage Tools Layout Bookmarks 酃!影1≌2≈|0·當He 翻步画 8、回到 nstance窗7m1?x Layout Coverage Col 口,如图,右键单 3吣··」 鼎的 Instance Coverage 函 X ga Wave-Default 击选择Code INstance Design unit Design unit type Total coverage Msas A/AI / AND__test/inst Code coverage reports. 100% Set filter coverage reports. Clear code coverage data 出代码覆盖率报告 Test analys XML Import Hint 明铜36ns a/el ons 山ay8如Fm业圈 Wave x回A02y

...展开详情
试读 12P Modelsim10.1中代码覆盖率查看
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
  • 分享小兵

关注 私信
上传资源赚钱or赚积分
最新推荐
Modelsim10.1中代码覆盖率查看 48积分/C币 立即下载
1/12
Modelsim10.1中代码覆盖率查看第1页
Modelsim10.1中代码覆盖率查看第2页
Modelsim10.1中代码覆盖率查看第3页

试读结束, 可继续读1页

48积分/C币 立即下载