马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 joeyuanjoeyuan 于 2011-11-29 20:06 编辑
目前在后仿真时遇到一个问题设计所有寄存器的negtive check,暂以DFCNQD1BWP7T寄存器为例,该寄存器model如下:
- `celldefine
- module DFCNQD1BWP7T (D, CP, CDN, Q);
- input D, CP, CDN;
- output Q;
- reg notifier;
- `ifdef NTC
- // Reserve for NTC.
- `ifdef RECREM
- // Reserve for RECREM.
- wire CDN_d ;
- buf (CDN_i, CDN_d);
- `else
- // Reserve for non RECREM.
- buf (CDN_i, CDN);
- `endif
- wire D_d, CP_d ;
- pullup (SDN);
- tsmc_dff (Q_buf, D_d, CP_d, CDN_i, SDN, notifier);
- buf (Q, Q_buf);
- `else
- // Reserve for non NTC.
- buf (CDN_i, CDN);
- pullup (SDN);
- tsmc_dff (Q_buf, D, CP, CDN_i, SDN, notifier);
- buf (Q, Q_buf);
- `endif
- // Timing logics defined for default constraint check
- buf (CP_check, CDN_i);
- buf (D_check, CDN_i);
- `ifdef TETRAMAX
- `else
- tsmc_xbuf (CP_DEFCHK, CP_check, 1'b1);
- tsmc_xbuf (D_DEFCHK, D_check, 1'b1);
- `endif
- `ifdef TETRAMAX
- `else
- specify
- if (CP == 1'b1 && D == 1'b1)
- (negedge CDN => (Q+:1'b0)) = (0, 0);
- if (CP == 1'b1 && D == 1'b0)
- (negedge CDN => (Q+:1'b0)) = (0, 0);
- if (CP == 1'b0 && D == 1'b1)
- (negedge CDN => (Q+:1'b0)) = (0, 0);
- if (CP == 1'b0 && D == 1'b0)
- (negedge CDN => (Q+:1'b0)) = (0, 0);
- ifnone (negedge CDN => (Q+:1'b0)) = (0, 0);
- (posedge CP => (Q+)) = (0, 0);
- $width (negedge CDN, 0, 0, notifier);
- $width (posedge CP &&& CP_DEFCHK, 0, 0, notifier);
- $width (negedge CP &&& CP_DEFCHK, 0, 0, notifier);
- `ifdef NTC
- `ifdef RECREM
- $setuphold (posedge CP &&& D_DEFCHK, posedge D, 0, 0, notifier,,, CP_d, D_d);
- $setuphold (posedge CP &&& D_DEFCHK, negedge D, 0, 0, notifier,,, CP_d, D_d);
- $recrem (posedge CDN, posedge CP, 0,0, notifier, , , CDN_d, CP_d);
- `else
- $setuphold (posedge CP &&& D_DEFCHK, posedge D, 0, 0, notifier,,, CP_d, D_d);
- $setuphold (posedge CP &&& D_DEFCHK, negedge D, 0, 0, notifier,,, CP_d, D_d);
- $recovery (posedge CDN, posedge CP, 0, notifier);
- $hold (posedge CP, posedge CDN, 0, notifier);
- `endif
- `else
- $setuphold (posedge CP &&& D_DEFCHK, posedge D, 0, 0, notifier);
- $setuphold (posedge CP &&& D_DEFCHK, negedge D, 0, 0, notifier);
- $recovery (posedge CDN, posedge CP, 0, notifier);
- $hold (posedge CP, posedge CDN, 0, notifier);
- `endif
- endspecify
- `endif
- endmodule
- `endcelldefine
复制代码
后仿环境使用VCS 2009.06,当仿真时不加+neg_tchk选项时,反标时报如下错误:
- Warning-[SDFCOM_NNTC] Need timing check option +neg_tchk
- /home/yuanq/pnd_bb_chip/simulation/pnd_bb_chip_wcs.sdf, 109222
- module: DFCNQD2BWP7T, "instance: tb_bb_psim.U_pnd_bb_chip.u_BD2_Channel.IF_L1_reg_1_"
- SDF Error: Negative RECOVERY value replaced by 0.
- Add +neg_tchk to consider Negative delay value.
- Warning-[SDFCOM_NNTC] Need timing check option +neg_tchk
- /home/yuanq/pnd_bb_chip/simulation/pnd_bb_chip_wcs.sdf, 109227
- module: DFCNQD2BWP7T, "instance: tb_bb_psim.U_pnd_bb_chip.u_BD2_Channel.IF_L1_reg_1_"
- SDF Error: Negative HOLD value replaced by 0.
- Add +neg_tchk to consider Negative delay value.
复制代码
为了检查negtive延迟,增加+neg_tchk,反标仍有错误:
- Warning-[SDFCOM_NL] Negative Limit on Simple TC
- ../../nl/pnd_bb_chip_wcs.sdf, 113120
- module: DFCNQD1BWP7T, "instance: tb_bb_psim_max_inf_t.U_pnd_bb_chip.u_BD2_Channel.i_TIMEBASE_GEN.flag_armed_reg"
- SDF Warning: Negative limit cannot be used in simple timing check, it's
- replaced by 0.
- Please use $recrem ..
复制代码
根据寄存器model定义了NTC和RECREM以便调用$recrem系统函数,但是定义以上两个宏后仍然报如下错误:
- Warning-[SDFCOM_CFTC] Cannot find timing check
- ../../nl/pnd_bb_chip_wcs.sdf, 113119
- module: DFCNQD1BWP7T, "instance: tb_bb_psim_max.U_pnd_bb_chip.u_BD2_Channel.i_TIMEBASE_GEN.flag_armed_reg"
- SDF Warning: Cannot find timing check $hold(posedge CP,posedge CDN,...)
复制代码
|