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 <lars@metafoo.de>
main
Lars-Peter Clausen 2017-07-31 11:43:22 +02:00
parent 99a08a7b90
commit 97083a9766
1 changed files with 1 additions and 1 deletions

View File

@ -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