如何保证RTL设计与综合后网表的一致性

http://hi.baidu.com/hieda/blog/item/1754402924bed7f999250afa.html

文章简介:在超大规模数字集成电路的设计中,我们使用逻辑综合工具来完成从RTL设计到门级网表的转化。我们希望它综合出的门级网表与我们的RTL 设计在逻辑和时序上完全一致。但是某些书写风格和设计思路却会造成两者不一致的情况,降低我们的工作效率。本文列举了三种RTL设计与综合后网表不一致的 情况,并给出了解决方法.我们以Design Compiler为例,来说明设计RTL时应该注意的问题。在仿真和调试时,我们使用了NC-Verilog和Debussy。

1.不完整的敏感量列表
在下面的例子中,有一个always语句,它描述了一个或门,其中它的敏感量列表包含IN1和IN2。
/
module OR_GATE_A (OUT_A, IN1, IN2);
output OUT_A;
input IN1, IN2;
reg OUT_A;
always @(IN1 or IN2)
OUT_A = IN1 | IN2;
endmodule
/
再看下面的例子,敏感量列表只包含IN1。
/
module OR_GATE_B (OUT_B, IN1, IN2);
output OUT_B;
input IN1, IN2;
reg OUT_B;
always @(IN1)
OUT_B = IN1 | IN2;
endmodule
/
这两个例子有什么不同呢?我们看下面的波形:
1_29140315.JPG
对比两个module的输出,可以看出:它们的输入相同,但是输出在22时刻却不同,这是因为OR_GATE_B的敏感量列表只包含IN1,导致在22时刻虽然IN2发生了变化,却不能触发OUT_B重新求值。
我们看逻辑综合后的情况。
这两个module的逻辑综合的结果完全相同,均包含完整的敏感量列表。因此,对于OR_GATE_B,它会有RTL设计与综合后的网表不一致的问题。
避免这种问题的方法有二:

  1. 使用数据流的描述方法描述组合逻辑;
  2. 若用always语句描述组合逻辑,必须检查敏感量列表是否完整;

显然,采用第一种方法更简单一些。

2.时序延迟(timing delay)
我们在进行建模时,常常含有时间延迟。而时间延迟是不可综合的对象,因此,如果建模时不注意时间延迟的"必要的准确性",便会造成时序上的不一致,进而造成逻辑结果上的不一致。我们看下面的例子。
例子:一个二级延迟线

module mis_timing (
A ,
DATA_RDY,
VE_CLK,
VE_RSTJ,
OUT,
OUT_RDY
);
parameter A_WIDTH = 3;
input [A_WIDTH-1:0]A;
input DATA_RDY;
input VE_RSTJ;
input VE_CLK;
output OUT;
output OUT_RDY;
reg OUT_RDY;
reg DATA_RDY_DLY1;
reg DATA_RDY_DLY2;
reg [A_WIDTH-1:0]OUT ;
parameter UDLY = 1;
//---time for one clock cycle
parameter CLOCK_CYCLE=6.5 ;
always@(posedge VE_CLK or negedge VE_RSTJ) //the data addr
if (!VE_RSTJ)
OUT <= #UDLY 'd0 ;
else OUT <= #(UDLY+CLOCK_CYCLE) A;
//---- output ready ------------------
always@(posedge VE_CLK or negedge VE_RSTJ)
if (!VE_RSTJ)
OUT_RDY <= #UDLY 'd0 ;
else OUT_RDY <= #(UDLY+CLOCK_CYCLE) DATA_RDY;
endmodule

在这个行为级描述中,我们使用了一个超过一个时钟周期的延迟。
我们使用下面的仿真文件进行仿真:

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
iscas2spice spice netlist generation tool -- version 2.2 by Jingye Xu @ VLSI Group, Dept. of ECE, UIC, June, 2008 This tool reads the ISCAS85 benchmark circuit "*.bench" file and translate the file into SPICE netlist using the given technology and the standard cell library. platform: linux x86 sytem Input: ISCAS85 benchmark circuit: *.bench; standard cell library: stdcells.sclb; standard cell models: stdcells.lib; interconnect paramaters: *.int; Output: SPICE netlist: out.sp The whole procedure of the tools can be divided into several steps: 1. Gate replacement: replace the gates that can't be found in the with the gates in the standard cell lib. (break.pl) Output: *.bench, *.bench.bak 2. Generate the GSRC files: generate the GSRC files for the fengshui placer. (gsrcgen.pl) Output: gsrcfile/iscas.* 3. Placement: using the fengshui placement tool to perform the component placement. (fs50) Output: gsrcfile/iscas_fs50.pl 4. Generate ISPD file: tanslate the placement results into ISPD98 format file that can be used as the input of the global router. (gsrc2ispd.pl) Output: gsrcfile/iscas.laby.txt 5. Perform the routing: use the labyrinth global router to perform the routing. (mazeRoute) Output: gsrcfile/output 6. Generate the SPICE netlist: use all the available information to generate the final SPICE netlist. (spicegen.pl) Output: out.sp Usage: iscas2spice.pl Iscas85BenchmarkFile [-C/L/N] options: -C :default value, use the RC model for interconnect -L :use the RLC model for interconnect -N :treat interconnect as short circuit wire This package used the fengshui placement tools and labyrinth global routing tools, for information regarding these two free tools, please vist: http://www.ece.ucsb.edu/~kastner/labyrinth/ http://vlsicad.cs.binghamton.edu/software.html For information regarding this software itself please visit: http://wave.ece.uic.edu/~iscas2spice Many thanks to my advisor Masud H. Chowdhury for his support!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值