diff --git a/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc.v b/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc.v index 1821cc220..b91fb8531 100644 --- a/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc.v +++ b/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc.v @@ -36,6 +36,7 @@ module ad_ip_jesd204_tpl_adc #( parameter BITS_PER_SAMPLE = 16, parameter DMA_BITS_PER_SAMPLE = 16, parameter OCTETS_PER_BEAT = 4, + parameter EN_FRAME_ALIGN = 1, parameter TWOS_COMPLEMENT = 1 ) ( // jesd interface @@ -177,6 +178,7 @@ module ad_ip_jesd204_tpl_adc #( .BITS_PER_SAMPLE (BITS_PER_SAMPLE), .CONVERTER_RESOLUTION (CONVERTER_RESOLUTION), .SAMPLES_PER_FRAME (SAMPLES_PER_FRAME), + .EN_FRAME_ALIGN (EN_FRAME_ALIGN), .OCTETS_PER_BEAT (OCTETS_PER_BEAT), .LINK_DATA_WIDTH (LINK_DATA_WIDTH), .DMA_DATA_WIDTH (DMA_DATA_WIDTH), diff --git a/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_core.v b/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_core.v index 974e9d64b..c70b5f453 100644 --- a/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_core.v +++ b/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_core.v @@ -31,6 +31,7 @@ module ad_ip_jesd204_tpl_adc_core #( parameter BITS_PER_SAMPLE = 16, parameter DMA_BITS_PER_SAMPLE = 16, parameter OCTETS_PER_BEAT = 4, + parameter EN_FRAME_ALIGN = 0, parameter DATA_PATH_WIDTH = 1, parameter LINK_DATA_WIDTH = NUM_LANES * OCTETS_PER_BEAT * 8, parameter DMA_DATA_WIDTH = DATA_PATH_WIDTH * DMA_BITS_PER_SAMPLE * NUM_CHANNELS, @@ -94,6 +95,7 @@ module ad_ip_jesd204_tpl_adc_core #( .CONVERTER_RESOLUTION (CONVERTER_RESOLUTION), .SAMPLES_PER_FRAME (SAMPLES_PER_FRAME), .OCTETS_PER_BEAT (OCTETS_PER_BEAT), + .EN_FRAME_ALIGN (EN_FRAME_ALIGN), .LINK_DATA_WIDTH (LINK_DATA_WIDTH), .ADC_DATA_WIDTH (ADC_DATA_WIDTH) ) i_deframer ( diff --git a/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_deframer.v b/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_deframer.v index a5484de66..d922a8ad8 100644 --- a/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_deframer.v +++ b/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_deframer.v @@ -30,6 +30,7 @@ module ad_ip_jesd204_tpl_adc_deframer #( parameter CONVERTER_RESOLUTION = 14, parameter SAMPLES_PER_FRAME = 1, parameter OCTETS_PER_BEAT = 8, + parameter EN_FRAME_ALIGN = 0, parameter LINK_DATA_WIDTH = OCTETS_PER_BEAT * 8 * NUM_LANES, parameter ADC_DATA_WIDTH = LINK_DATA_WIDTH * CONVERTER_RESOLUTION / BITS_PER_SAMPLE ) ( @@ -102,6 +103,7 @@ module ad_ip_jesd204_tpl_adc_deframer #( generate genvar n; + if (EN_FRAME_ALIGN) begin for (n = 0; n < NUM_LANES; n = n + 1) begin: g_xcvr_if localparam DW = OCTETS_PER_BEAT * 8; ad_xcvr_rx_if #( @@ -114,6 +116,9 @@ module ad_ip_jesd204_tpl_adc_deframer #( .rx_data (link_data_s[n*DW+:DW]) ); end + end else begin + assign link_data_s = link_data; + end endgenerate endmodule