EmbDev.net

Forum: FPGA, VHDL & Verilog Modelsim Vhdl library lpm not found.


Author: nehssen s. (nehsr)
Posted on:

Rate this post
0 useful
not useful
Hello,

When compiling my program, the following error is being printed:
Library lpm not found.

Is there anything i can do to resolve that in modelsim?.....

Author: Lothar M. (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
> When compiling my program
Which one?

Pls read your own post WITHOUT ANY knowledge about your problem. You 
will see: there is not nearly enough information for any hint!

And: do you know Google?
http://www.google.com/search?q=Library+lpm+not+found

Author: Duke Scarring (Guest)
Posted on:

Rate this post
0 useful
not useful
5 bucks for the solution:
run
vlib lpm
in your simulation directory...

Duke

Author: nehssen s. (nehsr)
Posted on:

Rate this post
0 useful
not useful
says : ''cannot find expanded name "lpm.lpm_components".

I've looking on google and apparently i need a folder termed as 
"220model"?

Author: nehssen s. (nehsr)
Posted on:

Rate this post
0 useful
not useful
Here is the code i want to simulate :

LIBRARY lpm;
USE lpm.lpm_components.ALL;

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;

PACKAGE mul_package is -- user defined components
  COMPONENT ccmul
    GENERIC (W2 : INTEGER := 17; --multiplier bit width
              W1 : INTEGER := 9; --bit width C+S SUM
              W   : INTEGER := 8); -- Input bit width

              PORT
              (clk : IN STD_LOGIC; -- clock for the output register
              x_in, y_in, c_in : IN STD_LOGIC_VECTOR(W-1 DOWNTO 0);
              --INPUTS
              cps_in, cms_in : IN STD_LOGIC_VECTOR(W-1 DOWNTO 0);
              --INPUTS
              r_out, i_out : OUT STD_LOGIC_VECTOR(W-1 DOWNTO 0));
              --RESULTS
            END COMPONENT;
          END mul_package;

LIBRARY work;
USE work.mul_package.ALL;

LIBRARY ieee;
USE ieee.std-logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
LIBRARY lpm;
USE lpm.lpm_components.ALL;

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_unsigned.ALL;

ENTITY bfproc IS
  GENERIC ( W2 : INTEGER := 17;  --multiplier bit width
  W1 : INTEGER := 9;
  W : INTEGER := 8);
  PORT
  (clk    :STD_LOGIC;
  Are_in, Aim_in, c_in, --8 bit inputs
  Bre_in, Bim_in : IN STD_LOGIC_VECTOR(W-1 DOWNTO 0);
  cps_in, cms_in : IN STD_LOGIC_VECTOR(W1-1 DOWNTO 0); --9 bits 
coefficients

  Dre_out, Dim_out, --8bit results
  Ere_out , Eim_out : OUT STD_LOGIC_VECTOR(W1 DOWNTO 0));
END bfproc;

ARCHITECTURE flex OF bfproc IS
  SIGNAL dif_re, dif_im         --Bf out
  : STD_LOGIC_VECTOR(W-1 DOWNTO 0);
  SIGNAL Are, Aim, Bre, Bim : integer RANGE -128 TO 127;
  --inputs as integers
  SIGNAL c : STD_LOGIC_VECTOR(W-1 DOWNTO 0);
  --input
  SIGNAL cps, cms : STD_LOGIC_VECTOR(W1 DOWNTO 0);
  --RESULTS

BEGIN
  PROCESS --compute the additions of the butterfly using
    BEGIN -- integers and store inputs in flip flops
      WAIT UNTIL clk = '1';
      Are <= CONV_INTEGER (Are_in);
      Aim <= CONV_INTEGER(Aim_in);
      Bre <= CONV_INTEGER(Bre_in);
      Bim <= CONV_INTEGER(Bim_in);
      c <= c_in; --load from memory cos
      cps <= cps_in; --load from memory cos+sin
      cms <= cms_in; --Load from memory cos-sin
      Dre_out <= CONV_STD_LOGIC VECTOR (Are + Bre )/2, W);
      Dim_out <= CONV_STD_LOGIC_VECTOR(Aim + Bim)/2, W);
    END PROCESS;

    --No FF because butterfly difference ''diff'' is not an output port

    PROCESS (Are, Bre, Aim, Bim)
      BEGIN
        dif_re <= CONV_STD_LOGIC_VECTOR(Are/2 - Bre/2, 8);
        dif_im <= CONV_STD_LOGIC_VECTOR(Aim/2 - Bim/2,8);
      END PROCESS;

Author: enan (Guest)
Posted on:

