再学习204B协议的过程中,我遇到了很多与时钟相关的概念,弄得一头雾水。通过这一段时间的学习,我把遇到的时钟总结一下,并与大家分享,如果有不正确的地方,欢迎指正。如果,您觉得本博客对您有帮助的话,欢迎点赞并专注。
JESD204内核中使用时钟
Device Clock – JESD204B规范定义了分配给系统中的每个设备的Device Clock。不同器件(如DAC/ADC转换器和FPGA)的Device Clock可以以不同的速率运行,以适应各个器件,但频率必须相关,并且由公共源产生。
Byte Clock – 每个器件中的帧(Frame)和多帧周期(multiframe periods)派生自Device Clock。发送和接收设备的帧/多帧周期必须匹配。从帧周期可以直接推断出八位字节(字节)时钟速率(每帧F八位字节)。
Serial Line Rate – 所有通道的串行线路速率都很常见,是每个通道上字节时钟速率的 10 倍。
Core Clock – JESD204 IP CORE使用 32 位(4 字节)数据路径运行。因此,IP CORE的Device Clock是Byte Clock的四分之一(Device Clock是Serial Line Rate的1/40)运行。
Reference Clock – GTP/GTX/GTH/GTY 串行收发器需要一个稳定的低抖动参考时钟,该时钟具有器件和速度等级相关范围。在某些情况下,同源时钟可以同时提供参考时钟和内核时钟。
例子
时钟概念时序图
下图所示的时序图,涉及到了上文所述的Serial Line Rate 、Byte Clock和Core Clock;假设Serial Line Rate为8Gbps;byte clock为Serial Line Rate的10分之1,即800Mhz; core clock为Serial Line Rate的40分之1,即200Mhz; core clock为Byte Clock的4分之1,即200Mhz。
Xilinx 204B IP CORE时钟方案
例子1:
假设如下图3.1所示的204B应用场景,204B的线速率由系统参数规定为8.000gbps,那么core clock必须是200Mhz,此时我们可以为JESD204_PHY选择200Mhz的参考钟,减少了一个时钟的输入;但是,我们也可以为JESD204_PHY选择一个更灵活的时钟频率,例如400Mhz;这样就能保证系统的时钟灵活性。
Figure 3-1 shows the most generic and flexible clocking scheme, where separate refclk and glblclk inputs are used to provide the transceiver reference clock and the core clock, respectively. With this configuration, the reference clock and core clock are physically separate clocks and can be run at independent frequencies, without additional constraints.
The reference clock can be run at any frequency within the limitations of the transceiver for the selected line rate. The core clock always runs at the required rate (1/40th of the serial line rate).
例子2:
假设如下图3.2所示的204B应用场景,204B的线速率由系统参数规定为6.144gbps,那么core clock必须是153.6Mhz,此时我们选择JESD204_PHY参考钟也为153.6Mhz,就会减少一个输入时钟;
总结:
- 当FPGA有1个参考时钟的时候,可以把refclk看作device clock;
- 当FPGA有2个参考时钟的时候,可以把glblclk看作device clock;把refclk看作GTX/GTE的参考时钟。
- The device clock for the FPGA is the FPGA logic clock (tx_core_clk or rx_core_clk).