I want to declare a 2D array in Verilog, and based on the array's row and column, I will be able to access the values. A warning comes in the console showing one of the input pins not being used.
module maze_init(row,col,dataout,clk,start);
input clk;
input start;
input [2:0]row;
input [2:0]col;
output reg dataout;
//grid initialization placing 1 and 0 to
wire grid[4:0][3:0];
assign grid[0][0]=1;
assign grid[0][1]=0;
assign grid[0][2]=1;
assign grid[0][3]=1;
assign grid[1][0]=0;
assign grid[1][1]=1;
assign grid[1][2]=1;
assign grid[1][3]=0;
assign grid[2][0]=1;
assign grid[2][1]=1;
assign grid[2][2]=0;
assign grid[2][3]=1;
assign grid[3][0]=0;
assign grid[3][1]=1;
assign grid[3][2]=1;
assign grid[3][3]=1;
assign grid[4][0]=1;
assign grid[4][1]=0;
assign grid[4][2]=1;
assign grid[4][3]=1;
always@(posedge clk)begin
if(start) dataout<=grid[row][col];
else dataout<=0;
end
endmodule
Is my array definition being wrong or what?
This is the warning that I receive: