sdc中跨时钟域(CDC)路径的约束方式

最近在看S家某IP关于CDC处理的SDC约束中,看到了一些有用的知识点和SDC约束,这里做一下总结。

1.通常的认识中,我们期望综合工具不要去检查和优化异步时钟之间的时序路径,所以只在sdc中将其设置为async,例如,当clk_a和clk_b为异步时钟时,可以把进行如下设置:
set_clock_groups -asynchronous -group clk_a -group clk_b

但在实际的项目中,还需要对异步时钟路径加一些特殊约束。其中set_max_delay和set_min_delay是比较常用的做法,set_max_delay会用于目的寄存器(destination flop)的setup check,set_min_delay会用于目的寄存器(destination flop)的hold check。set_max/min_delay需要加上-ignore_clock_latency开关,保证在计算异步时钟路径的delay时,不考虑clock tree latency(只会在CTS之后存在)

2.为了使set_max/min_delay生效,需要注意以下两点:
1)设置set_max/min_delay的路径,不能加set_false_path,因为此设置的优先级更高
2)异步时钟之间不能像前面给的例子中,只设置async,而应该加入-allow_paths,完整命令如下:
set_clock_groups -asynchronous -allow_paths -group clk_a -group clk_b

以下是Synopsys Synthesis Commands中关于该选项的解释

-allow_paths
Enable the timing analysis between specified clock groups. If this option is not specified, the timing analysis among the defined clock groups are disabled. This option can be used with asynchronous clock groups only.

3.当异步时钟域之间传递格雷码数据,且目的时钟域用两级同步器(寄存器)采样数据时,应该set_max_delay为一个源时钟周期,set_min_delay为0。这样有两个好处:1.防止数据路径太长而导致较长的同步所需时间,引起电路性能下降 2.限制格雷码的多个bit之间的skew,防止多个bit在目的时钟域的寄存器输入端同时变化,使得传递的数据不再是格雷码

4.当异步时钟域之间传递Qualifier-based Data Bus Signal时,应该set_max_delay为(同步级数-0.5)*目的时钟周期,set_min_delay为0。这样可以保证目的时钟域只会采样到稳定的数据。

5.除3.4.中提到的两种数据外,其他的CDC路径应set_max_delay为一个目的时钟周期,set_min_delay为0。相关文档中解释此举的目的是(目前不太理解)

maintain the assumptions for a safe CDC implementation

6.某些准静态数据,例如上电后进行配置且之后不会变化的寄存器,可以认为是纯异步路径,可以set_false_path

7.异步FIFO中,可能会使用一些standard cell以保证关联路径的时序,我们不希望这些cell被综合工具进行逻辑优化,因而需要在sdc中加入set_size_only约束,以下是Synopsys Synthesis Commands中关于该命令的解释

When the set_size_only command is issued with the true value on a cell, optimization of that part is treated specially. In general, this command directs synthesis to perform only a sizing operation on a cell. The set_size_only command can be used only on leaf cell instances.

  • 8
    点赞
  • 60
    收藏
    觉得还不错? 一键收藏
  • 10
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值