common/up_adc_channel: Add raw data reading functionality

main
alin724 2022-09-12 18:49:13 +03:00 committed by Alin-Tudor Sferle
parent 1eb5f4985b
commit 045327c8db
2 changed files with 9 additions and 4 deletions

View File

@ -66,6 +66,7 @@ module up_adc_channel #(
input adc_pn_err,
input adc_pn_oos,
input adc_or,
input [31:0] adc_read_data,
input [ 7:0] adc_status_header,
input adc_crc_err,
output up_adc_pn_err,
@ -145,6 +146,7 @@ module up_adc_channel #(
wire up_adc_pn_err_s;
wire up_adc_pn_oos_s;
wire up_adc_or_s;
wire [31:0] up_adc_read_data_s;
wire [ 7:0] up_adc_status_header_s;
wire up_adc_crc_err_s;
@ -399,6 +401,7 @@ module up_adc_channel #(
1'd0, up_adc_dfmt_se, up_adc_dfmt_type, up_adc_dfmt_enable,
2'd0, up_adc_pn_type, up_adc_enable};
4'h1: up_rdata_int <= { 19'd0, up_adc_crc_err_s, up_adc_status_header_s, 1'd0, up_adc_pn_err_int, up_adc_pn_oos_int, up_adc_or_int};
4'h2: up_rdata_int <= { up_adc_read_data_s};
4'h4: up_rdata_int <= { up_adc_dcfilt_offset, up_adc_dcfilt_coeff};
4'h5: up_rdata_int <= { up_adc_iqcor_coeff_1, up_adc_iqcor_coeff_2};
4'h6: up_rdata_int <= { 12'd0, up_adc_pnseq_sel, 12'd0, up_adc_data_sel};
@ -482,7 +485,7 @@ module up_adc_channel #(
adc_data_sel}));
up_xfer_status #(
.DATA_WIDTH(12)
.DATA_WIDTH(44)
) i_xfer_status (
.up_rstn (up_rstn),
.up_clk (up_clk),
@ -490,13 +493,15 @@ module up_adc_channel #(
up_adc_crc_err_s,
up_adc_pn_err_s,
up_adc_pn_oos_s,
up_adc_or_s}),
up_adc_or_s,
up_adc_read_data_s}),
.d_rst (adc_rst),
.d_clk (adc_clk),
.d_data_status ({ adc_status_header,
adc_crc_err,
adc_pn_err,
adc_pn_oos,
adc_or}));
adc_or,
adc_read_data}));
endmodule

View File

@ -124,7 +124,7 @@ module up_adc_common #(
// parameters
localparam VERSION = 32'h000a0162;
localparam VERSION = 32'h000a0262;
// internal registers