specify的含义、作用及vcs对应仿真选项

转载自https://www.cnblogs.com/hxing/p/9584190.html
一、specify的含义
  specify block用来描述从源点(source:input/inout port)到终点(destination:output/inout port)的路径延时(path delay),由specify开始,到endspecify结束,并且只能在模块内部声明,具有精确性(accuracy)和模块性(modularity)的特点。
二、specify的作用
specify block可以用来执行以下三个任务:
  2.1、描述横穿整个模块的各种路径及其延时。(module path delay)
  2.2、脉冲过滤限制。(pulse filtering limit)
  2.3、时序检查。(timing check) specify block有一个专用的关键字specparam用来进行参数声明,用法和parameter一样,不同点是两者的作用域不同:specparam只能在specify block内部声明及使用,而parameter只能在specify block外部声明及使用。
2.1、第一个任务:
  模块路径延时(module path delay)
  一条模块路径可以是一条简单的路径(simple path),或者是一条边缘敏感的路径(edge sensitive path),或者是一条状态依赖的路径(state dependent path)。
  2.1.1、simple path,可以由以下两种格式中的任意一种来声明:
  1)、并行连接(patallel connection):source => destination
  2)、全连接(full connection): source *> destination
  例: (a, b => q, qn) = 1; 等价于: (a => q) = 1; (b => qn) = 1; 而(a, b *> q, qn) = 1; 等价于: (a => q) = 1; (b => q) = 1; (a => qn) = 1; (b => qn) = 1;
在这里插入图片描述

2.1.2、edge sensitive path
  edge sensitive path 是那些源点(source)使用边沿触发的路径,并使用边缘标示符指明触发条件(posedge/negedge),如果没有指明的话,那么就是任何变化都会触发终点(destination)的变化。
例1:(posedge clk => (out +: in)) = (1,2); 在clk的上升沿,从clk到out的模块路径,其上升延时是1,下降延时是2,从in到out的数据路径是同向传输,即out = in。
例2:(negedge clk => (out -: in)) = (1,2); 在clk的下降沿,从clk到out的模块路径,其上升延时是1,下降延时是2,从in到out的数据路径是反向传输,即out = ~in。
例3:(clk => (out : in)) = (1,2); clk的任何变化,从clk到out的模块路径,其上升延时是1,下降延时是2,从in到out的数据路径的传输是不可预知的,同向或者反向或者不变。
Note:模块路径的极性(module path polarity):未知极性(unknown polarity,无),正极性(positive polarity,+),负极性(negative polarity,-)。
  2.1.3、state dependent path
  是那些源点(source)以来指定条件状态的路径,使用if语句(不带else)。 在条件=1 or X or Z的情况下,认为条件成立。如果有一条路经,存在多个条件同时成立的情况,那么使用延时最小值的那条限制。
例1:

specify      
if(a)     (b => out) = (1,2);
if(~a)    (b => out) = (2,3);
if(b)     (a => out) = (1,2);
if(~b)    (a => out) = (2,3); 
endspecify

例2:

