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?.....
> 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
Guest
#2643363
5 bucks for the solution: run
1 | |
in your simulation directory... Duke
says : ''cannot find expanded name "lpm.lpm_components". I've looking on google and apparently i need a folder termed as "220model"?
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;
Guest
#2643451
1 | |
this is the line which causes your error. You should check if you are really using components out of that library.
1 | |
Here is a typo, too!
Guest
#2644134
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
> you have to compile the xilinx libaries Xilinx? LPM are "Megafunctions" from Altera... :-o http://www.altera.com/support/software/eda_maxplus2/synopsys/fpgaex/fpxlpm.html
Guest
#5575281
thanks u
Guest
#5576650
Just for completeness, here is a kind of compxlib for Altera. Stratix IV (Makefile):
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 | |
45 | |
46 | |
47 | |
48 | |
49 | |
50 | |
51 | |
52 | |
53 | |
54 | |
55 | |
56 | |
57 | |
58 | |
59 | |
60 | |
61 | |
62 | |
63 | |
64 | |
65 | |
Reply
Please log in before posting.