Forum Discussion
Altera_Forum
Honored Contributor
14 years agoonly as guide, not tested
process(data_in)
begin
for i in 0 to 15 loop
if data_in(i) = '0' then
data_out(i*4:i*4+3) <= "0000";
else
data_out(i*4:i*4+3) <= std_logic_vector(to_unsigned(i,4));
end if;
end loop;
end process;