From 7e63113734934c50e61e9bda4370744ac1b7c74e Mon Sep 17 00:00:00 2001 From: Laszlo Nagy Date: Mon, 24 Aug 2020 11:33:59 +0100 Subject: [PATCH] library/common/up_tdd_cntrl: Make address generic --- library/common/up_tdd_cntrl.v | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/common/up_tdd_cntrl.v b/library/common/up_tdd_cntrl.v index 8715ac36f..1fc31ee1a 100644 --- a/library/common/up_tdd_cntrl.v +++ b/library/common/up_tdd_cntrl.v @@ -36,7 +36,9 @@ module up_tdd_cntrl #( - parameter ID = 0) ( + parameter ID = 0, + parameter BASE_ADDRESS = 6'h20 +) ( input clk, input rst, @@ -145,8 +147,8 @@ module up_tdd_cntrl #( // decode block select - assign up_wreq_s = (up_waddr[13:8] == 6'h20) ? up_wreq : 1'b0; - assign up_rreq_s = (up_raddr[13:8] == 6'h20) ? up_rreq : 1'b0; + assign up_wreq_s = (up_waddr[13:8] == BASE_ADDRESS[5:0]) ? up_wreq : 1'b0; + assign up_rreq_s = (up_raddr[13:8] == BASE_ADDRESS[5:0]) ? up_rreq : 1'b0; // processor write interface