shaiko
Advanced Member level 5
"vector" is a 32 bit wide unsigned input to an entity.
"width_of_vector" is an 8 bit wide unsigned input to the same entity. "width_of_vector" is responsible for setting the dynamic width of "vector".
will the following "LSB first shift right register" synthesize correctly ?
"width_of_vector" is an 8 bit wide unsigned input to the same entity. "width_of_vector" is responsible for setting the dynamic width of "vector".
will the following "LSB first shift right register" synthesize correctly ?
Code:
process ( CLK , RST )
begin
if RST = '1' then
data <= ( others => '0' )
elsif shift = '1' then
data ( to_integer ( width_of_vector ) - 1 downto 0 ) <= data & ( data ( to_integer ( width_of_vector ) - 1 downto 1 ) ) ;
end if ;
end process ;
-- "width_of_vector" isn't a constant! It's an entity input!