首页 技术 正文
技术 2022年11月11日
0 收藏 713 点赞 5,043 浏览 3158 个字

  之前去地平线面试的时候被问到了multicycle path的一点问题,其实这个问题我应该知道,看过《Constraining Designs for Synthesis and Timing  Analysis A Practical Guide to Synopsys Design Constraints (SDC)》,但当时回答的不好。

  看这篇文章需要现对建立时间、保持时间的概念有一些了解。

0. 多周期路径

  一般情况下数据在任意时钟沿发射,在下一个时钟沿被捕获,但是有时设计者需要延迟几个时钟周期data才被捕获,这就是多周期路径。

默认的建立时间时序:

STA——multicycle path

多周期的建立时间时序:

STA——multicycle path

1. 发射时钟和捕获时钟相同

STA——multicycle path

STA——multicycle path

对于上面的时钟,默认是在A沿发射,B沿捕获。在进行建立时间分析时,我们希望在A沿发射数据,在D沿捕获数据,我们可以通过-setup选项,指定多周期路径为3个周期

set_multicycle_path -setup 3 -from xxx -to xxx

setup time analysis变成了:Tc-q +Tlogic +Tsetup < 3*T+skew。约束变宽松了。

但是这样的话,在进行hold time分析的时候,工具会对捕获寄存器捕获沿之前的那一个时钟沿,也就是C沿进行hold analysis。这样的话hold time analysis变成了

Tc-q + Tlogic > Thold + 2*T,但这增加了电路的复杂性(需要插入一些buffer来增加延迟),没有必要,通过-hold选项,将hold edge向左移动2个周期

set_multicycle_path -hold 2 -from *** -to ***

  注意:-setup制定多周期路径为N个周期,-hold使hold edge向左移动N-1个周期

2. 发射时钟和捕获时钟不同

STA——multicycle path

2.1 捕获时钟周期倍长于发射时钟周期

STA——multicycle path

上面例子中发射时钟周期为10ns,捕获时钟周期为20ns。

  默认情况下,setup analysis在B沿发射,N沿捕获,组合逻辑路径最大为10ns。对于hold analysis与保持时钟沿没关系,在hold analysis中,可以在A时钟沿发射,M时钟沿捕获,或者在C时钟沿发射,N时钟沿捕获。

  因为捕获时钟周期大于采样时钟周期,所以在一个捕获周期中,只能发射一个data。对于在N时钟沿捕获的情况,可以在A或者B时钟沿发射数据。在A发射可以增加额外的10ns的延迟余量。通过-start选项可以声明两个源时钟周期的路径,这使得发射沿从B移动到A。当然要指明是-setup。

set_multicycle_path -setup -start 2 -from xxx -to xxx

  

  对于hold check有两种情况:
    1. A发射M捕获。

    2.B发射N捕获。

  对于上面两种hold check情况,第二种约束更强,组合逻辑需要增加额外的10ns。我们希望hold check恢复到默认的位置,A发射M捕获(或者B发射N捕获),希望lauch edge从B移动到C,通过-start 和- hold选项。

set_multicycle_path -hold -start 1 -from xxx -to xxx

 -hold指定移动的周期数。 

2.2 发射时钟周期倍长于捕获时钟周期

STA——multicycle path

发射时钟周期为20ns,捕获时钟周期为10ns。

默认的setup check是M发射B捕获;hold check是 M发射A捕获。

M发射,希望在C捕获,这样可以增加额外的10ns的延迟裕量。这可以通过-end选项来指定2个目的时钟周期的路径。

set_multicycle_path -setup -end 2 -from xxx -to xxx

  -setup指定路径的周期数,为N

但这会使得hold check变成M发射B捕获,希望它恢复到默认情况,用-end选项指明捕获沿向左移动一个目的时钟周期。

set_multicycle_path -hold -end 1 -from xxx -to xxx

  -hold指定移动的周期数,为N-1

2.3 总结

-start:移动源时钟(发射时钟)沿;

-end :移动目的时钟(捕获时钟)沿;

-setup -start N:向左移动发射时钟沿;

-hold -start N-1:向右移动发射时钟沿;

-setup -end N:向右移动捕获时钟沿;

-hold -end N-1:向左移动捕获时钟沿;

3. examples

3.1 FSM

STA——multicycle path

如上图所示,enable逻辑通过一个N个周期的状态机。那么对于从F1发出的actual data,可以在N个周期内到达F3的输入,所以约束如下:

set_multicycle_path -setup N -end -from Cs -through F1/Q -to Cd 
set_multicycle_path -hold N-1 -end -from Cs -through F1/Q -to Cd

  

3.2  reset

 In many ASIC designs, the master reset signal remains asserted for several cycles.So, the assertion of these signals can be declared as multi cycle paths. Assuming anactive low asynchronous reset kept asserted for 3 cycles, the command would be:

set_multicycle_path -fall -from reset_n -setup 3
set_multicycle_path -fall -from reset_n -hold 2

3.3 Large data path macros

 Some data paths have huge adders, multipliers, or other data path elements . Or, theymight have deep levels of logic. Or, they might have a high setup requirement for the capturing device (say, a memory ), or the launching device might have a highClk-to-output delay (e.g., a memory). Or, the path might be on a clock which hasvery high frequency. In many such cases, it might be diffifi cult for the data to meetthe timing requirements of a single cycle . In such cases, the path might have to bedeclared as multi cycle.  

3.4 异步时钟

STA——multicycle path

在跨时钟路径中,一般会生命为fault path,这样STA工具不会对这条路径进行时序分析,那么路径可以有任意大小的delay,但是设计者可能想要约束这一段路径的延迟,如下

set_multicycle_path -from [get_clocks C1] -to [get_clocks C2] -setup 2
set_multicycle_path -from [get_clocks C1] -to [get_clocks C2] -hold 1

  原来是在A发射P捕获,但将路径设置为两个捕获周期之后,在A发射Q捕获,组合逻辑延迟扩展了一个捕获周期。这样就将组异步路径合逻辑延迟约束在一个捕获周期多一点。

  

参考:

 《 Constraining Designs for Synthesis and Timing  Analysis A Practical Guide to Synopsys Design Constraints (SDC) 》《 专用集成电路设计使用教程 》

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,492
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,495
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,132
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,297