I have a program with inputs and outputs designated as follows:
module RegBlock(
input [31:0] WriteRegData,
input [4:0] rs, rt, WriteRegIn,
output [31:0] op1, rtData
);
reg [31:0] op1, rtData, data [0:31];
'data [0:31]' is an array that is declared afterwards, and after the declarations I've tried to assign the outputs as follows:
assign op1 = data[rs];
assign rtData = data[rt];
assign data[WriteRegIn] = WriteRegData;
I keep getting an error that "WriteRegData" is not a constant. Since it's just declared as an input in the beginning of the program, I'm not sure what the problem is. I'm using Xilinx ISE.