Forum Discussion
Altera_Forum
Honored Contributor
13 years agoROM contents confusion
Hai, I have vhdl code for store a constant in ROM. The ROM is divided into odd and even; ROMO and ROME as shown below:
library IEEE; use IEEE.STD_LOGIC_1164.all; -- use ieee.STD_LOGI...
Altera_Forum
Honored Contributor
13 years agoYou can use the same principle and do the conversion from constant float to integer by doing a multiplication in each assignment, but if you have some time I'd suggest to use the new VHDL fixed point signed type. Then you can directly use those values and your code will be a lot easier to read.
This type isn't officially supported in Quartus yet, but you can use a compatibility library and then use the type in your VHDL files. Have a look at this thread (http://www.alteraforum.com/forum/showthread.php?t=36362) for more information.