Forum Discussion
Altera_Forum
Honored Contributor
15 years agoMultiplication by 0,6
Hi i have an input of 8 bits and i need to make a multiplication by 0,6. I doesn't has to be precise so i thaught to do : INPUT * 19 /32 This is not a working code but is displays wh...
Altera_Forum
Honored Contributor
15 years agoI believe the calculation takes one clk cycle even if you use the temporary variable result,
since the last one is a continuous assignment, not clock sensitive. The actual VHDL code could be: multiply_0_6 : process (clk, CAM_DATA) begin if (clk'event and clk='1') then result <= ("0" & CAM_DATA & "0000") + ("0000" & CAM_DATA & "0") + ("00000" & CAM_DATA) end if; array_amp_to_find(column_counter) <= result(12 downto 5); end process; (disclaimer: I'm not a VHDL expert, so I don't know if this is the correct syntax and if my code is actually working as supposed)