Hi,
On the note of lpm_constant... a friendly advice with respect.
For god's sake use inference. Designers now tend to use inference even for large memory blocks. This results in compact, readable, debuggable, time-saving, and portable code.
To use lpm_constant is like going back centuries. I don't know why altera wouldn't remove this nonsense from their list of cores.
I am saying that because I suffered so much when I took over a design and it was having lterally thousands of modules including several instants of lpm-constants and flipflops. I kept swearing at everybody as I was trying to find my way through a "Spaghetti" of connections and portmap of signals with names extending full line.
kaz