| |
原来以为路径path4和path1,path2,path3上的建立时间和保持时间检查的分析方法一项。所以上篇的timing report仅仅分析了一下path1和path2。后来觉得有些疑问,然后分析了下path4(慢时钟采集快数据),发现dc一个很微妙的分析方法,后来在dc的文档中发现的。后来想了下,这种建立关系和保持关系的检查其实在dc的文档中还是说明了的。先看分析,再总结:
综合脚本:
set lib $env(DC_LIB)
set target_library "slow.db fast.db"
set link_library "* $target_library"
set search_path ". ../src ../scripts $lib"
analyze -format verilog m.v
elaborate m
compile
create_clock -period 5 [get_ports clka]
create_clock -period 30 [get_ports clkb]
set_multicycle_path 3 -to cout_reg[*]/D
set_multicycle_path 4 -to dout_reg[*]/D
set_min_delay 0 -to dout_reg[3]/D
set_min_delay 0 -to cout_reg[3]/D
compile
path4分析:
Setup:
report_timing -from ain_reg_reg[*]/CK -to dout_reg[4]/D
可以看出来慢时钟采集快数据的多周期路径分析,不是像快时钟采集慢数据的多周期分析一样(下图):
希望的慢周期采集快数据的多周期分析
根据timing report可以知道实际的分析是:
再看下保持时间的分析
report_timing -from ain_reg_reg[*]/CK -to dout_reg[4]/D -delay min
快时钟采慢数据的缺省hold chek如下,也是我们希望的:
而实际上,dc的分析师如下的:
所以对于慢时钟采集快数据的setup,hold check的分析,可以由上面的分析总结为:
对于setup分析:
对于每一个capture active edge 找到最靠近它的launch active edge,然后这个launch active edge 到多周期的capture active edge的路径就是setup check的路径。
对于hold分析:
对于每一个capture active edge 找到它的launch active edge的下一个launch active edge,然后这个launch active edge 到多周期的capture active edge 的路径就是hold check路径。
更简单的说,慢时钟采集快数据,是先分析慢时钟的单周期setup relation和hold relation,然后再扩展到多周期路径上。
其实就是将单周期的capture active edge,换成多周期后的capture active edge(多周期的相当于周期很大)
对于hold分析的理解,可以将综合脚本改成下面的,然后再分析下,就会很明白了。
set lib $env(DC_LIB)
set target_library "slow.db fast.db"
set link_library "* $target_library"
set search_path ". ../src ../scripts $lib"
analyze -format verilog m.v
elaborate m
compile
create_clock -period 5 [get_ports clka]
create_clock -period 31 [get_ports clkb]
set_multicycle_path 3 -to cout_reg[*]/D
set_multicycle_path 4 -to dout_reg[*]/D
set_min_delay 0 -to dout_reg[3]/D
set_min_delay 0 -to cout_reg[3]/D
compile
path4:
setup分析:
report_timing -from ain_reg_reg[*]/CK -to dout_reg[4]/D
示意图如下:
Hold分析:
report_timing -from ain_reg_reg[*]/CK -to dout_reg[4]/D -delay min
示意图: