From 97083a9766a66cb9f260b22977ca5955b26626b1 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 31 Jul 2017 11:43:22 +0200 Subject: [PATCH] axi_ad9144: Avoid implicit signal truncation warning The width of a ternary operator expression is the width of the wider of the two selectable expression. This means the right side expression of the tx_data assigment is always 256 bits. This generates an implicit truncating warning if the tx_data signal itself is only 128 bits. To avoid this slightly reformulate the expression to yield the correct width depending on the configuration. Signed-off-by: Lars-Peter Clausen --- library/axi_ad9144/axi_ad9144.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/axi_ad9144/axi_ad9144.v b/library/axi_ad9144/axi_ad9144.v index 04a6e8c35..d7ab7cf1f 100644 --- a/library/axi_ad9144/axi_ad9144.v +++ b/library/axi_ad9144/axi_ad9144.v @@ -135,7 +135,7 @@ module axi_ad9144 #( // dual/quad cores assign tx_valid = 1'b1; - assign tx_data = (QUAD_OR_DUAL_N == 1) ? tx_data_s : tx_data_s[127:0]; + assign tx_data = tx_data_s[(128*QUAD_OR_DUAL_N)+127:0]; // device interface