2016-05-03 20:02:40 +00:00
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
2017-05-17 08:44:52 +00:00
|
|
|
// Copyright 2014 - 2017 (c) Analog Devices, Inc. All rights reserved.
|
2016-05-03 20:02:40 +00:00
|
|
|
//
|
2017-05-31 15:15:24 +00:00
|
|
|
// 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
|
2018-03-14 14:45:47 +00:00
|
|
|
// freedoms and responsibilities that he or she has by using this source/core.
|
2017-05-31 15:15:24 +00:00
|
|
|
//
|
|
|
|
// This core is distributed in the hope that it will be useful, but WITHOUT ANY
|
2017-05-29 06:55:41 +00:00
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
// A PARTICULAR PURPOSE.
|
2016-05-03 20:02:40 +00:00
|
|
|
//
|
2017-05-29 06:55:41 +00:00
|
|
|
// 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:
|
2016-05-03 20:02:40 +00:00
|
|
|
//
|
2017-05-17 08:44:52 +00:00
|
|
|
// 1. The GNU General Public License version 2 as published by the
|
2017-05-31 15:15:24 +00:00
|
|
|
// Free Software Foundation, which can be found in the top level directory
|
|
|
|
// of this repository (LICENSE_GPL2), and also online at:
|
|
|
|
// <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
|
2017-05-17 08:44:52 +00:00
|
|
|
//
|
|
|
|
// OR
|
|
|
|
//
|
2017-05-31 15:15:24 +00:00
|
|
|
// 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:
|
2017-05-29 06:55:41 +00:00
|
|
|
// 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.
|
2016-05-03 20:02:40 +00:00
|
|
|
//
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
`timescale 1ns/100ps
|
|
|
|
|
|
|
|
module system_top (
|
|
|
|
|
2016-05-10 19:39:41 +00:00
|
|
|
input [12:0] gpio_bd_i,
|
|
|
|
output [ 7:0] gpio_bd_o,
|
|
|
|
|
|
|
|
input rx_clk_in_p,
|
|
|
|
input rx_clk_in_n,
|
|
|
|
input rx_frame_in_p,
|
|
|
|
input rx_frame_in_n,
|
|
|
|
input [ 5:0] rx_data_in_p,
|
|
|
|
input [ 5:0] rx_data_in_n,
|
|
|
|
output tx_clk_out_p,
|
|
|
|
output tx_clk_out_n,
|
|
|
|
output tx_frame_out_p,
|
|
|
|
output tx_frame_out_n,
|
|
|
|
output [ 5:0] tx_data_out_p,
|
|
|
|
output [ 5:0] tx_data_out_n,
|
|
|
|
|
|
|
|
output enable,
|
|
|
|
output txnrx,
|
|
|
|
|
|
|
|
output gpio_resetb,
|
|
|
|
output gpio_sync,
|
|
|
|
output gpio_en_agc,
|
|
|
|
output [ 3:0] gpio_ctl,
|
|
|
|
input [ 7:0] gpio_status,
|
|
|
|
|
|
|
|
output spi_csn,
|
|
|
|
output spi_clk,
|
|
|
|
output spi_mosi,
|
2022-04-14 13:13:22 +00:00
|
|
|
input spi_miso
|
|
|
|
);
|
2016-05-03 20:02:40 +00:00
|
|
|
|
2016-05-10 19:39:41 +00:00
|
|
|
// internal signals
|
2016-05-03 20:02:40 +00:00
|
|
|
|
2018-08-31 08:33:50 +00:00
|
|
|
wire [94:0] gpio_i;
|
|
|
|
wire [94:0] gpio_o;
|
2016-05-10 19:39:41 +00:00
|
|
|
wire [ 2:0] spi0_csn;
|
2016-05-03 20:02:40 +00:00
|
|
|
|
2016-05-10 19:39:41 +00:00
|
|
|
// defaults
|
2016-05-03 20:02:40 +00:00
|
|
|
|
2016-05-10 19:39:41 +00:00
|
|
|
assign gpio_resetb = gpio_o[46:46];
|
|
|
|
assign gpio_sync = gpio_o[45:45];
|
|
|
|
assign gpio_en_agc = gpio_o[44:44];
|
|
|
|
assign gpio_ctl = gpio_o[43:40];
|
|
|
|
assign gpio_bd_o = gpio_o[20:13];
|
2016-05-03 20:02:40 +00:00
|
|
|
|
2018-10-03 14:47:35 +00:00
|
|
|
assign gpio_i[94:40] = gpio_o[94:40];
|
2016-05-10 19:39:41 +00:00
|
|
|
assign gpio_i[39:32] = gpio_status;
|
2018-10-03 14:47:35 +00:00
|
|
|
assign gpio_i[31:13] = gpio_o[31:13];
|
2016-05-10 19:39:41 +00:00
|
|
|
assign gpio_i[12: 0] = gpio_bd_i;
|
2016-05-03 20:02:40 +00:00
|
|
|
|
2016-05-10 19:39:41 +00:00
|
|
|
assign spi_csn = spi0_csn[0];
|
2016-05-03 20:02:40 +00:00
|
|
|
|
|
|
|
// instantiations
|
|
|
|
|
|
|
|
system_wrapper i_system_wrapper (
|
|
|
|
.enable (enable),
|
|
|
|
.gpio_i (gpio_i),
|
|
|
|
.gpio_o (gpio_o),
|
2018-08-09 09:13:21 +00:00
|
|
|
.gpio_t (),
|
2016-05-03 20:02:40 +00:00
|
|
|
.rx_clk_in_n (rx_clk_in_n),
|
|
|
|
.rx_clk_in_p (rx_clk_in_p),
|
|
|
|
.rx_data_in_n (rx_data_in_n),
|
|
|
|
.rx_data_in_p (rx_data_in_p),
|
|
|
|
.rx_frame_in_n (rx_frame_in_n),
|
|
|
|
.rx_frame_in_p (rx_frame_in_p),
|
2016-05-10 19:39:41 +00:00
|
|
|
.spi0_csn (spi0_csn),
|
|
|
|
.spi0_miso (spi_miso),
|
|
|
|
.spi0_mosi (spi_mosi),
|
|
|
|
.spi0_sclk (spi_clk),
|
|
|
|
.spi1_csn (),
|
|
|
|
.spi1_miso (1'b0),
|
|
|
|
.spi1_mosi (),
|
|
|
|
.spi1_sclk (),
|
|
|
|
.tdd_sync_i (1'b0),
|
|
|
|
.tdd_sync_o (),
|
|
|
|
.tdd_sync_t (),
|
2016-05-03 20:02:40 +00:00
|
|
|
.tx_clk_out_n (tx_clk_out_n),
|
|
|
|
.tx_clk_out_p (tx_clk_out_p),
|
|
|
|
.tx_data_out_n (tx_data_out_n),
|
|
|
|
.tx_data_out_p (tx_data_out_p),
|
|
|
|
.tx_frame_out_n (tx_frame_out_n),
|
|
|
|
.tx_frame_out_p (tx_frame_out_p),
|
|
|
|
.txnrx (txnrx),
|
|
|
|
.up_enable (gpio_o[47]),
|
|
|
|
.up_txnrx (gpio_o[48]));
|
|
|
|
|
|
|
|
endmodule
|