The "lpm_rom" module (Internal "ROM")


The following is a summary of the parameters and usage of the lpm_rom module:

VHDL Port and Generic Defenition:

COMPONENT lpm_rom
   GENERIC (LPM_WIDTH: POSITIVE;
      LPM_TYPE: STRING := L_ROM;
      LPM_WIDTHAD: POSITIVE;
      LPM_NUMWORDS: STRING := UNUSED;
      LPM_FILE: STRING;
      LPM_ADDRESS_CONTROL: STRING := REGISTERED;
      LPM_OUTDATA: STRING := REGISTERED);
   PORT (address: IN STD_LOGIC_VECTOR(LPM_WIDTHAD-1 DOWNTO 0);
      inclock: IN STD_LOGIC := '1';
      outclock: IN STD_LOGIC := '1';
      memenab: IN STD_LOGIC := '1';
      q: OUT STD_LOGIC_VECTOR(LPM_WIDTH-1 DOWNTO 0));

END COMPONENT;
The Generic Parameters in Detail
LPM_WIDTH (required)
Width of data[] and q[] ports.

LPM_WIDTHAD (required)
Width of the address port.

LPM_NUMWORDS
Size of memory in "words". The default (ie. when not specified) is 2^LPM_WIDTHAD.

LPM_FILE
Name of the Memory Initialization File (.mif) or Hexadecimal (Intel-Format) File (.hex) containing the values in the ROM.

LPM_ADDRESS_CONTROL
"REGISTERED" or "UNREGISTERED". "REGISTERED" means the address must be latched in by the rising edge of inclock. "UNREGISTERD" means the address on the port is used directly in the read operation. The default is "REGISTERED".

LPM_OUTDATA
"REGISTERED" or "UNREGISTERED". Specifies whether the output data must be latched by a rising edge on outclock before it appears at the output data (q) port (registered), or immediately appears on the q port (unregistered). The default is "REGISTERED".


Input Ports:

address[] (required)
Address port (LPM_WIDTHAD bits wide).

inclock (optional but recommended)
For use in synchronous operation, a rising edge on inclock latches in the signal on the address port.

outclock (optional but recommended)
For use in synchronous operation, a rising edge on outclock latches the read value onto the data (q) port.

memenab
Used for tri-state functionality of the q port. A high signal allows the read data to appear on the q port. A low value makes the q port high impedance.


Output Ports:

q[] (required)
Data output (LPM_WIDTH bits wide).



Typical Operation
ROM Timing Diagram



Back to "Memory and the Altera FLEX device: LPM Memory"
Back to "Memory and the Altera FLEX device"
9 April, 1998