2016-08-29 19:18:48 +00:00
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
2017-05-17 08:44:52 +00:00
|
|
|
// Copyright 2014 - 2017 (c) Analog Devices, Inc. All rights reserved.
|
|
|
|
//
|
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.
|
2017-05-17 08:44:52 +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:
|
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-08-29 19:18:48 +00:00
|
|
|
//
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
`timescale 1ns/1ps
|
|
|
|
|
2016-09-14 19:47:45 +00:00
|
|
|
module axi_adxcvr #(
|
|
|
|
|
|
|
|
// parameters
|
|
|
|
|
|
|
|
parameter integer ID = 0,
|
2019-01-11 08:54:16 +00:00
|
|
|
parameter [ 7:0] FPGA_TECHNOLOGY = 0,
|
|
|
|
parameter [ 7:0] FPGA_FAMILY = 0,
|
|
|
|
parameter [ 7:0] SPEED_GRADE = 0,
|
|
|
|
parameter [ 7:0] DEV_PACKAGE = 0,
|
|
|
|
parameter [15:0] FPGA_VOLTAGE = 0,
|
|
|
|
parameter integer XCVR_TYPE = 0,
|
2016-09-14 19:47:45 +00:00
|
|
|
parameter integer TX_OR_RX_N = 0,
|
2022-04-08 10:21:52 +00:00
|
|
|
parameter integer NUM_OF_LANES = 4
|
|
|
|
) (
|
2016-08-29 19:18:48 +00:00
|
|
|
|
|
|
|
// xcvr, lane-pll and ref-pll are shared
|
|
|
|
|
2016-09-01 14:05:16 +00:00
|
|
|
output up_rst,
|
2016-09-12 18:48:11 +00:00
|
|
|
input up_pll_locked,
|
2016-09-01 14:05:16 +00:00
|
|
|
input [(NUM_OF_LANES-1):0] up_ready,
|
2016-08-29 19:18:48 +00:00
|
|
|
|
2016-09-08 17:08:41 +00:00
|
|
|
input s_axi_aclk,
|
2016-09-01 14:05:16 +00:00
|
|
|
input s_axi_aresetn,
|
|
|
|
input s_axi_awvalid,
|
2017-07-24 13:04:44 +00:00
|
|
|
input [11:0] s_axi_awaddr,
|
2016-09-01 14:05:16 +00:00
|
|
|
input [ 2:0] s_axi_awprot,
|
|
|
|
output s_axi_awready,
|
|
|
|
input s_axi_wvalid,
|
|
|
|
input [31:0] s_axi_wdata,
|
|
|
|
input [ 3:0] s_axi_wstrb,
|
|
|
|
output s_axi_wready,
|
|
|
|
output s_axi_bvalid,
|
|
|
|
output [ 1:0] s_axi_bresp,
|
|
|
|
input s_axi_bready,
|
|
|
|
input s_axi_arvalid,
|
2017-07-24 13:04:44 +00:00
|
|
|
input [11:0] s_axi_araddr,
|
2016-09-01 14:05:16 +00:00
|
|
|
input [ 2:0] s_axi_arprot,
|
|
|
|
output s_axi_arready,
|
|
|
|
output s_axi_rvalid,
|
|
|
|
output [ 1:0] s_axi_rresp,
|
|
|
|
output [31:0] s_axi_rdata,
|
2022-04-08 10:21:52 +00:00
|
|
|
input s_axi_rready
|
|
|
|
);
|
2016-08-29 19:18:48 +00:00
|
|
|
|
|
|
|
// internal signals
|
|
|
|
|
2016-09-01 14:05:16 +00:00
|
|
|
wire up_rstn;
|
|
|
|
wire up_clk;
|
|
|
|
wire up_wreq;
|
|
|
|
wire [ 9:0] up_waddr;
|
|
|
|
wire [31:0] up_wdata;
|
|
|
|
wire up_wack;
|
|
|
|
wire up_rreq;
|
|
|
|
wire [ 9:0] up_raddr;
|
|
|
|
wire [31:0] up_rdata;
|
|
|
|
wire up_rack;
|
2016-08-29 19:18:48 +00:00
|
|
|
|
|
|
|
// clk & rst
|
|
|
|
|
2016-09-08 17:08:41 +00:00
|
|
|
assign up_rstn = s_axi_aresetn;
|
|
|
|
assign up_clk = s_axi_aclk;
|
2016-08-29 19:18:48 +00:00
|
|
|
|
|
|
|
// instantiations
|
|
|
|
|
|
|
|
axi_adxcvr_up #(
|
|
|
|
.ID (ID),
|
2019-01-11 08:54:16 +00:00
|
|
|
.XCVR_TYPE (XCVR_TYPE),
|
|
|
|
.FPGA_TECHNOLOGY (FPGA_TECHNOLOGY),
|
|
|
|
.FPGA_FAMILY (FPGA_FAMILY),
|
|
|
|
.SPEED_GRADE (SPEED_GRADE),
|
|
|
|
.DEV_PACKAGE (DEV_PACKAGE),
|
|
|
|
.FPGA_VOLTAGE (FPGA_VOLTAGE),
|
2016-09-01 14:05:16 +00:00
|
|
|
.TX_OR_RX_N (TX_OR_RX_N),
|
2022-04-08 10:21:52 +00:00
|
|
|
.NUM_OF_LANES (NUM_OF_LANES)
|
|
|
|
) i_up (
|
2016-08-29 19:18:48 +00:00
|
|
|
.up_rst (up_rst),
|
2016-09-12 18:48:11 +00:00
|
|
|
.up_pll_locked (up_pll_locked),
|
2016-08-29 19:18:48 +00:00
|
|
|
.up_ready (up_ready),
|
|
|
|
.up_rstn (up_rstn),
|
|
|
|
.up_clk (up_clk),
|
|
|
|
.up_wreq (up_wreq),
|
|
|
|
.up_waddr (up_waddr),
|
|
|
|
.up_wdata (up_wdata),
|
|
|
|
.up_wack (up_wack),
|
|
|
|
.up_rreq (up_rreq),
|
|
|
|
.up_raddr (up_raddr),
|
|
|
|
.up_rdata (up_rdata),
|
|
|
|
.up_rack (up_rack));
|
|
|
|
|
2017-07-24 13:04:44 +00:00
|
|
|
up_axi #(
|
|
|
|
.AXI_ADDRESS_WIDTH (12)
|
|
|
|
) i_axi (
|
2016-08-29 19:18:48 +00:00
|
|
|
.up_rstn (up_rstn),
|
|
|
|
.up_clk (up_clk),
|
|
|
|
.up_axi_awvalid (s_axi_awvalid),
|
|
|
|
.up_axi_awaddr (s_axi_awaddr),
|
|
|
|
.up_axi_awready (s_axi_awready),
|
|
|
|
.up_axi_wvalid (s_axi_wvalid),
|
|
|
|
.up_axi_wdata (s_axi_wdata),
|
|
|
|
.up_axi_wstrb (s_axi_wstrb),
|
|
|
|
.up_axi_wready (s_axi_wready),
|
|
|
|
.up_axi_bvalid (s_axi_bvalid),
|
|
|
|
.up_axi_bresp (s_axi_bresp),
|
|
|
|
.up_axi_bready (s_axi_bready),
|
|
|
|
.up_axi_arvalid (s_axi_arvalid),
|
|
|
|
.up_axi_araddr (s_axi_araddr),
|
|
|
|
.up_axi_arready (s_axi_arready),
|
|
|
|
.up_axi_rvalid (s_axi_rvalid),
|
|
|
|
.up_axi_rresp (s_axi_rresp),
|
|
|
|
.up_axi_rdata (s_axi_rdata),
|
|
|
|
.up_axi_rready (s_axi_rready),
|
|
|
|
.up_wreq (up_wreq),
|
|
|
|
.up_waddr (up_waddr),
|
|
|
|
.up_wdata (up_wdata),
|
|
|
|
.up_wack (up_wack),
|
|
|
|
.up_rreq (up_rreq),
|
|
|
|
.up_raddr (up_raddr),
|
|
|
|
.up_rdata (up_rdata),
|
|
|
|
.up_rack (up_rack));
|
|
|
|
|
|
|
|
endmodule
|