Forum Discussion
Altera_Forum
Honored Contributor
18 years agoInferring a ROM
Has anyone used a HEX (Intel format) file to infer a ROM? I'd like to build a look-up table for waveform generation using a 32768 x 16 ROM and would prefer not to type in all of the values manually....
Altera_Forum
Honored Contributor
18 years agoHi Frank, thanks for the info. I like the init function to infer the ROM, but I have one question;
Do you use the same commands in the init version's for loop that was used in the generate version's for loop? Specifically ... FOR idx in 0 TO ROMSIZE-1 CONSTANT x: REAL := SIN(real(idx)*MATH_PI/real(ROMSIZE)); CONSTANT xn: UNSIGNED (NNCO-2 DOWNTO 0) := CONV_UNSIGNED(INTEGER(x*real(ROMMAX)),NNCO-1); Thanks, Brian