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.
|
|
|
|
//
|
|
|
|
// Each core or library found in this collection may have its own licensing terms.
|
|
|
|
// The user should keep this in in mind while exploring these cores.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms,
|
|
|
|
// with or without modification of this file, are permitted under the terms of either
|
|
|
|
// (at the option of the user):
|
|
|
|
//
|
|
|
|
// 1. The GNU General Public License version 2 as published by the
|
|
|
|
// Free Software Foundation, which can be found in the top level directory, or at:
|
|
|
|
// https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
|
|
|
|
//
|
|
|
|
// OR
|
|
|
|
//
|
|
|
|
// 2. An ADI specific BSD license as noted in the top level directory, or on-line at:
|
|
|
|
// https://github.com/analogdevicesinc/hdl/blob/dev/LICENSE
|
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,
|
|
|
|
parameter integer TX_OR_RX_N = 0,
|
|
|
|
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,
|
|
|
|
input [31:0] s_axi_awaddr,
|
|
|
|
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,
|
|
|
|
input [31:0] s_axi_araddr,
|
|
|
|
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,
|
|
|
|
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),
|
2016-09-01 14:05:16 +00:00
|
|
|
.TX_OR_RX_N (TX_OR_RX_N),
|
|
|
|
.NUM_OF_LANES (NUM_OF_LANES))
|
2016-08-29 19:18:48 +00:00
|
|
|
i_up (
|
|
|
|
.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));
|
|
|
|
|
|
|
|
up_axi #(.ADDRESS_WIDTH (10)) i_axi (
|
|
|
|
.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
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
|