// *************************************************************************** // *************************************************************************** // Copyright 2014 - 2023 (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 ) ( input sys_rst, input sys_clk_p, input sys_clk_n, input uart_sin, output uart_sout, output ddr4_act_n, output [16:0] ddr4_addr, output [ 1:0] ddr4_ba, output [ 0:0] ddr4_bg, output ddr4_ck_p, output ddr4_ck_n, output [ 0:0] ddr4_cke, output [ 0:0] ddr4_cs_n, inout [ 7:0] ddr4_dm_n, inout [63:0] ddr4_dq, inout [ 7:0] ddr4_dqs_p, inout [ 7:0] ddr4_dqs_n, output [ 0:0] ddr4_odt, output ddr4_reset_n, output mdio_mdc, inout mdio_mdio, input phy_clk_p, input phy_clk_n, output phy_rst_n, input phy_rx_p, input phy_rx_n, output phy_tx_p, output phy_tx_n, inout [16:0] gpio_bd, output iic_rstn, inout iic_scl, inout iic_sda, input vadj_1v8_pgood, // FMC HPC IOs input [1:0] agc0, input [1:0] agc1, input [1:0] agc2, input [1:0] agc3, input clkin8_n, input clkin8_p, input clkin6_n, input clkin6_p, input fpga_refclk_in_n, input fpga_refclk_in_p, input fpga_refclk_in_replica_n, input fpga_refclk_in_replica_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 [63:0] gpio_i; wire [63:0] gpio_o; wire [63:0] gpio_t; wire [ 7:0] spi_csn; wire spi_mosi; wire spi_miso; wire spi1_miso; wire ref_clk; wire ref_clk_replica; wire sysref; wire [TX_NUM_LINKS-1:0] tx_syncin; wire [RX_NUM_LINKS-1:0] rx_syncout; wire [7:0] tx_data_p_loc; wire [7:0] tx_data_n_loc; wire clkin6; wire clkin8; wire tx_device_clk; 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_GTE4 i_ibufds_ref_clk_replica ( .CEB (1'd0), .I (fpga_refclk_in_replica_p), .IB (fpga_refclk_in_replica_n), .O (ref_clk_replica), .ODIV2 ()); IBUFDS i_ibufds_sysref ( .I (sysref2_p), .IB (sysref2_n), .O (sysref)); IBUFDS i_ibufds_device_clk ( .I (clkin6_p), .IB (clkin6_n), .O (clkin6)); IBUFDS_GTE4 i_ibufds_rx_device_clk ( .I (clkin8_p), .IB (clkin8_n), .CEB(1'b0), .ODIV2 (clkin8)); genvar i; generate for(i=0;i