MSAKARIM
Full Member level 3
I'm working on SHA512 algorithm and i have some error in this part of code:
Error : (vcom-1147) Range in parameter specification of FOR GENERATE must be static.
Code:
--padding message
mod_val<= (message'length) mod block_size;
padding_length <= ((block_size-129)+(block_size - mod_val));
padded_length <= ( message'length + (1 + padding_length) + length_bits);
message_length <= std_logic_vector(to_unsigned(message'length,length_bits));
padding <= "1" & std_logic_vector(to_unsigned(0,padding_length));
padded_message <= message & padding & message_length;
block_count<= (padded_message'length)/(block_size);
--assigning block to words
Block_loop: for block_number in 1 to block_count generate
block_block <= padded_message(((block_count - block_number) * block_size) - 1 downto (((block_count - (block_number + 1)) * block_size )))
Error : (vcom-1147) Range in parameter specification of FOR GENERATE must be static.