SDF文件(Standard Delay File)提供了延迟信息表示的标准ASCII文件格式,VCS支持版本1.0、1.1、2.0、2.1和3.0。
在SDF格式中可以指定固有延迟(intrinsic delays),互连延迟(interconnect delays),端口延迟(port delays),时序检查(timing checks),时序约束(timing constraints)和路径脉冲(PATHPULSE)。
使用VCS读取SDF文件时,会将延迟值“反向标注(back-annotates)”到设计中,即在源文件中添加或者更改延迟值。
可以使用$sdf\_annotate系统任务进行反标,其使用格式如下。
$sdf_annotate("sdf_file"[,module_instance][,"sdf_configfile"][,"sdf_logfile"][,"mtm_spec"][,"scale_factors"][,"scale_type"]);
其中:
"sdf\_file":指定SDF文件的路径。
module\_instance:指定反标设计的范围(scope)
"sdf\_configfile":指定SDF配置文件
"sdf\_logfile":指定VCS保存error 和warnings消息的SDF日志文件。也可以使用+sdfverbose runtime option来打印所有反标消息
"mtm\_spec":指定延迟类型"MINIMUM(min)", "TYPICAL(typ)"或者"MAXIMUM(max)"。
"scale\_factors":分别指定min:typ:max的缩放因子,默认是"1.0:1.0:1.0"
"scale\_type":指定缩放之前延迟值得来源,"FROM\_TYPICAL","FROM\_MIMINUM", "FROM\_MAXIMUM"和"FROM\_MTM" (default).
下面通过一个振荡环(ring\_oscillator)示例sdf文件和$sdf\_annotate的用法。
ring\_oscillator.v
`timescale 1ns / 1ps
module ring_oscillator(input enable ,output out);wire [2 : 0] inv_net;INVX1 u1(.Y(inv_net[0]),.A(inv_net[2])) ;INVX1 u2(.Y(inv_net[1]),.A(inv_net[0])) ;NAND2X1 u3(.Y(inv_net[2]),.A(enable),.B(inv_net[1])) ;assign out = inv_net[2] ;endmodule
上述是振荡环的Verilog代码,直接使用门级单元例化,无需重新综合。
上述电路在功能仿真时不会振荡环,只有考虑真实电路的单元延时和线延时才会振荡。
使用Design Compiler读入该设计,然后吐出SDF文件。
(DELAYFILE(SDFVERSION "OVI 2.1")(DESIGN "ring_oscillator")(DATE "Sun Feb 28 15:11:49 2021")(VENDOR "fast")(PROGRAM "Synopsys Design Compiler cmos")(VERSION "K-2015.06")(DIVIDER /)(VOLTAGE 1.10:1.10:1.10)(PROCESS "fast")(TEMPERATURE -40.00:-40.00:-40.00)(TIMESCALE 1ns)(CELL(CELLTYPE"ring_oscillator")(INSTANCE)(DELAY(ABSOLUTE(INTERCONNECT enableu3/A (0.000:0.000:0.000))(INTERCONNECT u2/Y u3/B(0.000:0.000:0.000))(INTERCONNECT u1/Y u2/A(0.000:0.000:0.000))(INTERCONNECT u3/Y u1/A(0.000:0.000:0.000)))))(CELL(CELLTYPE"NAND2X1")(INSTANCE u3)(DELAY(ABSOLUTE(IOPATH A Y(0.011:0.011:0.011) (0.014:0.014:0.014))(IOPATH B Y(0.013:0.013:0.013) (0.016:0.016:0.016)))))(CELL(CELLTYPE"INVX1")(INSTANCE u2)(DELAY(ABSOLUTE(IOPATH A Y(0.009:0.009:0.009) (0.008:0.008:0.008)))))(CELL(CELLTYPE"INVX1")(INSTANCE u1)(DELAY(ABSOLUTE(IOPATH A Y(0.013:0.013:0.013) (0.010:0.011:0.011))))))
在testbench中使用$sdf\_annotate系统函数:
initialbegin$sdf_annotate("ring_oscillator.sdf",ring_oscillator);end
界面打印出信息
*** $sdf_annotate() version 1.2R*** SDF file: "ring_oscillator.sdf"*** Annotation scope: ring_oscillator_tb.ring_oscillator*** No MTM selection argument specified*** No SCALE FACTORS argument specified*** No SCALE TYPE argument specified*** MTM selection defaulted to "TOOL_CONTROL":(+typdelays compiled, TYPICALdelays selected)*** SCALE FACTORS defaulted to "1.0:1.0:1.0":*** SCALE TYPE defaulted to: "FROM_MTM"*** Turnoff delay: "FROM_FILE"*** Approximation (mipd) policy: "MAXIMUM"
然后就可以在DVE中看到振荡的输出了
本文转载自公众号:芯片数字实验室
原文链接:https://mp.weixin.qq.com/s/zaWsH06DLQWqqCoYSRoQLw
未经作者同意,请勿转载!

 
                