// *************************************************************************** // *************************************************************************** // Copyright 2014 - 2017 (c) Analog Devices, Inc. All rights reserved. // // In this HDL repository, there are many different and unique modules, consisting // of various HDL (Verilog or VHDL) components. The individual modules are // developed independently, and may be accompanied by separate and unique license // terms. // // The user should read each of these license terms, and understand the // freedoms and responsibilities that he or she has by using this source/core. // // This core is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR // A PARTICULAR PURPOSE. // // Redistribution and use of source or resulting binaries, with or without modification // of this file, are permitted under one of the following two license terms: // // 1. The GNU General Public License version 2 as published by the // Free Software Foundation, which can be found in the top level directory // of this repository (LICENSE_GPL2), and also online at: // // // OR // // 2. An ADI specific BSD license, which can be found in the top level directory // of this repository (LICENSE_ADIBSD), and also on-line at: // https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD // This will allow to generate bit files and not release the source code, // as long as it attaches to an ADI device. // // *************************************************************************** // *************************************************************************** `timescale 1ns/100ps module system_top #( parameter TX_JESD_L = 4, parameter TX_NUM_LINKS = 1, parameter RX_JESD_L = 4, parameter RX_NUM_LINKS = 1 ) ( input sys_clk_n, input sys_clk_p, output ddr4_act_n, output [16:0] ddr4_adr, output [1:0] ddr4_ba, output [1:0] ddr4_bg, output ddr4_ck_c, output ddr4_ck_t, output ddr4_cke, output ddr4_cs_n, inout [7:0] ddr4_dm_n, inout [63:0] ddr4_dq, inout [7:0] ddr4_dqs_c, inout [7:0] ddr4_dqs_t, output ddr4_odt, output ddr4_reset_n, // GPIOs output [3:0] gpio_led, input [3:0] gpio_dip_sw, input [1:0] gpio_pb, // FMC HPC IOs input [1:0] agc0, input [1:0] agc1, input [1:0] agc2, input [1:0] agc3, input clkin6_n, input clkin6_p, input clkin10_n, input clkin10_p, input fpga_refclk_in_n, input fpga_refclk_in_p, input [RX_JESD_L*RX_NUM_LINKS-1:0] rx_data_n, input [RX_JESD_L*RX_NUM_LINKS-1:0] rx_data_p, output [TX_JESD_L*TX_NUM_LINKS-1:0] tx_data_n, output [TX_JESD_L*TX_NUM_LINKS-1:0] tx_data_p, input [TX_NUM_LINKS-1:0] fpga_syncin_n, input [TX_NUM_LINKS-1:0] fpga_syncin_p, output [RX_NUM_LINKS-1:0] fpga_syncout_n, output [RX_NUM_LINKS-1:0] fpga_syncout_p, inout [10:0] gpio, inout hmc_gpio1, output hmc_sync, input [1:0] irqb, output rstb, output [1:0] rxen, output spi0_csb, input spi0_miso, output spi0_mosi, output spi0_sclk, output spi1_csb, output spi1_sclk, inout spi1_sdio, input sysref2_n, input sysref2_p, output [1:0] txen ); // internal signals wire [95:0] gpio_i; wire [95:0] gpio_o; wire [95:0] gpio_t; wire [ 2:0] spi0_csn; wire [ 2:0] spi1_csn; wire spi1_mosi; wire spi1_miso; wire sysref; wire [TX_NUM_LINKS-1:0] tx_syncin; wire [RX_NUM_LINKS-1:0] rx_syncout; wire [7:0] rx_data_p_loc; wire [7:0] rx_data_n_loc; wire [7:0] tx_data_p_loc; wire [7:0] tx_data_n_loc; wire clkin6; wire clkin10; wire tx_device_clk; wire rx_device_clk; // instantiations IBUFDS_GTE5 i_ibufds_ref_clk ( .CEB (1'd0), .I (fpga_refclk_in_p), .IB (fpga_refclk_in_n), .O (ref_clk), .ODIV2 ()); IBUFDS i_ibufds_sysref ( .I (sysref2_p), .IB (sysref2_n), .O (sysref)); IBUFDS i_ibufds_tx_device_clk ( .I (clkin6_p), .IB (clkin6_n), .O (clkin6)); IBUFDS i_ibufds_rx_device_clk ( .I (clkin10_p), .IB (clkin10_n), .O (clkin10)); genvar i; generate for(i=0;i