对于XILINX,7系列FPGA,关于GTX核对配置见PG168,了解GTX内部结构及更多的知识见ug476。

以7系列XC7k325t-ffg900为例,见各ug476,351页。可看到该芯片共有4个高速bank,分别为115 116 117 118;每个bank又有4组收发模块和两组时钟模块。

1,GTX时钟和复位

(1)时钟源:

GTX输入参考时钟通过2组时钟模块的任意一组输入.后通过 IBUFDS_GTE2源于得到参考时钟输入给GT模块.。此处有两种PLL由Xilinx提供给用户使用。一种为CPLL,一种为QPLL,其中主要区别为CPLL一个bank中共有4个,一个收发模块一个;而QPLL只有两个,一个时钟模块对应一个。从GTX速率而言,CPLL主要用低于6.25G速率的收发设计;而QPLL主要支持高于6.25G低于10.3025G速率的收发器设计。

(2)发送端初始化复位:

在时钟CPLL或QPLL时钟locked拉高(表示时钟稳定,可以正常工作)。通过GTTXRESET复位GT发送器,发送器收到复位信号从底层PMA到PCS依次复位。在PMA层,待TXPMAREAET从高变成低通过PMA层,待TXUSERRDY为高,到达PCS层;在PCS层,待TXPCSREAET从高变成低通过PCS层,则TXREAETDONE拉高,发送器复位完成。之后发送复位状态机完成复位,输出发送状态机复位完成信号。复位关系和时序如图所示:

(3)接收端初始化复位:

在时钟CPLL或QPLL时钟locked拉高(表示时钟稳定,可以正常工作)。通过GTRXRESET复位GT接收器,接收器收到复位信号从底层PMA到到DFE,LPM到EYESCAN到PCS到BUF依次复位。在PMA层,待RXPMAREAET从高变成低通过PMA层,RXPMARESETDONE拉高;到达DFELPM层,待RXDFELPMRESET从高变成低通过DFE LPM层,RXDFE LPMRESETDONE拉高;到达EYECAN层,待RXEYECANRESET从高变成低通过EYECAN层,RXEYECANRESETDONE拉高;待RXUSERRDY为高;到达PCS层;在PCS层,待RXPCSREAET从高变成低通过PCS层,则RXPCSREAETDONE拉高;到达BUF层,待RXBUFRESET从高变成低通过BUF层,RXBUFRESETDONE拉高;最后RXRESETDONE拉高;接收器复位完成。之后接收复位状态机完成复位,输出接收状态机复位完成信号。复位关系和时序如图所示:

2,GTX发送器

FPGA内部每一个收发器都有一个独立的发送端,发送端由PMA,PCS组成;由图可以看出PMA层包括并串转换,预加重,均衡,时钟发生器等;PCS层包括 8B/10B编码,数据缓冲区等。具体如图所示:

interface用户接口:使能8B/10B,数据位宽可以为:16,32,64;不使能8B/10B,数据位宽可以为:16,20,32,40,64,80;时钟=线速率/(8B/10B编码后的数据位宽);

8B/10B编码:保证时钟恢复,提供数据对齐,保持良好的直流平衡;

tx buffer :主要用户消除两个时钟直接的相位差;也可以不用;

tx pattern generator : 通过伪随机数来扩频;

tx polarity control : 如果P N接反,则通过配置该为矫正;

3,GTX接收器

接收器和发送器的数据流相反,接收器需要恢复时钟,补偿数据,恢复数据,串并转换,再8B/10B解码;最后输出数据给用户接口;如图:

DFE和LPM : 数据到达接收器后,先经过RX均衡器,均衡器主要用于补偿信号在信道传输过程中的高频损失;DFE和LPM是接收器中的两种均衡器,LPM功耗较低,DFE能提供更精准的滤波参数。

RX,CDR : 时钟恢复电路, 接收端需要恢复时钟和数据,主要通过这个模块实现时钟,数据恢复。

其余模块都与发送端类似。

4,IP配置(以XC7K325T-FFG900为例)

