Forum Discussion
Altera_Forum
Honored Contributor
16 years agoFvM already gave you an alternative solution.
One other solution would be: if (OutputNumber == "000000") then MyVector(37 downto (38-0)) <= Temp(37 downto (38-0)); <- This is wrong because your code was wrong end if (OutputNumber == "000001") then MyVector(37 downto (38-1)) <= Temp(37 downto (38-1)); end if (OutputNumber == "000010") then MyVector(37 downto (38-2)) <= Temp(37 downto (38-2)); end if (OutputNumber == "000011") then MyVector(37 downto (38-3)) <= Temp(37 downto (38-3)); end if (OutputNumber == "000100") then MyVector(37 downto (38-4)) <= Temp(37 downto (38-4)); end ... if (OutputNumber == "01010") then MyVector(37 downto (38-10)) <= Temp(37 downto (38-10)); end There is no need to use conv_integer. And pleas use numeric_std instead of standard_arith