Forum Discussion
Altera_Forum
Honored Contributor
13 years agoAre you sure you have copied the code correctly? According to:
http://www.altera.com/support/examples/vhdl/v_testdff.html The LPM component is LPM_FF, not LPM_DFF. A search in my 11.1sp1 installation shows the LPM component (C:\software\altera\11.1sp1\quartus\eda\sim_lib\ 220pack.vhd):
component LPM_FF
generic(LPM_WIDTH : natural; -- MUST be greater than 0
LPM_AVALUE : string := "UNUSED";
LPM_SVALUE : string := "UNUSED";
LPM_PVALUE : string := "UNUSED";
LPM_FFTYPE: string := "DFF";
LPM_TYPE: string := L_FF;
LPM_HINT : string := "UNUSED");
port (DATA : in std_logic_vector(LPM_WIDTH-1 downto 0) := (OTHERS => '1');
CLOCK : in std_logic;
ENABLE : in std_logic := '1';
SLOAD : in std_logic := '0';
SCLR : in std_logic := '0';
SSET : in std_logic := '0';
ALOAD : in std_logic := '0';
ACLR : in std_logic := '0';
ASET : in std_logic := '0';
Q : out std_logic_vector(LPM_WIDTH-1 downto 0));
end component;
The comments in the example code regarding third party tools are incorrect. All tools can use the LPM library. You just need to create the LPM library, or map it to the work library. For example, in Modelsim vlib lpm vmap lpm [pwd]/lpm or vlib work vmap lpm [pwd]/work and then compile the components into that library vcom -work lpm 220pack.vhd vcom -work lpm 220model.vhd Modelsim-ASE already has this library configured with the source built into it. Cheers, Dave