静态时序分析(STA)_跨时钟域时序_多时钟

一跨时钟域时序

1.慢时钟域到快时钟域

需要注意的是,作用在D触发器时钟引脚的两个时钟,都是由CLKP时钟继承而来的,即时钟同源。这种情况可以进行约束。

但是如果两个时钟域完全没有任何关系,即时钟不同源,那么就应该设置伪路径,不让STA进行分析。

#时钟定义:
create_clock -name CLKM \
-period 20 -waveform {0 10} [get_ports CLKM]
create_clock -name CLKP \
-period 5 -waveform {0 2.5} [get_ports CLKP]

  

我们可以看到,每四个捕获时钟周期就可以获得一次发射数据。我们如果目的不是捕获CLKP的下一个活动边缘上的数据,而是捕获每4个捕获边缘上的数据。这个假设给出了触发器之间的组合逻辑,四个周期的CLKP传播,这是20ns。 使用多周期约束

set_multicycle_path 4 -setup -from [get_clocks CLKM] -to [get_clocks CLKP] -end
 
set_multicycle_path 3 -hold -from [get_clocks CLKM] -to [get_clocks CLKP] -end

时序图 

图8-24只约束了setup,没有约束hold,此时的时序报告分析出建立时间检查正确,保持时间检查错误。

图8-25又加上了约束hold,此时的时序报告都正确。

慢时钟域到快时钟域 -setup -end 指的是目的时钟,移位(右移)的是capture edge.

时序报告 

 

2.快时钟域到慢时钟域 

存在4个可能的建立时间。最严格的时序检查是 setup4、0时刻hold(它确保在0ns的捕获边缘不会捕获在0ns启动的数据。) 

create_clock -name CLKM -period 20 -waveform {0 10} [get_ports CLKM]
create_clock -name CLKP -period 5 -waveform {0 2.5} [get_ports CLKP]

 

 

通常可以将从快时钟到慢时钟的数据路径指定为多周期路径。如果建立检查放宽松,为数据路径提供两个更快的时钟周期,则此多周期规范包括以下内容: 

set_multicycle_path 2 -setup -from [get_clocks CLKP] -to [get_clocks CLKM] -start
set_multicycle_path 1 -hold -from [get_clocks CLKP] -to [get_clocks CLKM] -start
# The -start option refers to the launch clock and is
# the default for a multicycle hold.

-start选项指定周期数的单位(在本例中为2)是启动时钟的单位(指的是时钟相对快的那个)(在本例中为CLKP)。设置多周期2将启动边缘移动到默认启动边缘之前的一条边

​​​​​​​快时钟到慢时钟 -setup -start 是针对于源时钟而言,移位(左移)的是launch edge

 时序报告:

setup check相对宽松一点

二 多时钟

 1.整数倍关系

create_clock -name CLKM -period 20 -waveform {0 10} [get_ports CLKM]
create_clock -name CLKQ -period 10 -waveform {0 5}
create_clock -name CLKP -period 5 -waveform {0 2.5} [get_ports CLKP]

 

2.非整数倍关系 

时钟定义: 

create_clock -name CLKM -period 8 -waveform {0 4} [get_ports CLKM]
create_clock -name CLKQ -period 10 -waveform {0 5}
create_clock -name CLKP -period 5 -waveform {0 2.5} [get_ports CLKP]

 

The most restrictive hold path is from a launch at 0ns of CLKM to the capture edge of 0ns of CLKP.
 the most restrictive setup path is from a launch edge at 15ns of clock CLKP to the capture edge at 16ns of clock CLKM.

建立时间检查 

 保持时间

3.相移 

相移90°例子

create_clock -period 2.0 -waveform {0 1.0} [get_ports CKM]
create_clock -period 2.0 -waveform {0.5 1.5} [get_ports CKM90]

 CKM90的第一个捕获上升沿在0.5ns. 
The hold check是在setup capture edge之前的一个周期。

the launch edge at 2ns,the setup capture edge is at 2.5ns. Thus the hold check is at the previous capture edge which is at 0.5ns.

 建立时间检查:

保持时间检查 

  • 11
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值