Clocking Issues for Synthesis

本文详细阐述了集成电路设计中时钟信号的合成与描述方法,包括预布局和后布局阶段的时钟延迟和抖动估算。预布局阶段通过使用特定命令来估算时钟树延迟和抖动,而后布局阶段则依赖于高质量的布线来确定时钟特性。文章还介绍了如何在不同布局工具与DC工具之间进行交互,以及在没有专用布局工具的情况下,如何从第三方供应商处获取时钟网络信息并将其整合到设计流程中。

In any design, the most critical part of synthesis is the clock description. There are always issues concerning the pre and post-layout definitions.

Traditionally in the past, big buffers were placed at the source of the clock to drive the full clock network. Thick clock spines were used in the layout for even distribution of clock network delays and to minimize clock skews. Although this method sufficed for sub-micron technologies, it is miserably failing in the VDSM realms. The interconnect RC’s currently account for a major part of total delay. This is mainly due to the increase in resistance of the shrinking metal widths. It is difficult, if not impossible to model clocks using the traditional approach.

With the arrival of complex layout tools, capable of synthesizing clock trees, the traditional method has changed dramatically. Since, layout tools have the cell placement information, they are best equipped to synthesize the clock trees. It is therefore necessary to describe clocks in DC, such that it imitates the clock delays and skews of the final layout.

  • Pre-Layout
For reasons explained above, it is best to estimate the clock tree latency and skew during the pre-layout phase. To do this, use the following commands:

dc_shell-t> create_clock –period 40 –waveform {0 20}C LK
dc_shell-t> set_clock_latency 2.5 CLK
dc_shell-t> set_clock_uncertainty –setup 0.5 –hold 0.25 CLK
dc_shell -t> set_clock_transition 0.1 CLK
dc_shell -t> set_dont_touch_network CLK
dc_shell -t> set_drive 0 CLK


For the above example, a delay of 2.5 ns is specified as the overall latency for the clock signal CLK. In addition, the set_clock_uncertainty command approximates the clock skew. One can specify different numbers for the setup and hold time uncertainties by using –setup and –hold options as exemplified above.

Furthermore, specification of clock transition is essential. This restricts the max transition value of the clock signal. The delay through a cell is affected by the slope of the signal at its input pin and the capacitive loading present at the output pin. The clock network generally feeds large endpoints. This means, that although the clock latency value is fixed, the input transition time of the clock signal to the endpoint gates will still be slow. This results in DC calculating unrealistic delays (for the endpoint gates), even though in reality, the post-routed clock tree ensures fast transition times.
  • Post-Layout
Defining clocks after layout is relatively easy, since the user does not need to worry about the clock latency and skews. They are determined by the quality of the routed clock tree.
Some layout tools provide direct interface to DC. This provides a smooth mechanism for taking the routed netlist consisting of clock tree, back to DC. If this information is not present, then the user should extract the clock latency and the skew information from the layout tool. Using the pre-layout approach, this information can be used to define the clock latency and clock skew, as described before. If however, the netlist can be ported to DC, then the following commands may be used to define the clocks. For example:

dc_shell-t> create_clock -period 40 -waveform [list  0 20] CLK
dc_shell-t> set_propagated_clock CLK
dc_shell-t> set_clock_uncertainty -setup 0.25 -hold 0.05 CLK
dc_shell-t>set_dont_touch_network CLK
dc_shell-t> set_drive 0 CLK

Notice the absence of the set_clock_latency command and the inclusion of set_propagated_clock command. Since, we now have the clock tree inserted in the netlist, the user should propagate the clock instead of fixing it to a certain value. Similarly, the set_clock_transition command is no longer required, since DC will now calculate the input transition value of the clock network, based on the clock tree. In addition, a small clock uncertainty value may also be defined. This ensures a robust design that will function taking
into account a wider process variance.

Some companies do not possess their own layout tools, but they rely on outside vendors to perform the layout. This situation of course varies from one company to the other. If the vendor provides the user, the post-routed netlist containing the clock tree, then the above method can be utilized. In some instances, instead of providing the post-routed netlist, the vendor only supplies the SDF file containing point-to-point timing for the entire clock network (and the design). In such a case, the user only needs to define the clock for the original netlist and back-annotate the SDF to the original netlist without propagating the clock. The clock skews and delays will be determined from the SDF file, when performing static timing analysis.


在之前的用例基础上添加 `clocking` 块,`clocking` 块可以更好地控制信号的采样和驱动时序。以下是修改后的代码: ### 定义接口 ```systemverilog // 定义接口 interface counter_if (input logic clk); logic rst_n; logic en; logic [3:0] count; // 定义 clockingclocking cb @(posedge clk); output #1step rst_n, en; input #1step count; endclocking endinterface ``` 此接口中添加了 `clocking` 块 `cb`,在时钟上升沿触发。`#1step` 表示在时钟上升沿后一个时间步采样或驱动信号。输出 `rst_n` 和 `en` 信号,输入 `count` 信号。 ### 待测设计(DUT) ```systemverilog // 计数器模块,使用接口作为端口 module counter (counter_if intf); always @(posedge intf.clk or negedge intf.rst_n) begin if (!intf.rst_n) begin intf.count <= 4'b0000; end else if (intf.en) begin intf.count <= intf.count + 1; end end endmodule ``` DUT 部分与之前保持一致,使用 `counter_if` 接口作为端口,在时钟上升沿或复位信号下降沿触发逻辑。 ### 测试平台 ```systemverilog // 测试平台 module tb_counter; logic clk; // 实例化接口 counter_if intf(clk); // 实例化计数器模块 counter dut (intf); initial begin // 初始化信号 clk = 0; intf.cb.rst_n <= 0; intf.cb.en <= 0; // 复位一段时间 #10; intf.cb.rst_n <= 1; // 使能计数器 #10; intf.cb.en <= 1; // 运行一段时间 #100; // 结束仿真 $finish; end // 时钟生成 always #5 clk = ~clk; endmodule ``` 测试平台中,首先定义了时钟信号 `clk` 并传入接口。在初始块中,通过 `clocking` 块 `cb` 来驱动 `rst_n` 和 `en` 信号,保证了信号的时序准确性。同时,使用 `always` 块生成时钟信号。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值