《Fma定义及推导》由会员分享,可在线阅读,更多相关《Fma定义及推导(3页珍藏版)》请在金锄头文库上搜索。
1、时序分析之fmax定义及推导 2011-11-19 01:20时钟是一个电路的心脏和节拍器,学习时序分析当然要从时钟周期(时钟频率) 开始了,时序约束主要是为了满足器件稳定工作在我们需要的工作频率! ! 以前对频率的理解很简单,认为晶振输入多少就是多少工作频率,可是现在 才认识到FPGA器件在设计出功能后,因为器件内部的各种延迟,数据的采集、 建立和传输都有时间延迟,如果时钟周期小于这个延迟,则芯片内部的数据在当 前时钟还没有正常的采集、建立和传输,下一个时钟就已经来到,造成工作错乱 这就是电路能承受的最高工作频率,如果要求工作在100MHz,但是电路 只能跑到80MHz,如果硬是上到100M
2、Hz的输入频率,那么这个芯片由于不 满足时序将不能正常工作,下面是Quartus II官方的fmax定义:The maximum clock freque ncy that can be achieved without violat ing in ter nal setup (tgu) and hold ) time requireme nts. Unr estricted is the maximum frequency at which a design can run. Restricted is the maximum freque ncy a desig n can run con
3、 sideri ng device limits, such asmaximum toggle rates. The Classic Timing An alyzer an alyzes and reportsfollowing timing analysis.You can specify the required by default for a design inthe Classic Timing Analysis Settings page of the Settings dialog box.You can also specify the required of in divid
4、ual clock sig nals in a desig n by creati ng clock setti ngs and assig ning them to sig nals in the desig n.The Classic Tim ing An alyzer calculates fwith the follow ing equati on:fMAX简化公式就是:fmax=1/(data delay+Tsu+Tco -clock skew) Clock skew delay is calculated with the following equation:简化公式就是:clo
5、ck skew=Tc2d-Tc2sF面看看这个fmax是怎么计算出来的,Quartus II标准周期定义按下图计算:=1/( + + )0 Clk-to-out :时钟沿到输出延迟(Teo); 0 Data Delay:数据传输延迟(B); 0 Setup Time:数据建立时间(Tsu); 0 Clk Skew :偏移时间(E-C)。假设数据已经被时钟的上升沿打入DFF,数据到DFF1的Q端需要Tco时 间,再经过组合逻辑的延时data delay到达DFF2的D端,要想在CLK的第 二个上升沿到来前DFF2的D端数据再次稳定打入DFF2,其数据还要保持Tsu 时间,因此看上面的时序图,整个时钟周期(高-低的一个时钟周期)就是DFF2 的第一个时钟上升沿到第二个时钟上升沿间隔的时间。显而易见 Tclk = Tco + data delay + Tsu - clk skeW,而 fmax=1/Tclk。和布线延迟Troute,只要把而如果使用的是全局时钟,clk skew很小可以忽略;针对某一个器件,其Tco和Tsu的时间也是固定的,影响到设计的时钟频率就只有data delay这一因素了一一data delay又包括组合逻辑延迟Tlogic控制在一定范围内,就能够达到想要的fmax。