Rate this post
0 useful
not useful
USE lpm.lpm_components.ALL
this is the line which causes your error. You should check if you are 
really using components out of that library.

Author: Marius W. (mw1987)
Posted on:

Rate this post
0 useful
not useful
USE ieee.std-logic_1164.ALL;

Here is a typo, too!

Author: user (Guest)
Posted on:

Rate this post
0 useful
not useful
you have to compile the xilinx libaries with

compxlib -s mti_pe -f all -l all -o ./

see also:
http://www.xilinx.com/support/answers/15338.htm

Author: Lothar M. (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
> you have to compile the xilinx libaries
Xilinx? LPM are "Megafunctions" from Altera...     :-o
http://www.altera.com/support/software/eda_maxplus...

Author: ahmed (Guest)
Posted on:

Rate this post
0 useful
not useful
thanks u

Author: Duke Scarring (Guest)
Posted on:

Rate this post
0 useful
not useful
Just for completeness, here is a kind of compxlib for Altera. Stratix 
IV (Makefile):
.ONESHELL:
.SILENT:

QUARTUS_PATH = ..
COMPILED_PATH = compiled_libs
FLAGS =  -93  -quiet
VFLAGS = -vlog01compat  -quiet

all: clean build_verilog build_vhdl

build_verilog:
  cd compiled_libs
  vlib altera_ver
  vlib sgate_ver
  vlib lpm_ver
  vlib altera_mf_ver
  vlib stratixiv_ver
  
  vmap altera_ver       ${COMPILED_PATH}/altera_ver
  vmap sgate_ver        ${COMPILED_PATH}/sgate_ver
  vmap lpm_ver          ${COMPILED_PATH}/lpm_ver
  vmap altera_mf_ver    ${COMPILED_PATH}/altera_mf_ver
  vmap stratixiv_ver    ${COMPILED_PATH}/stratixiv_ver

  vlog  ${VFLAGS} -work altera_ver    ${QUARTUS_PATH}/sim_lib/altera_primitives.v
  vlog  ${VFLAGS} -work sgate_ver     ${QUARTUS_PATH}/sim_lib/sgate.v
  vlog  ${VFLAGS} -work lpm_ver       ${QUARTUS_PATH}/sim_lib/220model.v
  vlog  ${VFLAGS} -work altera_mf_ver ${QUARTUS_PATH}/sim_lib/altera_mf.v
  vlog  ${VFLAGS} -work stratixiv_ver ${QUARTUS_PATH}/sim_lib/stratixiv_atoms.v


build_vhdl:  
  cd compiled_libs
  vlib altera
  vlib lpm
  vlib stratixiv

  vmap altera       ${COMPILED_PATH}/altera
  vmap lpm          ${COMPILED_PATH}/lpm
  vmap stratixiv    ${COMPILED_PATH}/stratixiv
  
  vcom ${FLAGS} -work  altera ${QUARTUS_PATH}/sim_lib/altera_primitives_components.vhd
  vcom ${FLAGS} -work  altera ${QUARTUS_PATH}/sim_lib/altera_primitives.vhd

  #vcom ${FLAGS} -work  lpm ${QUARTUS_PATH}/fv_lib/vhdl/lpms/lpm_components.vhd
  #vcom ${FLAGS} -work  lpm ${QUARTUS_PATH}/fv_lib/vhdl/lpms/lpm_and.vhd
  #vcom ${FLAGS} -work  lpm ${QUARTUS_PATH}/fv_lib/vhdl/lpms/lpm_mux.vhd
  #vcom ${FLAGS} -work  lpm ${QUARTUS_PATH}/fv_lib/vhdl/lpms/lpm_or.vhd
  #vcom ${FLAGS} -work  lpm ${QUARTUS_PATH}/fv_lib/vhdl/lpms/lpm_xor.vhd

  vcom ${FLAGS} -work  stratixiv ${QUARTUS_PATH}/fv_lib/vhdl/stratixiv/stratixiv_components.vhd
  vcom ${FLAGS} -work  stratixiv ${QUARTUS_PATH}/sim_lib/stratixiv_atoms.vhd
  vcom ${FLAGS} -work  stratixiv ${QUARTUS_PATH}/sim_lib/stratixiv_components.vhd
  
  
clean:
  /bin/rm -rf  altera
  /bin/rm -rf  lpm
  /bin/rm -rf  stratixiv
  
  /bin/rm -rf altera_ver
  /bin/rm -rf lpm_ver
  /bin/rm -rf sgate_ver
  /bin/rm -rf altera_mf_ver
  /bin/rm -rf stratixiv_ver

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.