2014-04-09 14:34:40 +00:00
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
2017-05-17 08:44:52 +00:00
|
|
|
// Copyright 2014 - 2017 (c) Analog Devices, Inc. All rights reserved.
|
2014-04-09 14:34:40 +00:00
|
|
|
//
|
2017-05-17 08:44:52 +00:00
|
|
|
// 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.
|
2014-04-09 14:34:40 +00:00
|
|
|
//
|
2017-05-17 08:44:52 +00:00
|
|
|
// 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):
|
2014-04-09 14:34:40 +00:00
|
|
|
//
|
2017-05-17 08:44:52 +00:00
|
|
|
// 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
|
2014-04-09 14:34:40 +00:00
|
|
|
//
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
|
2014-07-30 19:31:09 +00:00
|
|
|
`timescale 1ns/100ps
|
2014-04-09 14:34:40 +00:00
|
|
|
|
2017-04-13 08:45:54 +00:00
|
|
|
module axi_ad9467_channel#(
|
2014-04-09 14:34:40 +00:00
|
|
|
|
2017-04-13 08:45:54 +00:00
|
|
|
parameter CHANNEL_ID = 0) (
|
2014-07-30 19:31:09 +00:00
|
|
|
|
|
|
|
// adc interface
|
|
|
|
|
2017-04-13 08:45:54 +00:00
|
|
|
input adc_clk,
|
|
|
|
input adc_rst,
|
|
|
|
input [15:0] adc_data,
|
|
|
|
input adc_or,
|
2014-07-30 19:31:09 +00:00
|
|
|
|
|
|
|
// channel interface
|
|
|
|
|
2017-04-13 08:45:54 +00:00
|
|
|
output [15:0] adc_dfmt_data,
|
|
|
|
output adc_enable,
|
|
|
|
output up_adc_pn_err,
|
|
|
|
output up_adc_pn_oos,
|
|
|
|
output up_adc_or,
|
2014-07-30 19:31:09 +00:00
|
|
|
|
|
|
|
// processor interface
|
|
|
|
|
2017-04-13 08:45:54 +00:00
|
|
|
input up_rstn,
|
|
|
|
input up_clk,
|
|
|
|
input up_wreq,
|
|
|
|
input [13:0] up_waddr,
|
|
|
|
input [31:0] up_wdata,
|
|
|
|
output up_wack,
|
|
|
|
input up_rreq,
|
|
|
|
input [13:0] up_raddr,
|
|
|
|
output [31:0] up_rdata,
|
|
|
|
output up_rack);
|
|
|
|
|
2014-07-30 19:31:09 +00:00
|
|
|
|
|
|
|
// internal signals
|
|
|
|
|
|
|
|
wire adc_pn_oos_s;
|
|
|
|
wire adc_pn_err_s;
|
|
|
|
wire [ 3:0] adc_pnseq_sel_s;
|
|
|
|
wire adc_dfmt_enable_s;
|
|
|
|
wire adc_dfmt_type_s;
|
|
|
|
wire adc_dfmt_se_s;
|
|
|
|
|
|
|
|
// instantiations
|
|
|
|
|
|
|
|
axi_ad9467_pnmon i_axi_ad9467_pnmon (
|
|
|
|
.adc_clk (adc_clk),
|
|
|
|
.adc_data (adc_data),
|
|
|
|
.adc_pn_oos (adc_pn_oos_s),
|
|
|
|
.adc_pn_err (adc_pn_err_s),
|
|
|
|
.adc_pnseq_sel (adc_pnseq_sel_s));
|
2014-10-08 08:23:44 +00:00
|
|
|
|
2014-07-30 19:31:09 +00:00
|
|
|
ad_datafmt #(.DATA_WIDTH(16)) i_datafmt (
|
|
|
|
.clk(adc_clk),
|
|
|
|
.valid(1'b1),
|
|
|
|
.data(adc_data),
|
|
|
|
.valid_out(),
|
|
|
|
.data_out(adc_dfmt_data),
|
|
|
|
.dfmt_enable(adc_dfmt_enable_s),
|
|
|
|
.dfmt_type(adc_dfmt_type_s),
|
|
|
|
.dfmt_se(adc_dfmt_se_s));
|
2014-10-08 08:23:44 +00:00
|
|
|
|
2016-09-23 17:44:47 +00:00
|
|
|
up_adc_channel #(.CHANNEL_ID(0)) i_up_adc_channel (
|
2014-07-30 19:31:09 +00:00
|
|
|
.adc_clk (adc_clk),
|
|
|
|
.adc_rst (adc_rst),
|
|
|
|
.adc_enable (adc_enable),
|
|
|
|
.adc_iqcor_enb (),
|
|
|
|
.adc_dcfilt_enb (),
|
|
|
|
.adc_dfmt_se (adc_dfmt_se_s),
|
|
|
|
.adc_dfmt_type (adc_dfmt_type_s),
|
|
|
|
.adc_dfmt_enable (adc_dfmt_enable_s),
|
|
|
|
.adc_dcfilt_offset (),
|
|
|
|
.adc_dcfilt_coeff (),
|
|
|
|
.adc_iqcor_coeff_1 (),
|
|
|
|
.adc_iqcor_coeff_2 (),
|
|
|
|
.adc_pnseq_sel (adc_pnseq_sel_s),
|
|
|
|
.adc_data_sel (),
|
|
|
|
.adc_pn_err (adc_pn_err_s),
|
|
|
|
.adc_pn_oos (adc_pn_oos_s),
|
|
|
|
.adc_or (adc_or),
|
|
|
|
.up_adc_pn_err (up_adc_pn_err),
|
|
|
|
.up_adc_pn_oos (up_adc_pn_oos),
|
|
|
|
.up_adc_or (up_adc_or),
|
|
|
|
.up_usr_datatype_be (),
|
|
|
|
.up_usr_datatype_signed (),
|
|
|
|
.up_usr_datatype_shift (),
|
|
|
|
.up_usr_datatype_total_bits (),
|
|
|
|
.up_usr_datatype_bits (),
|
|
|
|
.up_usr_decimation_m (),
|
|
|
|
.up_usr_decimation_n (),
|
|
|
|
.adc_usr_datatype_be (1'b0),
|
|
|
|
.adc_usr_datatype_signed (1'b1),
|
|
|
|
.adc_usr_datatype_shift (8'd0),
|
|
|
|
.adc_usr_datatype_total_bits (8'd16),
|
|
|
|
.adc_usr_datatype_bits (8'd16),
|
|
|
|
.adc_usr_decimation_m (16'd1),
|
|
|
|
.adc_usr_decimation_n (16'd1),
|
|
|
|
.up_rstn (up_rstn),
|
|
|
|
.up_clk (up_clk),
|
2014-10-08 08:23:44 +00:00
|
|
|
.up_wreq (up_wreq),
|
|
|
|
.up_waddr (up_waddr),
|
2014-07-30 19:31:09 +00:00
|
|
|
.up_wdata (up_wdata),
|
2014-10-08 08:23:44 +00:00
|
|
|
.up_wack (up_wack),
|
|
|
|
.up_rreq (up_rreq),
|
|
|
|
.up_raddr (up_raddr),
|
2014-07-30 19:31:09 +00:00
|
|
|
.up_rdata (up_rdata),
|
2014-10-08 08:23:44 +00:00
|
|
|
.up_rack (up_rack));
|
2014-04-09 14:34:40 +00:00
|
|
|
|
|
|
|
endmodule
|
2014-07-30 19:31:09 +00:00
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|