// *************************************************************************** // *************************************************************************** // 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 = 8, parameter TX_NUM_LINKS = 1, parameter RX_JESD_L = 8, parameter RX_NUM_LINKS = 1, parameter SHARED_DEVCLK = 0 ) ( input [12:0] gpio_bd_i, output [ 7:0] gpio_bd_o, // 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 [94:0] gpio_i; wire [94:0] gpio_o; wire [94:0] gpio_t; wire [ 2:0] spi0_csn; wire [ 2:0] spi1_csn; wire spi1_mosi; wire spi1_miso; wire ref_clk; 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_internal; wire rx_device_clk; assign iic_rstn = 1'b1; // instantiations IBUFDS_GTE4 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