IDDR/ODDR 1. IDDR IDDR的VHDL实例化如下:
iddr _ inst 3360 iddrgenericmap (DDR _ clk _ edge=' opposite _ edge ',-- 'OPPOSITE_EDGE ', ' same _ edge '-- (same _ edge ) ) ) ) ) ) )-initialvalueofq 1: '0' or '1' init _ Q2='0', - initialvalueofq 2: '0' or '1' Sr type=' sync ' )-- set/reset type : ' sync ' or ' async ' portmap (--1--) --1-- bitoutputfornegativeedgeofclockc=c,--1 -位时钟输入ce=ce,--1 -位时钟启用输入d=d,--1 -位时钟输入DDR_CLK_EDGE主要有三种模式: OPPOSITE_EDGE、SAME_EDGE和SAME_EDGE_PIPELINED。 这三种模式的时序图如下。
从上述时间序列关系可以看出,在OPPOSITE模式下,Q1和Q2不一致,两者的时间序列关系不同步; 在SAME_EDGE模式下,Q1和Q2定时一致,但并不同时出现,Q2上的数据延迟Q1的一个时钟周期; 在SAME_EDGE_PIPELINED模式下,Q1和Q2计时匹配,同时出现在数据端口上。 与前两种模式相比,SAME_EDGE_PIPELINED占用了更多的资源。
2. ODDR ODDR的VHDL实例化如下:
oddr _ inst : oddrgenericmap (DDR _ clk _ edge=' opposite _ edge ', --' opposite _ edge ' or ' same _ edge ' ining-initialvalueforqport ('1' or '0) ) SRTYPE='SYNC ' ) -重置类型() --sync ) ) sync ) ) portmap--1- bit时钟输入ce=ce,----1--bitclockenableinputD1=D1,---1--bitdatd DDR_CLK_EDGE主要有3358www.Sina.com/和OPPOSITE_EDGE两种模式,时序图如下:
根据上述时序关系,在SAME_EDGE模式下,D1和D2不一致,两者时序关系不同步,时钟分别在上升沿和下降沿采样D1和D2; 在OPPOSITE模式下,根据D1和D2的定时,在时钟的上升沿同时对D1和D2进行采样。 采用该模式可以获得更好的性能。