|
| 1 | +// *************************************************************************** |
| 2 | +// *************************************************************************** |
| 3 | +// Copyright 2014 - 2018 (c) Analog Devices, Inc. All rights reserved. |
| 4 | +// |
| 5 | +// In this HDL repository, there are many different and unique modules, consisting |
| 6 | +// of various HDL (Verilog or VHDL) components. The individual modules are |
| 7 | +// developed independently, and may be accompanied by separate and unique license |
| 8 | +// terms. |
| 9 | +// |
| 10 | +// The user should read each of these license terms, and understand the |
| 11 | +// freedoms and responsibilities that he or she has by using this source/core. |
| 12 | +// |
| 13 | +// This core is distributed in the hope that it will be useful, but WITHOUT ANY |
| 14 | +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
| 15 | +// A PARTICULAR PURPOSE. |
| 16 | +// |
| 17 | +// Redistribution and use of source or resulting binaries, with or without modification |
| 18 | +// of this file, are permitted under one of the following two license terms: |
| 19 | +// |
| 20 | +// 1. The GNU General Public License version 2 as published by the |
| 21 | +// Free Software Foundation, which can be found in the top level directory |
| 22 | +// of this repository (LICENSE_GPL2), and also online at: |
| 23 | +// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html> |
| 24 | +// |
| 25 | +// OR |
| 26 | +// |
| 27 | +// 2. An ADI specific BSD license, which can be found in the top level directory |
| 28 | +// of this repository (LICENSE_ADIBSD), and also on-line at: |
| 29 | +// https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD |
| 30 | +// This will allow to generate bit files and not release the source code, |
| 31 | +// as long as it attaches to an ADI device. |
| 32 | +// |
| 33 | +// *************************************************************************** |
| 34 | +// *************************************************************************** |
| 35 | + |
| 36 | +`timescale 1ns/100ps |
| 37 | + |
| 38 | +module system_top ( |
| 39 | + |
| 40 | + inout [14:0] ddr_addr, |
| 41 | + inout [ 2:0] ddr_ba, |
| 42 | + inout ddr_cas_n, |
| 43 | + inout ddr_ck_n, |
| 44 | + inout ddr_ck_p, |
| 45 | + inout ddr_cke, |
| 46 | + inout ddr_cs_n, |
| 47 | + inout [ 1:0] ddr_dm, |
| 48 | + inout [15:0] ddr_dq, |
| 49 | + inout [ 1:0] ddr_dqs_n, |
| 50 | + inout [ 1:0] ddr_dqs_p, |
| 51 | + inout ddr_odt, |
| 52 | + inout ddr_ras_n, |
| 53 | + inout ddr_reset_n, |
| 54 | + inout ddr_we_n, |
| 55 | + |
| 56 | + inout fixed_io_ddr_vrn, |
| 57 | + inout fixed_io_ddr_vrp, |
| 58 | + inout [31:0] fixed_io_mio, |
| 59 | + inout fixed_io_ps_clk, |
| 60 | + inout fixed_io_ps_porb, |
| 61 | + inout fixed_io_ps_srstb, |
| 62 | + |
| 63 | + inout iic_scl, |
| 64 | + inout iic_sda, |
| 65 | + |
| 66 | + input rx_clk_in, |
| 67 | + input rx_frame_in, |
| 68 | + input [11:0] rx_data_in, |
| 69 | + output tx_clk_out, |
| 70 | + output tx_frame_out, |
| 71 | + output [11:0] tx_data_out, |
| 72 | + |
| 73 | + output enable, |
| 74 | + output txnrx, |
| 75 | + input clk_out, |
| 76 | + |
| 77 | + inout gpio_en_agc, |
| 78 | + inout [ 3:0] gpio_ctl, |
| 79 | + inout [ 7:0] gpio_status, |
| 80 | + |
| 81 | + inout [ 4:1] pl_gpio, |
| 82 | + |
| 83 | + output spi_csn, |
| 84 | + output spi_clk, |
| 85 | + output spi_mosi, |
| 86 | + input spi_miso); |
| 87 | + |
| 88 | + // internal signals |
| 89 | + |
| 90 | + wire [18:0] gpio_i; |
| 91 | + wire [18:0] gpio_o; |
| 92 | + wire [18:0] gpio_t; |
| 93 | + |
| 94 | + // instantiations |
| 95 | + |
| 96 | + ad_iobuf #(.DATA_WIDTH(17)) i_iobuf ( |
| 97 | + .dio_t (gpio_t[16:0]), |
| 98 | + .dio_i (gpio_o[16:0]), |
| 99 | + .dio_o (gpio_i[16:0]), |
| 100 | + .dio_p ({ pl_gpio, // 16:13 |
| 101 | + gpio_en_agc, // 12:12 |
| 102 | + gpio_ctl, // 11: 8 |
| 103 | + gpio_status})); // 7: 0 |
| 104 | + |
| 105 | + system_wrapper i_system_wrapper ( |
| 106 | + .ddr_addr (ddr_addr), |
| 107 | + .ddr_ba (ddr_ba), |
| 108 | + .ddr_cas_n (ddr_cas_n), |
| 109 | + .ddr_ck_n (ddr_ck_n), |
| 110 | + .ddr_ck_p (ddr_ck_p), |
| 111 | + .ddr_cke (ddr_cke), |
| 112 | + .ddr_cs_n (ddr_cs_n), |
| 113 | + .ddr_dm (ddr_dm), |
| 114 | + .ddr_dq (ddr_dq), |
| 115 | + .ddr_dqs_n (ddr_dqs_n), |
| 116 | + .ddr_dqs_p (ddr_dqs_p), |
| 117 | + .ddr_odt (ddr_odt), |
| 118 | + .ddr_ras_n (ddr_ras_n), |
| 119 | + .ddr_reset_n (ddr_reset_n), |
| 120 | + .ddr_we_n (ddr_we_n), |
| 121 | + .enable (enable), |
| 122 | + .fixed_io_ddr_vrn (fixed_io_ddr_vrn), |
| 123 | + .fixed_io_ddr_vrp (fixed_io_ddr_vrp), |
| 124 | + .fixed_io_mio (fixed_io_mio), |
| 125 | + .fixed_io_ps_clk (fixed_io_ps_clk), |
| 126 | + .fixed_io_ps_porb (fixed_io_ps_porb), |
| 127 | + .fixed_io_ps_srstb (fixed_io_ps_srstb), |
| 128 | + .gpio_i (gpio_i), |
| 129 | + .gpio_o (gpio_o), |
| 130 | + .gpio_t (gpio_t), |
| 131 | + .iic_main_scl_io (iic_scl), |
| 132 | + .iic_main_sda_io (iic_sda), |
| 133 | + .ps_intr_00 (1'b0), |
| 134 | + .ps_intr_01 (1'b0), |
| 135 | + .ps_intr_02 (1'b0), |
| 136 | + .ps_intr_03 (1'b0), |
| 137 | + .ps_intr_04 (1'b0), |
| 138 | + .ps_intr_05 (1'b0), |
| 139 | + .ps_intr_06 (1'b0), |
| 140 | + .ps_intr_07 (1'b0), |
| 141 | + .ps_intr_08 (1'b0), |
| 142 | + .ps_intr_09 (1'b0), |
| 143 | + .ps_intr_10 (1'b0), |
| 144 | + .ps_intr_11 (1'b0), |
| 145 | + .ps_intr_14 (1'b0), |
| 146 | + .rx_clk_in (rx_clk_in), |
| 147 | + .rx_data_in (rx_data_in), |
| 148 | + .rx_frame_in (rx_frame_in), |
| 149 | + .spi0_clk_i (1'b0), |
| 150 | + .spi0_clk_o (spi_clk), |
| 151 | + .spi0_csn_0_o (spi_csn), |
| 152 | + .spi0_csn_1_o (), |
| 153 | + .spi0_csn_2_o (), |
| 154 | + .spi0_csn_i (1'b1), |
| 155 | + .spi0_sdi_i (spi_miso), |
| 156 | + .spi0_sdo_i (1'b0), |
| 157 | + .spi0_sdo_o (spi_mosi), |
| 158 | + .tx_clk_out (tx_clk_out), |
| 159 | + .tx_data_out (tx_data_out), |
| 160 | + .tx_frame_out (tx_frame_out), |
| 161 | + .txnrx (txnrx), |
| 162 | + .up_enable (gpio_o[17]), |
| 163 | + .up_txnrx (gpio_o[18])); |
| 164 | + |
| 165 | +endmodule |
| 166 | + |
| 167 | +// *************************************************************************** |
| 168 | +// *************************************************************************** |
0 commit comments