From 72cdd846b0d0c1bafbeb98c14f919dee99cb855a Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 17 Apr 2017 13:12:06 +0200 Subject: [PATCH] axi_ad9963: Allow to disable the IDELAYs on the ADC data path Not all designs need the IDELAYs. Disabling them can reduce power consumption of the system. Signed-off-by: Lars-Peter Clausen --- library/axi_ad9963/axi_ad9963.v | 7 +++++-- library/axi_ad9963/axi_ad9963_if.v | 3 +++ library/axi_ad9963/axi_ad9963_rx.v | 13 +++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/library/axi_ad9963/axi_ad9963.v b/library/axi_ad9963/axi_ad9963.v index 0e1768de8..cfc487a61 100644 --- a/library/axi_ad9963/axi_ad9963.v +++ b/library/axi_ad9963/axi_ad9963.v @@ -43,6 +43,7 @@ module axi_ad9963 #( parameter ID = 0, parameter DEVICE_TYPE = 0, + parameter ADC_IODELAY_ENABLE = 0, parameter DAC_IODELAY_ENABLE = 0, parameter IO_DELAY_GROUP = "dev_if_delay_group", parameter DAC_DATAPATH_DISABLE = 0, @@ -176,6 +177,7 @@ module axi_ad9963 #( axi_ad9963_if #( .DEVICE_TYPE (DEVICE_TYPE), + .ADC_IODELAY_ENABLE (ADC_IODELAY_ENABLE), .DAC_IODELAY_ENABLE (DAC_IODELAY_ENABLE), .IO_DELAY_GROUP (IO_DELAY_GROUP)) i_dev_if ( @@ -206,8 +208,9 @@ module axi_ad9963 #( axi_ad9963_rx #( .ID (ID), - .DATAPATH_DISABLE (ADC_DATAPATH_DISABLE)) - i_rx ( + .DATAPATH_DISABLE (ADC_DATAPATH_DISABLE), + .IODELAY_ENABLE (ADC_IODELAY_ENABLE) + ) i_rx ( .adc_rst (adc_rst), .adc_clk (adc_clk), .adc_valid (adc_valid_s), diff --git a/library/axi_ad9963/axi_ad9963_if.v b/library/axi_ad9963/axi_ad9963_if.v index 3c8682818..574baeae0 100644 --- a/library/axi_ad9963/axi_ad9963_if.v +++ b/library/axi_ad9963/axi_ad9963_if.v @@ -36,6 +36,7 @@ module axi_ad9963_if #( parameter DEVICE_TYPE = 0, parameter DAC_IODELAY_ENABLE = 0, + parameter ADC_IODELAY_ENABLE = 0, parameter IO_DELAY_GROUP = "dev_if_delay_group") ( // physical interface (receive) @@ -135,6 +136,7 @@ module axi_ad9963_if #( ad_lvds_in #( .SINGLE_ENDED (1), .DEVICE_TYPE (DEVICE_TYPE), + .IODELAY_ENABLE (ADC_IODELAY_ENABLE), .IODELAY_CTRL (0), .IODELAY_GROUP (IO_DELAY_GROUP)) i_rx_data ( @@ -158,6 +160,7 @@ module axi_ad9963_if #( ad_lvds_in #( .SINGLE_ENDED (1), .DEVICE_TYPE (DEVICE_TYPE), + .IODELAY_ENABLE (ADC_IODELAY_ENABLE), .IODELAY_CTRL (1), .IODELAY_GROUP (IO_DELAY_GROUP)) i_rx_iq ( diff --git a/library/axi_ad9963/axi_ad9963_rx.v b/library/axi_ad9963/axi_ad9963_rx.v index bae599200..84bec6e69 100644 --- a/library/axi_ad9963/axi_ad9963_rx.v +++ b/library/axi_ad9963/axi_ad9963_rx.v @@ -42,6 +42,7 @@ module axi_ad9963_rx #( // parameters parameter DATAPATH_DISABLE = 0, + parameter IODELAY_ENABLE = 0, parameter ID = 0) ( // adc interface @@ -233,6 +234,8 @@ module axi_ad9963_rx #( // adc delay control + generate if (IODELAY_ENABLE == 1) begin + up_delay_cntrl #(.DATA_WIDTH(13), .BASE_ADDRESS(6'h02)) i_delay_cntrl ( .delay_clk (delay_clk), .delay_rst (delay_rst), @@ -251,6 +254,16 @@ module axi_ad9963_rx #( .up_rdata (up_rdata_s[3]), .up_rack (up_rack_s[3])); + end else begin + assign up_dld = 'h00; + assign up_dwdata = 'h00; + assign delay_rst = 1'b1; + assign up_wack_s[3] = 0; + assign up_rack_s[3] = 0; + assign up_rdata_s[3] = 'h00; + end + endgenerate + endmodule // ***************************************************************************