LEC:lec(logic equivalence checking)又叫formal check,是对ic design的综合,PR前后的设计进行逻辑对比检查的工具/手段,保证综合不改变rtl原始的logic function。目前用的较多的就是C家的formal工具。接下来介绍一下lec过程中遇到的问题以及debug手段。
1. Mapping problem
可能存在的map问题:map时间过长,很久都没有map完/ map fail了很多
-
Mapping 时间过久:
因为工具默认是function-based mapping,然后才是name-based mapping ,而function-based需要用很久的时间。因此针对于mapping时间过长的情况,可以设置name-based map。
set mapping method –name first -
Map fail
存在unmapped points是必须要解掉的,否则你的lec就是不完整的。对于unmapped points,可以进行check,然后增加相应的renaming rule。比如如下的unmapped points,那就可以设置如下的ruleGolden:/fifo_reg[0][0] Revised: /fifo_0__reg[0] add renaming rule R1 "%d__reg\[%d\]" "reg[@1][@2]" –revised
2. Compare problem
-
Using Lec GUI to debug
Lec 完成之后,如果terminal还在,就可以set_gui on的方式打开,如果没有terminal,有session,可以通过如下命令方式打开terminal,然后再进入gui界面进行debug。进入gui界面之后,利用mapping manager进行NEQ的debug。详细不再介绍lec –resetart_checkpoints xxx.session
-
Debug with command
首先先把不等的点可以报出来,然后再针对相应的序列号进行不等的分析report compare data –class noneq report unmap point –not 然后针对不等的点进行analyze分析 analyze nonequivalent –verbose analyze Nonequivalent [ <gate_id> | <instance_pathname*> [-Golden | -Revised] ] [-Summary | -Verbose]
-
比如下面的例子:
可以看出我们通过分析不等的revised 点,它会给你报出来可能需要增加seq的约束,对应左下图。那么对于design的情况可能就是右下图所示。综合时候把常数值的DFF给优化掉了。
那么这个时候我们就可以通过增设design directive来解掉这个问题:set flatten model -seq_constant
如果lec不过,可以从以下方面进行check
- If the blackboxs were balanced,can report_block_box to check
- If DFT constraints were setting correct, can report_pin_constraint to check
- If mapped is complete, can report_unmap_point –notmap -summary to check
- If retiming was excuted in syn stage, check in dofile
- If use correct filelist, check you latest rtl
- If large number or just few points,true noneq or false noneq
3. Solving Abort
-
对于abort点,首先检查一下abort的module的大小。
如果module很大,可以去hier_compare dofile中看为什么module没有被分为submodule进行比较,是不是阈值设置的太大了。
如果module不是很大,可以通过停止当先的job,把abort的点设置为root module进行比较:set root module cn_pass –golden set root module cn_pass –Revised Analyze datapath–module –effort high –verbose Analyze datapath–wordlevel<-effort high> -verbose Set compare effort ultra
-
对于在compare过程中没有进行分析abort的job,设定如下:
set_analyze_option –noanalyze_abort
此时job可以完成,只不过是fail的,这个时候通过相应的module设置为root module,然后一步步设定