From b221718bfe0bec087830e3eeb5ff80d46ca5e97a Mon Sep 17 00:00:00 2001 From: Laszlo Nagy Date: Tue, 22 Jan 2019 14:45:18 +0000 Subject: [PATCH] jesd204:up_tpl_common: reduce and move address space Limit the tpl register space to 128 locations mapped to 128-255 in the COMMON_ID segment. --- .../ad_ip_jesd204_tpl_adc_regmap.v | 2 +- .../ad_ip_jesd204_tpl_common/up_tpl_common.v | 18 +++++++++--------- .../ad_ip_jesd204_tpl_dac_regmap.v | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_regmap.v b/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_regmap.v index 36b78ff24..9cf294226 100644 --- a/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_regmap.v +++ b/library/jesd204/ad_ip_jesd204_tpl_adc/ad_ip_jesd204_tpl_adc_regmap.v @@ -305,7 +305,7 @@ module ad_ip_jesd204_tpl_adc_regmap #( endgenerate up_tpl_common #( - .COMMON_ID(2'h3), // Offset of regmap + .COMMON_ID(2'h0), // Offset of regmap .NUM_PROFILES(NUM_PROFILES) // Number of JESD profiles ) i_up_tpl_adc ( diff --git a/library/jesd204/ad_ip_jesd204_tpl_common/up_tpl_common.v b/library/jesd204/ad_ip_jesd204_tpl_common/up_tpl_common.v index b603c2074..bee90c905 100644 --- a/library/jesd204/ad_ip_jesd204_tpl_common/up_tpl_common.v +++ b/library/jesd204/ad_ip_jesd204_tpl_common/up_tpl_common.v @@ -38,7 +38,7 @@ module up_tpl_common #( // parameters - parameter COMMON_ID = 2'h3, // Offset of regmap + parameter COMMON_ID = 2'h0, // Offset of regmap parameter NUM_PROFILES = 1 // Number of JESD profiles )( @@ -77,8 +77,8 @@ module up_tpl_common #( // decode block select - assign up_wreq_s = (up_waddr[9:8] == COMMON_ID) ? up_wreq : 1'b0; - assign up_rreq_s = (up_raddr[9:8] == COMMON_ID) ? up_rreq : 1'b0; + assign up_wreq_s = (up_waddr[9:7] == {COMMON_ID,1'b1}) ? up_wreq : 1'b0; + assign up_rreq_s = (up_raddr[9:7] == {COMMON_ID,1'b1}) ? up_rreq : 1'b0; // processor write interface @@ -90,7 +90,7 @@ module up_tpl_common #( up_profile_sel <= 'd0; end else begin up_wack_int <= up_wreq_s; - if ((up_wreq_s == 1'b1) && (up_waddr[7:0] == 8'h00)) begin + if ((up_wreq_s == 1'b1) && (up_waddr[6:0] == 7'h00)) begin up_profile_sel <= up_wdata[$clog2(NUM_PROFILES):0]; end end @@ -108,9 +108,9 @@ module up_tpl_common #( end else begin up_rack_int <= up_rreq_s; if (up_rreq_s == 1'b1) begin - case (up_raddr[7:0]) - 8'h00: up_rdata_int <= up_profile_sel; - 8'h01: up_rdata_int <= NUM_PROFILES; + case (up_raddr[6:0]) + 7'h00: up_rdata_int <= up_profile_sel; + 7'h01: up_rdata_int <= NUM_PROFILES; default: up_rdata_int <= up_rdata_jesd_params; endcase end else begin @@ -124,11 +124,11 @@ module up_tpl_common #( for (i=0; i