How can I have an array of constant value or array of parameter? I want to use this array for select the part of an register, so It should be constant. Because I want to assign these parts to the input of a function that is generated in a for loop, I need an array to use index.
This is the part of my code which I have problem with, because in each iteration of i
, I need a new encoderOut
.
generate
for ( i=0; i<row ; i=i+1) begin:hi
for ( j=0; j<column ; j=j+1) begin:ji
oneBitBlock #(choicesBit,selBit,funcBit,funcCount,(j+1)*row-1)U (rst,muxChoices[encoderOut-1:0],gene[pack*(i*row + j) +: encoderOut],gene[pack*(i*row + j)+encoderOut +: encoderOut],gene[pack*(i*row + j)+2*(encoderOut) +: funcBit],out[i*row + j]);
end
end
endgenerate