// ---------------------------------------------------------------------- // "THE BEER-WARE LICENSE" (Revision 42): // and wrote this // file. As long as you retain this notice you can do whatever you // want with this stuff. If we meet some day, and you think this // stuff is worth it, you can buy me a beer in return Yasunori // Osana and Akinobu Tomori at University of the Ryukyus, Japan. // ---------------------------------------------------------------------- // OpenFC project: an open FPGA accelerated cluster toolkit // Kyokko project: an open Multi-vendor Aurora 64B/66B-compatible link // // Modules in this file: // kcu1500_kyokko: Kyokko + Transceiver wrapper for KCU1500, 2x QSFP // ---------------------------------------------------------------------- `default_nettype none module kcu1500_kyokko # ( parameter NumCh=8, BondingEnable=0, // Set to 1 to enable BondingCh=4, NumChB = ((BondingEnable==0) ? NumCh : NumCh/BondingCh) ) ( input wire CLK100, RST, input wire QSFP0_REFCLKP, QSFP0_REFCLKN, output wire [3:0] QSFP0_TXP, QSFP0_TXN, QSFP1_TXP, QSFP1_TXN, input wire [3:0] QSFP0_RXP, QSFP0_RXN, QSFP1_RXP, QSFP1_RXN, // ------------------------------ // Aurora compatible interface signals output wire [NumChB-1:0] CH_UP, USER_CLK, // Data channel input wire [64*NumCh-1:0] S_AXI_TX_TDATA, input wire [ NumChB-1:0] S_AXI_TX_TLAST, S_AXI_TX_TVALID, output wire [NumChB-1:0] S_AXI_TX_TREADY, output wire [64*NumCh-1:0] M_AXI_RX_TDATA, output wire [ NumChB-1:0] M_AXI_RX_TLAST, M_AXI_RX_TVALID, // UFC channel input wire [NumChB-1:0] UFC_TX_REQ, input wire [8*NumChB-1:0] UFC_TX_MS, input wire [64*NumCh-1:0] S_AXI_UFC_TX_TDATA, input wire [NumChB-1:0] S_AXI_UFC_TX_TVALID, output wire [NumChB-1:0] S_AXI_UFC_TX_TREADY, output wire [64*NumCh-1:0] M_AXI_UFC_RX_TDATA, output wire [ NumChB-1:0] M_AXI_UFC_RX_TLAST, M_AXI_UFC_RX_TVALID, // NFC channel input wire [16*NumChB-1:0] S_AXI_NFC_TDATA, input wire [NumChB-1:0] S_AXI_NFC_TVALID, output wire [NumChB-1:0] S_AXI_NFC_TREADY ); // ------------------------------ // QSFP0/1 bundle wire [NumCh-1:0] QSFP_TXP, QSFP_TXN, QSFP_RXP, QSFP_RXN; assign {QSFP1_TXP, QSFP0_TXP} = QSFP_TXP; assign {QSFP1_TXN, QSFP0_TXN} = QSFP_TXN; assign QSFP_RXP = {QSFP1_RXP, QSFP0_RXP}; assign QSFP_RXN = {QSFP1_RXN, QSFP0_RXN}; // ------------------------------ // GTREFCLK buffer and GT_RST wire GTREFCLK; IBUFDS_GTE3 refclkbuf ( .O(GTREFCLK), .ODIV2(), // O .I(QSFP0_REFCLKP), .IB (QSFP0_REFCLKN), .CEB(1'b0) ); // I wire GT_RST; gt_rst grst ( .CLK(CLK100), .RST(RST), .GT_RST(GT_RST) ); // ------------------------------ // Kyokko instances wire [NumCh-1:0] TXUSERCLK2, TX_RDY; wire [NumCh-1:0] RXUSERCLK2, RX_RDY; wire [NumCh-1:0][63:0] TXS, RXS; // packed array: the SV way wire [NumCh-1:0][5:0] TXHDR, RXHDR; wire [NumCh-1:0] RXRST = ~RX_RDY; wire [NumCh-1:0] TXRST = ~TX_RDY; wire [NumCh-1:0] RXPATH_RST, RXSLIP, TX_WFR_CB, TX_SEND_CC; genvar ch, ch2; generate if (BondingEnable==0) begin : nobond_gen assign USER_CLK = TXUSERCLK2; for (ch=0; ch