From a8e9d7227361719e663a8952f7ccb597c29681c3 Mon Sep 17 00:00:00 2001 From: Rejeesh Kutty Date: Wed, 17 Feb 2016 14:16:04 -0500 Subject: [PATCH] adc/dac - prefix parameters --- library/common/up_adc_channel.v | 5 +++-- library/common/up_adc_common.v | 5 +++-- library/common/up_dac_channel.v | 5 +++-- library/common/up_dac_common.v | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/library/common/up_adc_channel.v b/library/common/up_adc_channel.v index b6d85dfd4..f52319ab9 100644 --- a/library/common/up_adc_channel.v +++ b/library/common/up_adc_channel.v @@ -96,6 +96,7 @@ module up_adc_channel ( // parameters + parameter ADC_COMMON_ID = 6'h01; parameter ADC_CHANNEL_ID = 4'h0; // adc interface @@ -211,8 +212,8 @@ module up_adc_channel ( // decode block select - assign up_wreq_s = ((up_waddr[13:8] == 6'h01) && (up_waddr[7:4] == ADC_CHANNEL_ID)) ? up_wreq : 1'b0; - assign up_rreq_s = ((up_raddr[13:8] == 6'h01) && (up_raddr[7:4] == ADC_CHANNEL_ID)) ? up_rreq : 1'b0; + assign up_wreq_s = ((up_waddr[13:8] == ADC_COMMON_ID) && (up_waddr[7:4] == ADC_CHANNEL_ID)) ? up_wreq : 1'b0; + assign up_rreq_s = ((up_raddr[13:8] == ADC_COMMON_ID) && (up_raddr[7:4] == ADC_CHANNEL_ID)) ? up_rreq : 1'b0; // processor write interface diff --git a/library/common/up_adc_common.v b/library/common/up_adc_common.v index 29ccd571f..2a9738b8d 100644 --- a/library/common/up_adc_common.v +++ b/library/common/up_adc_common.v @@ -98,6 +98,7 @@ module up_adc_common ( localparam PCORE_VERSION = 32'h00090062; parameter ID = 0; + parameter ADC_COMMON_ID = 6'h00; // clock reset @@ -194,8 +195,8 @@ module up_adc_common ( // decode block select - assign up_wreq_s = (up_waddr[13:8] == 6'h00) ? up_wreq : 1'b0; - assign up_rreq_s = (up_raddr[13:8] == 6'h00) ? up_rreq : 1'b0; + assign up_wreq_s = (up_waddr[13:8] == ADC_COMMON_ID) ? up_wreq : 1'b0; + assign up_rreq_s = (up_raddr[13:8] == ADC_COMMON_ID) ? up_rreq : 1'b0; // processor write interface diff --git a/library/common/up_dac_channel.v b/library/common/up_dac_channel.v index 24e9437e7..e42f2fc08 100644 --- a/library/common/up_dac_channel.v +++ b/library/common/up_dac_channel.v @@ -90,6 +90,7 @@ module up_dac_channel ( // parameters + parameter DAC_COMMON_ID = 6'h11; parameter DAC_CHANNEL_ID = 4'h0; // dac interface @@ -193,8 +194,8 @@ module up_dac_channel ( // decode block select - assign up_wreq_s = ((up_waddr[13:8] == 6'h11) && (up_waddr[7:4] == DAC_CHANNEL_ID)) ? up_wreq : 1'b0; - assign up_rreq_s = ((up_raddr[13:8] == 6'h11) && (up_raddr[7:4] == DAC_CHANNEL_ID)) ? up_rreq : 1'b0; + assign up_wreq_s = ((up_waddr[13:8] == DAC_COMMON_ID) && (up_waddr[7:4] == DAC_CHANNEL_ID)) ? up_wreq : 1'b0; + assign up_rreq_s = ((up_raddr[13:8] == DAC_COMMON_ID) && (up_raddr[7:4] == DAC_CHANNEL_ID)) ? up_rreq : 1'b0; // processor write interface diff --git a/library/common/up_dac_common.v b/library/common/up_dac_common.v index 2b1f76280..1b6013585 100644 --- a/library/common/up_dac_common.v +++ b/library/common/up_dac_common.v @@ -93,6 +93,7 @@ module up_dac_common ( localparam PCORE_VERSION = 32'h00080062; parameter ID = 0; + parameter DAC_COMMON_ID = 6'h10; // mmcm reset @@ -194,8 +195,8 @@ module up_dac_common ( // decode block select - assign up_wreq_s = (up_waddr[13:8] == 6'h10) ? up_wreq : 1'b0; - assign up_rreq_s = (up_raddr[13:8] == 6'h10) ? up_rreq : 1'b0; + assign up_wreq_s = (up_waddr[13:8] == DAC_COMMON_ID) ? up_wreq : 1'b0; + assign up_rreq_s = (up_raddr[13:8] == DAC_COMMON_ID) ? up_rreq : 1'b0; // processor write interface