V
vk
Guest
Hello,
In my design there is a IP core multiplier, which takes two 16 bit
signed integers. Output of multiplier is scaled back to 16 bits. To do
that we force IP core to trim its output to 17 bit. So among them
there will be 2 sign bits and 15 meaningful bits. One sign bit then
dropped. It looks like this:
wire [15:0] m1, m2; // multipliers
wire [15:0] p; // product
wire t; // useless bit
mpy_16_16_17 mpy( .clk(clk), .a(m1), .b(m2), .q({t,p}) );
Synthesis gives a warning that 't' has been assigned a value which is
not used later. I'd like to ask community advice, what is a preferable
practice to drop bit from output and avoid warning.
Perhaps that warning is safe to ignore. But my software experience
tells me that with warning number rise really important ones might be
overlooked. So I'm trying to keep the code as clean as possible.
Thanks in advance.
In my design there is a IP core multiplier, which takes two 16 bit
signed integers. Output of multiplier is scaled back to 16 bits. To do
that we force IP core to trim its output to 17 bit. So among them
there will be 2 sign bits and 15 meaningful bits. One sign bit then
dropped. It looks like this:
wire [15:0] m1, m2; // multipliers
wire [15:0] p; // product
wire t; // useless bit
mpy_16_16_17 mpy( .clk(clk), .a(m1), .b(m2), .q({t,p}) );
Synthesis gives a warning that 't' has been assigned a value which is
not used later. I'd like to ask community advice, what is a preferable
practice to drop bit from output and avoid warning.
Perhaps that warning is safe to ignore. But my software experience
tells me that with warning number rise really important ones might be
overlooked. So I'm trying to keep the code as clean as possible.
Thanks in advance.