(1) IP配置有两种方式选择。 有两种方式: 一种完成集成与IP核,只需要列化一个模块就能可以,但是这种种方式不太灵活,如果多通道并用,可能不好处理,还有一种核心模块为IP,其余使用例程,参考例程设计。具体选择可根据具体需求来实现:(我的设计中采用了只使用核心IP,其余参考例程设计)

(2)主要配置页

protocol : 协议选择,GTX是高速串行收发器,在他的基础上可以很多的协议如SDI ,10Gbase,aurora,hdmi,sata等;

line rate  :线速率配置,当前芯片最大支持10.3125G;

reference clock : 参考时钟,由外部输入,根据线速率选择合适的参考时钟输入;

pll selection :PLL选择;

transceiver selection:收发器选择,一个bank有4个收发器,根据项目需求,原理设计选择。

(3)8B/10B使能,BUF配置,por选择

8B/10B : 根据设计选择8B/10B是否使能,配置数据位宽为16,32,64;

drpclk/sysclk : 系统时钟输入,复位信号等由该时钟产生;可输入0-175m时钟;

synchronization and clocking : 配置接收时钟,配置时钟源,是否使用buf;

optional port : 可以根据需求引出相关端口,以帮助IP核配置,控制使用。

(4)K码,均衡配置

rx comma detection : 接收端对齐数据选择,可配置为2byte, 4byte 等。具体根据数据位宽决定;

termination and equalization : 均衡器配置,可配合ibert核使用,得到最合理的参数然后配置给IP核。

(5) 后面暂时不用管,直接下一步到最后完成配置。

5, 附上一个简单GT口配置逻辑,以便今后回顾。


