`default_nettype none `timescale 1ps/1ps // This is the top level module that contains the control // and data path for each lane // module mgt_8b10b_wrap #( parameter IP_ID = 0, parameter GT_TYPE = "GTHP", parameter NUM_LANES = 4, parameter NUM_QUADS = 1, parameter NUM_REFCLK_BUFFERS = 1, parameter TX_BYTES_PER_LANE = 8, parameter RX_BYTES_PER_LANE = 8, parameter GT_USERIO_IN_WIDTH = 16, parameter GT_USERIO_OUT_WIDTH = 16 ) ( // Reference and free-run clock signals input wire [NUM_REFCLK_BUFFERS-1:0] gt_refclk_p, input wire [NUM_REFCLK_BUFFERS-1:0] gt_refclk_n, input wire gt_reset_clk_freerun, // xcvr IP ports. Each Lane has one Tx and one // Rx data port. Leave unused ports unconnected // or tied off input wire [NUM_LANES-1:0] gt_rxp, input wire [NUM_LANES-1:0] gt_rxn, input wire [NUM_LANES-1:0] gt_rxpolarity, output wire [NUM_LANES-1:0] gt_txp, output wire [NUM_LANES-1:0] gt_txn, input wire [NUM_LANES-1:0] gt_txpolarity, // Clock and CDR related output wires output wire [NUM_QUADS-1:0] qpll0_locked, output wire [NUM_QUADS-1:0] qpll1_locked, output wire [NUM_LANES-1:0] cpll_locked, output wire [NUM_LANES-1:0] cdr_locked, // Datapath related signals // These are controlled/used by the JESD Rx IP output wire xcvr_rx_usrclk, output wire xcvr_rx_usrclk2, output wire xcvr_tx_usrclk, output wire xcvr_tx_usrclk2, input wire xcvr_reset_all, input wire xcvr_reset_tx, input wire xcvr_reset_rx, output wire xcvr_reset_rx_done, output wire xcvr_reset_tx_done, output wire [RX_BYTES_PER_LANE*8-1:0] xcvr_rx_data [NUM_LANES-1:0], output wire [RX_BYTES_PER_LANE-1:0] xcvr_rx_is_comma [NUM_LANES-1:0], output wire [RX_BYTES_PER_LANE-1:0] xcvr_rx_is_char [NUM_LANES-1:0], output wire [RX_BYTES_PER_LANE-1:0] xcvr_rx_notintable [NUM_LANES-1:0], output wire [RX_BYTES_PER_LANE-1:0] xcvr_rx_disperror [NUM_LANES-1:0], input wire [NUM_LANES-1:0] xcvr_comma_det_align_en, output wire [NUM_LANES-1:0] xcvr_rx_byte_aligned, output wire [NUM_LANES-1:0] xcvr_rx_byte_realigned, input wire [TX_BYTES_PER_LANE*8-1:0] xcvr_tx_data [NUM_LANES-1:0], input wire [TX_BYTES_PER_LANE-1:0] xcvr_tx_data_is_char [NUM_LANES-1:0], input wire [GT_USERIO_IN_WIDTH-1:0] mgt_gpio_in, output wire [GT_USERIO_OUT_WIDTH-1:0] mgt_gpio_out ); wire [NUM_REFCLK_BUFFERS-1:0] gt_refclk0_buf; genvar j; generate for (j=0; j