文章目录
一. 如何报出unconstrained path
变量timing_report_unconstrained_paths用来控制unconstrained path是否被report出来,该值默认值是false,在默认情况下,unconstrained path是不被report出来的。
在debug过程中如果需要report unconstrained path,先将timing_report_unconstrained_paths的值设置为true(set timing_report_unconstrained_paths true),然后再report_timing。
二. 如何debug primetime中path unconstrained的原因
1. set_false_path/set_multicycle_path/set_max_delay/set_min_delay等sdc
- 首先在跑sta的时候需要设置sdc_save_source_file_information为true, 然后再读lib, design,spef,sdc等文件,最后把session写下来,这样session里面就有了sdc的 source file information。
- 当需要debug的时候,先起pt_shell, restore_session,然后set sdc_save_source_file_information true,因为是新起的pt_shell,这个变量defalut为false, 最后用report_timing -exceptions dominant -from */-to */-th *就能报出来unconstrained的原因是set_false_path/set_multicycle_path/set_max_delay/set_min_delay以及是哪个sdc文件的哪一行导致的。
如果不用restore_session的话,那就需要先起pt_shell,设置sdc_save_source_file_information为true从头开始跑,全部跑完之后直接report_timing -exceptions all -from */-to */-th *,但是这样需要重跑PT,花费的时间会很长。
如果你跑的session里面没有sdc的 source file information,但是重跑需要很久的时间,可以用下面的command来判断是set_false_path/set_multicycle_path/set_max_delay/set_min_delay哪一个导致的unconstrained,但是缺点是无法得知是哪个sdc文件的哪一行导致的。
get_attribute [get_timing_paths -from */-to */-th *] dominant_exception
另外,如果你想知道timing_path有哪些attribute可以用下面的command:
list_attributes -application -class timing_path -nosplit
因此,也可以用下面的command 来报出timing path所有的attributes, 进而判断是什么导致的unconstrained
report_attribute -application [get_timing_paths -from */-to */-th *]
2. 时钟异步
同上,用report_timing -exceptions all -from */-to */-th *就能报出来unconstrained的原因,不仅仅是set_false_path/set_multicycle_path/set_max_delay/set_min_delay导致的unconstrained。
如果是clocks async,也可以用下面的方法去debug。
- 首先得到registers的clocks,用的command如下:
get_attribute [get_pins $reg0/CP] clocks
get_attribute [get_pins $reg1/CP] clocks - 判断launch和capture clocks的关系,用的command如下:
get_clock_relationship {$launch_clock $capture_clcok}
3. 寄存器的值为常数
可以使用get_attribute [get_pins $cell_pin] case_vlaue来得到寄存器某个pin的数值。
另外,可以使用list_attributes -application -class pin -nosplit来得到pin的所有attributes,下面是pin的case_value和constant_value attributes。
case_value
Type: string
Returns the user-specified logic value of the pin or port propagated from a case analysis or logic constant. This attribute is
computed only for leaf pins.
constant_value
Type: string
Returns the logic value of a pin tied to logic constant zero or one in the netlist.
总结
当hierachy和flatten run 的timing结果差别很大时,有可能是sdc导致的,debug unconstrained path是什么原因导致的尤为重要, 这样就能快速定位到hier和flat sdc不一致的问题。