bigrice911
Member level 3
range must be bounded by constant expressions.
I made a program but when it prompts errors when compile.
Range must be bounded by constant expressions
faint! most verilog compilers do not support this statement!
can anybody give me some hints? thanks!
I made a program but when it prompts errors when compile.
Range must be bounded by constant expressions
Code:
function [8*`w-1:0] cast;
input [`w-1:0] data_i;
input [2:0] addr_i;
integer index;
for(index=0; index<8; index=index+1)
if(addr_i == index)
cast[`w*index+7: `w*index] = data_i; //Range must be bounded by constant expressions
else
cast[`w*index+7: `w*index] = 'bZ;
endfunction
faint! most verilog compilers do not support this statement!
can anybody give me some hints? thanks!