I'm trying to make a register array, and want to eliminate a warning. I've created a minimal example design below. Why is part of addr unused?
When I synthesize I get the warning:
WARNING:Xst:647 - Input <addr<3:2>> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved.
module test(addr,in,out,wr,clk);
input [3:0] addr;
input [7:0] in;
output reg [7:0] out;
input wr;
input clk;
reg [7:0] ra [0:3];
always @(posedge clk)
begin
if (wr)
ra[addr] = in;
else
out <= ra[addr];
end
endmodule
I'm trying to make a register that is 8 bits wide with 16 addresses (0-15).