always @(numint or numfrac)
begin
begin : BIT_DET
for (i=22;i>0;i=i-1)
begin
if (numint[i]==1\'b1)
begin
ieeesi
The error is for [i-1:0]
and [22:i]
. Part-select cannot have a variable range. Bit-select can use a variable. Each bit of ieeemant
needs to be assigned individually.
Change:
ieeemant[22:0] <= { numint[i-1:0] , numfrac[22:i] } ;
to:
for(j=0; j<23; j+=1) begin
ieeemant[j] <= (i+j < 23) ? numfrac[j+i] : numint[j-i];
end