Description
No. The
LPM_ROM megafunction must be initialized with a memory initialization file (.mif)
or an Intel hexadecimal file (.hex) which are read during device configuration. Since
FLEX® device LEs initialize to zero after power-up/configuration, the
contents of the initialization file cannot be stored. Therefore, when using LPM_ROM megafunction you must use EABs.
However, users can implement distributed ROM in LEs using an HDL. For example, a 4 x 8 ROM block could be implemented in VHDL as follows:
PROCESS(addr)
BEGIN
CASE addr IS
WHEN "00" =>
q <= X"44";
WHEN "01" =>
q <= X"37";
WHEN "10" =>
q <= X"21";
WHEN "11" =>
q <= X"19";
END CASE;
END PROCESS;