specify        
if(rst)   (posedge clk => (q +: data)) = (1,2);        
if(~rst)  (posedge clk => (q +: data
  • 15
    点赞
  • 163
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
在进行VCS仿真时,可以通过以下几个步骤调用SDF文件: 1. 首先,在Verilog文件中添加对SDF文件的引用。例如: `module my_module (input clk, input reset, output reg [7:0] data_out);` `// SDF file inclusion` `// "my_module.sdf" is the path to the SDF file` `// -sdf_cmd_file option is used to specify the SDF file` `// -sdf_verbose option is used to enable verbose mode` `// -sdf_annotate option is used to enable annotation mode` `// -sdfnoexpr option is used to disable expression evaluation` `// -sdfnoedge option is used to disable edge evaluation` `// -sdfnochk option is used to disable timing check` `// -sdfnowarn option is used to disable warning messages` `// -sdfnotime option is used to specify the time scale` `// -sdfmaxdelay option is used to specify the maximum cell delay` `// -sdfmindelay option is used to specify the minimum cell delay` `// -sdfnomaxdelay option is used to disable the maximum cell delay check` `// -sdfnominelay option is used to disable the minimum cell delay check` `// -sdfrep option is used to specify the SDF report file` `// -sdfreport option is used to enable SDF report generation` `// -sdferr option is used to specify the SDF error file` `// -sdfverbose option is used to enable SDF verbose mode` `// -sdfdebug option is used to enable SDF debug mode` `// -sdfpath option is used to specify the SDF library search path` `// -sdfnolib option is used to disable the SDF library search` `// -sdflib option is used to specify the SDF library file` `// -sdfflags option is used to specify additional SDF flags` `// -sdfnoopt option is used to disable SDF optimization` `// -sdfnowire option is used to disable wire delay evaluation` `// -sdfnooutput option is used to disable output delay evaluation` `// -sdfnoinput option is used to disable input delay evaluation` `// -sdfnosupply option is used to disable supply net delay evaluation` `// -sdfnocheck option is used to disable SDF consistency check` `// -sdfnousage option is used to disable usage delay evaluation` `// -sdfnoglobal option is used to disable global delay evaluation` `// -sdfnohierarchy option is used to disable hierarchy delay evaluation` `// -sdfinput option is used to specify the SDF input file` `// -sdfoutput option is used to specify the SDF output file` `// -sdfversion option is used to specify the SDF version` `// -sdftimeout option is used to specify the maximum SDF processing time` `// -sdfquiet option is used to disable SDF message output` `// -sdfignore option is used to ignore SDF errors` `// -sdfkeep option is used to keep the SDF temporary files` `// -sdflist option is used to list all SDF files` `// -sdfhelp option is used to display the SDF help message` `// -sdf option is used to specify all SDF options` `(* SDF_FILE="my_module.sdf",` `SDF_CMD_FILE="-sdf_cmd_file my_module.sdf",` `SDF_VERBOSE="-sdf_verbose",` `SDF_ANNOTATE="-sdf_annotate",` `SDF_NOEXPR="-sdfnoexpr",` `SDF_NOEDGE="-sdfnoedge",` `SDF_NOCHK="-sdfnochk",` `SDF_NOTIME="-sdfnotime 1ns",` `SDF_MAXDELAY="-sdfmaxdelay 10ns",` `SDF_MINDELAY="-sdfmindelay 1ns",` `SDF_NOMAXDELAY="-sdfnomaxdelay",` `SDF_NOMINDELAY="-sdfnominelay",` `SDF_REPORT="-sdfreport my_module.sdf.rpt",` `SDF_ERR="-sdferr my_module.sdf.err",` `SDF_VERBOSE2="-sdfverbose",` `SDF_DEBUG="-sdfdebug",` `SDF_PATH="-sdfpath /lib/sdf",` `SDF_NOLIB="-sdfnolib",` `SDF_LIB="-sdflib my_module.sdflib",` `SDF_FLAGS="-sdfflags "-q -m""` `SDF_NOOPT="-sdfnoopt",` `SDF_NOWIRE="-sdfnowire",` `SDF_NOOUTPUT="-sdfnooutput",` `SDF_NOINPUT="-sdfnoinput",` `SDF_NOSUPPLY="-sdfnosupply",` `SDF_NOCHECK="-sdfnocheck",` `SDF_NOUSAGE="-sdfnousage",` `SDF_NOGLOBAL="-sdfnoglobal",` `SDF_NOHIERARCHY="-sdfnohierarchy",` `SDF_INPUT="-sdfinput my_module.sdf",` `SDF_OUTPUT="-sdfoutput my_module.sdf.out",` `SDF_VERSION="-sdfversion 3.0",` `SDF_TIMEOUT="-sdftimeout 10s",` `SDF_QUIET="-sdfquiet",` `SDF_IGNORE="-sdfignore",` `SDF_KEEP="-sdfkeep",` `SDF_LIST="-sdflist",` `SDF_HELP="-sdfhelp",` `SDF="-sdf" *)` `always @(posedge clk or posedge reset)` `if (reset)` `data_out <= 0;` `else` `data_out <= data_out + 1;` 2. 然后,在进行仿真时,使用vcs命令行选项来指定SDF文件,例如: `vcs -sdf my_module.sdf -top my_module -debug -full64 -R` 其中: -sdf:指定SDF文件 -top:指定顶层模块 -debug:开启调试模式 -full64:使用64位编译器 -R:运行仿真 3. 最后,在仿真完成后,可以查看SDF报告文件以获取时序分析结果。例如: `report_timing -from <起始时钟域> -to <终止时钟域> -delay_type min -path_type full_clock_unate -nworst <最差路径数> -verbose -file <报告文件名>` 其中: -from:指定起始时钟域 -to:指定终止时钟域 -delay_type:指定延迟类型 -path_type:指定路径类型 -nworst:指定最差路径数 -verbose:开启详细模式 -file:指定报告文件名

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值