//   ____  ____
//  /   /\/   /
// /___/  \  /    Vendor: Xilinx
// \   \   \/     Version : 3.6
//  \   \         Application : 7 Series FPGAs Transceivers Wizard
//  /   /         Filename : gtwizard_0_support.v
// /___/   /\
// \   \  /  \
//  \___\/\___\
//
//
// Module gtwizard_0_support
// Generated by Xilinx 7 Series FPGAs Transceivers Wizard
//
//
// (c) Copyright 2010-2012 Xilinx, Inc. All rights reserved.
//
// This file contains confidential and proprietary information
// of Xilinx, Inc. and is protected under U.S. and
// international copyright and other intellectual property
// laws.
//
// DISCLAIMER
// This disclaimer is not a license and does not grant any
// rights to the materials distributed herewith. Except as
// otherwise provided in a valid license issued to you by
// Xilinx, and to the maximum extent permitted by applicable
// law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
// WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
// AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
// BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
// INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
// (2) Xilinx shall not be liable (whether in contract or tort,
// including negligence, or under any other theory of
// liability) for any loss or damage of any kind or nature
// related to, arising under or in connection with these
// materials, including for any direct, or any indirect,
// special, incidental, or consequential loss or damage
// (including loss of data, profits, goodwill, or any type of
// loss or damage suffered as a result of any action brought
// by a third party) even if such damage or loss was
// reasonably foreseeable or Xilinx had been advised of the
// possibility of the same.
//
// CRITICAL APPLICATIONS
// Xilinx products are not designed or intended to be fail-
// safe, or for use in any application requiring fail-safe
// performance, such as life-support or safety devices or
// systems, Class III medical devices, nuclear facilities,
// applications related to the deployment of airbags, or any
// other applications that could lead to death, personal
// injury, or severe property or environmental damage
// (individually and collectively, "Critical
// Applications"). Customer assumes the sole risk and
// liability of any use of Xilinx products in Critical
// Applications, subject only to applicable laws and
// regulations governing limitations on product liability.
//
// THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
// PART OF THIS FILE AT ALL TIMES. `timescale 1ns / 1ps
module gt_wrap (input          sysclk_in,input          sysreset_in,input          clk1_gtrefclk_n,input          clk1_gtrefclk_p,    input   [1:0]  gtxrxp_in,input   [1:0]  gtxrxn_in,output  [1:0]  gtxtxn_out,output  [1:0]  gtxtxp_out,output         qpll_locked,output  [1:0]  rx_resetdone,output  [1:0]  tx_resetdone,output  [1:0]  tx_fsm_reset_done,output  [1:0]  rx_fsm_reset_done,output         tx_clk,output         rx_clk,output  [7:0]  rx_charisk,output  [63:0] rx_data,input   [7:0]  tx_charisk, input   [63:0] tx_data, input          ctrl_loppback,output  [7:0]  rx_disperr,output  [7:0]  rx_notintable,output  [5:0]  rx_bufstatus
);genvar          i                   ;//qpllwire commonreset_i;wire  gt0_qplllock_i;wire  gt0_qpllrefclklost_i  ;wire [1:0] gt0_qpllreset_i  ;wire  gt0_qpllreset_t  ;wire  gt0_qplloutclk_i  ;wire  gt0_qplloutrefclk_i ;//Reference Clockswire            q0_clk1_refclk_i;//User Clocks wire   [1:0]    gt0_rxoutclk_i;wire   [1:0]    gt0_txoutclk_i;wire            gt0_txusrclk_i; wire            gt0_rxusrclk_i;  wire            gt0_txusrclk2_i; wire            gt0_rxusrclk2_i;  //**************************** Main Body of Code *******************************assign qpll_locked  = gt0_qplllock_i;assign  tx_clk = gt0_txusrclk2_i; assign  rx_clk = gt0_rxusrclk2_i;gtwizard_0_GT_USRCLK_SOURCE gtwizard_0_GT_USRCLK_SOURCE (.GT0_TXUSRCLK_OUT    (gt0_txusrclk_i),.GT0_TXUSRCLK2_OUT   (gt0_txusrclk2_i ),.GT0_TXOUTCLK_IN     (gt0_txoutclk_i[0]),.GT0_RXUSRCLK_OUT    (gt0_rxusrclk_i),.GT0_RXUSRCLK2_OUT   (gt0_rxusrclk2_i ),.GT0_RXOUTCLK_IN     (gt0_rxoutclk_i[0]),.Q0_CLK1_GTREFCLK_PAD_N_IN  (clk1_gtrefclk_n),.Q0_CLK1_GTREFCLK_PAD_P_IN  (clk1_gtrefclk_p),.Q0_CLK1_GTREFCLK_OUT       (q0_clk1_refclk_i));gtwizard_0_common #(.WRAPPER_SIM_GTRESET_SPEEDUP("TRUE"),.SIM_QPLLREFCLK_SEL(3'b010))gtwizard_0_common (.QPLLREFCLKSEL_IN(3'b010),.GTREFCLK0_IN(1'b0),.GTREFCLK1_IN(q0_clk1_refclk_i),.QPLLLOCK_OUT(gt0_qplllock_i),.QPLLLOCKDETCLK_IN(sysclk_in),.QPLLOUTCLK_OUT(gt0_qplloutclk_i),.QPLLOUTREFCLK_OUT(gt0_qplloutrefclk_i),.QPLLREFCLKLOST_OUT(gt0_qpllrefclklost_i),    .QPLLRESET_IN(gt0_qpllreset_t));assign gt0_qpllreset_t = commonreset_i | &gt0_qpllreset_i;gtwizard_0_common_reset #(.STABLE_CLOCK_PERIOD (8)        // Period of the stable clock driving this state-machine, unit is [ns])gtwizard_0_common_reset (    .STABLE_CLOCK(sysclk_in),             //Stable Clock, either a stable clock from the PCB.SOFT_RESET(sysreset_in),               //User Reset, can be pulled any time.COMMON_RESET(commonreset_i)              //Reset QPLL);
generatefor (i=0;i<2;i=i+1)begin : gt_gengtwizard_0 gtwizard_0_init_i (.sysclk_in                      (sysclk_in),.soft_reset_tx_in               (sysreset_in),.soft_reset_rx_in               (sysreset_in),.dont_reset_on_data_error_in    (1'b0),.gt0_tx_fsm_reset_done_out      (tx_fsm_reset_done[i]),.gt0_rx_fsm_reset_done_out      (rx_fsm_reset_done[i]),.gt0_data_valid_in              (1'b1),//_____________________________________________________________________//_____________________________________________________________________//GT0  (X1Y0)//-------------------------- Channel - DRP Ports  --------------------------.gt0_drpaddr_in                 (9'd0), // input wire [8:0] gt0_drpaddr_in.gt0_drpclk_in                  (sysclk_in), // input wire sysclk_in_i.gt0_drpdi_in                   (16'd0), // input wire [15:0] gt0_drpdi_in.gt0_drpdo_out                  ( ), // output wire [15:0] gt0_drpdo_out.gt0_drpen_in                   (1'b0), // input wire gt0_drpen_in.gt0_drprdy_out                 ( ), // output wire gt0_drprdy_out.gt0_drpwe_in                   (1'b0), // input wire gt0_drpwe_in//------------------------- Digital Monitor Ports --------------------------.gt0_dmonitorout_out            ( ), // output wire [7:0] gt0_dmonitorout_out//----------------------------- Loopback Ports -----------------------------.gt0_loopback_in                ({2'd0,ctrl_loppback }), // input wire [2:0] gt0_loopback_in//------------------- RX Initialization and Reset Ports --------------------.gt0_eyescanreset_in            (1'b0), // input wire gt0_eyescanreset_in.gt0_rxuserrdy_in               (1'b0), // input wire gt0_rxuserrdy_in//------------------------ RX Margin Analysis Ports ------------------------.gt0_eyescandataerror_out       ( ), // output wire gt0_eyescandataerror_out.gt0_eyescantrigger_in          (1'b0), // input wire gt0_eyescantrigger_in//---------------- Receive Ports - FPGA RX Interface Ports -----------------.gt0_rxusrclk_in                (gt0_rxusrclk_i), // input wire gt0_rxusrclk_i.gt0_rxusrclk2_in               (gt0_rxusrclk_i), // input wire gt0_rxusrclk2_i//---------------- Receive Ports - FPGA RX interface Ports -----------------.gt0_rxdata_out                 (rx_data[32*i+:32]), // output wire [31:0] gt0_rxdata_out//---------------- Receive Ports - RX 8B/10B Decoder Ports -----------------.gt0_rxdisperr_out              (rx_disperr[4*i+:4]), // output wire [3:0] gt0_rxdisperr_out.gt0_rxnotintable_out           (rx_notintable[4*i+:4]), // output wire [3:0] gt0_rxnotintable_out//------------------------- Receive Ports - RX AFE -------------------------.gt0_gtxrxp_in                  (gtxrxp_in[i]), // input wire gt0_gtxrxp_in//---------------------- Receive Ports - RX AFE Ports ----------------------.gt0_gtxrxn_in                  (gtxrxn_in[i]), // input wire gt0_gtxrxn_in//----------------- Receive Ports - RX Buffer Bypass Ports -----------------.gt0_rxbufstatus_out            (rx_bufstatus[3*i+:3]), // output wire [2:0] gt0_rxbufstatus_out//------------------- Receive Ports - RX Equalizer Ports -------------------.gt0_rxdfelpmreset_in           (1'b0), // input wire gt0_rxdfelpmreset_in.gt0_rxmonitorout_out           ( ), // output wire [6:0] gt0_rxmonitorout_out.gt0_rxmonitorsel_in            (1'b0), // input wire [1:0] gt0_rxmonitorsel_in//------------- Receive Ports - RX Fabric Output Control Ports -------------.gt0_rxoutclk_out               (gt0_rxoutclk_i[i]), // output wire gt0_rxoutclk_i.gt0_rxoutclkfabric_out         ( ), // output wire gt0_rxoutclkfabric_out//----------- Receive Ports - RX Initialization and Reset Ports ------------.gt0_gtrxreset_in               (1'b0), // input wire gt0_gtrxreset_in.gt0_rxpmareset_in              (1'b0), // input wire gt0_rxpmareset_in//----------------- Receive Ports - RX8B/10B Decoder Ports -----------------.gt0_rxcharisk_out              (rx_charisk[4*i+:4]), // output wire [3:0] gt0_rxcharisk_out//------------ Receive Ports -RX Initialization and Reset Ports ------------.gt0_rxresetdone_out            (rx_resetdone[i]), // output wire gt0_rxresetdone_out//------------------- TX Initialization and Reset Ports --------------------.gt0_gttxreset_in               (1'b0), // input wire gt0_gttxreset_in.gt0_txuserrdy_in               (1'b0), // input wire gt0_txuserrdy_in//---------------- Transmit Ports - FPGA TX Interface Ports ----------------.gt0_txusrclk_in                (gt0_txusrclk_i), // input wire gt0_txusrclk_i.gt0_txusrclk2_in               (gt0_txusrclk_i), // input wire gt0_txusrclk2_i//---------------- Transmit Ports - TX Data Path interface -----------------.gt0_txdata_in                  (tx_data[32*i+:32]), // input wire [31:0] gt0_txdata_in//-------------- Transmit Ports - TX Driver and OOB signaling --------------.gt0_gtxtxn_out                 (gtxtxn_out[i]), // output wire gt0_gtxtxn_out.gt0_gtxtxp_out                 (gtxtxp_out[i]), // output wire gt0_gtxtxp_out//--------- Transmit Ports - TX Fabric Clock Output Control Ports ----------.gt0_txoutclk_out               (gt0_txoutclk_i[i]), // output wire gt0_txoutclk_i.gt0_txoutclkfabric_out         ( ), // output wire gt0_txoutclkfabric_out.gt0_txoutclkpcs_out            ( ), // output wire gt0_txoutclkpcs_out//------------------- Transmit Ports - TX Gearbox Ports --------------------.gt0_txcharisk_in               (tx_charisk[4*i+:4]), // input wire [3:0] gt0_txcharisk_in//----------- Transmit Ports - TX Initialization and Reset Ports -----------.gt0_txresetdone_out            (tx_resetdone[i]), // output wire gt0_txresetdone_out.gt0_qplllock_in(gt0_qplllock_i),.gt0_qpllrefclklost_in(gt0_qpllrefclklost_i),.gt0_qpllreset_out(gt0_qpllreset_i[i]),.gt0_qplloutclk_in(gt0_qplloutclk_i),.gt0_qplloutrefclk_in(gt0_qplloutrefclk_i));end
endgenerateendmodule

相关问题记录:

1,GTX时钟专用buf原语   :

IBUFDS_GTE2  IBUFDS_GTE2_inst (
        .O(gtx_clk_out),
        .ODIV2(), 
        .I(gtx_clk_in_p),
        .CEB(1'b0), 
        .IB(gtx_clk_in_n)
     );

2 ,光口接收时钟源配置一般有两种,使用RXOUTCLK,也可用RXOUTCLK;如果速率较高建议选择RXOUTCLK,保证数据和时钟同步,能更有效的保证数据采集。

3,data_valid_in端口外部配置1,改信号主要影响接收复位状态机。

4, gtx数据接口为isk和dat;isk和dat按字节对应。

六,基于FPGA的高速串行通信GTX知识梳理相关推荐

  1. FPGA学习-基于FPGA的高速串行通信GTX知识梳理

    对于XILINX,7系列FPGA,关于GTX核对配置见PG168,了解GTX内部结构及更多的知识见ug476. 以7系列XC7k325t-ffg900为例,见各ug476,351页.可看到该芯片共有4 ...

  2. 基于XILINX FPGA芯片高速串行接口GTX学习笔记

    前言: 综合全网各路老鸟的优质博客加上一些自己的理解,整理了如下学习笔记:蛮开心入职了自己满意的单位,分享出来,希望大家都有所收获. 吉比特收发器(MGT)是吉比特级串行器/解串器(SERDES)的别 ...

  3. 【ATA】基于FPGA的高速数据采集ATA (Advanced Technology Attachment)接口verilog开发

    1.软件版本 modelsim 6.5se 2.本算法理论知识 在此ATA命令集中,记录了ATA协议中所有命令的代码,以及对应的命令传输类型和传输模式.通过将记录命令块寄存器组中命令寄存器的命令代码, ...

  4. 基于FPGA的高速电路板设计

    目录 1.PCB材料选择 2.PCB上的传输线走线 3.阻抗计算 4.降低串扰和维持信号完整性的布线方法 随着器件引脚密度和系统频率的增大,PCB布 板越来越复杂.成功的高速电路板应能够高效地集成器件 ...

  5. 【信号采集】基于FPGA的高速信号采集系统

    1.高速采集系统实现的功能,FPGA内部功能模块组成: 2.高速ADC接口的FPGA实现: 3.数字下变频(DDC)的FPGA实现: 4.三倍抽取功能的FPGA实现: 5.Aurora接口的FPGA实 ...

  6. 基于FPGA的高速ADC9XXX系列的产品研发记录与心得----系列二(玩FPGA玩到最后还是玩时钟)

    当板子回来之后我们的数据二通道还是存在bug,通过测试发现,还是在测试模式下面,adC的输出数据没有问题,但在接收的那边还是存在如下图的问题,通过电源AVDD和DVDD的查看发现,没有问题啊!!! 如 ...

  7. 【沧小海笔记】之基于FPGA的以太网设计相关知识——第三章 xilinx 三速以太网IP核(TEMAC)的介绍

    总目录在这里哦~ https://blog.csdn.net/z123canghai/article/details/114649502 Xilinx为我们提供了一个叫做"Tri-Mode ...

  8. 基于FPGA的高速PCB板设计

    原贴:http://bbs.ednchina.com/BLOG_ARTICLE_211733.HTM 高速PCB板设计 由于I/O的信号的快速切换会导致噪声产生.信号反射.串扰.地反弹,所以设计时必须 ...

  9. FPGA和DSP间基于SRIO的高速通信系统设计

    摘要: 现代信号处理系统通常需要在不同处理器之间实现高速数据通信,SRIO协议由于高效率.低延时的特性被广泛使用.本文研究了在FPGA和DSP两种处理器之间实现SRIO协议的方法,并通过电路设计和利用 ...

最新文章

  1. bmp图片加水印C语言,[求助]C语言 bmp文件加上水印
  2. Leangoo英文版来了~
  3. 在Linux下安装RabbitMQ
  4. “相对论“ 2019-07-10
  5. Python 多进程pool.map()方法的使用
  6. where used list repository table WBCROSSGT
  7. mysql邮箱认证_邮件服务系列postfix+sasl+mysql实现用户认证功能
  8. 两边定宽,中间自适应布局的四种实现方法
  9. JUnit5 测试套件示例
  10. 0x06 MySQL 单表查询
  11. 计算机开放电子书归档 2018
  12. 随机森林、gbdt算法
  13. css定位中position:absolute与float的区别
  14. USB接口芯片的选型参考
  15. 2018-2019年全球专业服务机器人销售额增长32%,达到112亿美元
  16. SpringBoot入门项目——holleWorld
  17. idea报错:fatal: –author ‘user@mail.com’ is not ‘Name ’ and matches no existing author
  18. 10月22日科技联播:饿了么与屈臣氏达成合作;马蜂窝回应数据造假
  19. JZOJ 幽幽子与森林
  20. 思维拓展:不相邻问题插空法

热门文章

  1. (九)隐私计算--安全多方计算
  2. Saruman's Army (POJ3069)
  3. 华二紫竹2021年高考成绩查询时间,2019年华二紫竹升学数据分析!
  4. SpringCloud教程第一篇 | 服务的注册与发现
  5. 移动端音乐WebApp
  6. 机器人的未来发展的趋势
  7. html页面tree方法,etree.html的用法问题
  8. Debian Squeez 安装 Gnome3
  9. Python 通过文本生成词云
  10. Java课后题第十二章:12.18(添加包语句)