Strange error compiling a Package...

K

kwaj

I am creating a set of packages to hold a variety of global functions which
I have written. I have also defined a couple of data types to be used by
these packages and saved them in a seperate file named 'signal_type'.
However on compiling the file, the first package compiles OK but the
compiler doesn't recognised one of my defined data types when trying to
compile the second package. An example of the code is below...any help would
be greatly appreciated...

--------------------------------

LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
use IEEE.NUMERIC_STD.ALL;
use ieee.std_logic_textio.all;
use std.textio.all;

--package type contains all the user defined types
use work.signal_type.all;



package FindStdLogic16 is
procedure
fsl16(
signal stdLogicArray16x1024 : in realmatrix16x1024;
signal arraySize : in INTEGER;
signal retOut: out INTEGER
);
end FindStdLogic16;

package body FindStdLogic16 is
procedure
fsl16(
signal stdLogicArray16x1024 : in realmatrix16x1024;
signal arraySize : in INTEGER;
signal retOut: out INTEGER
) is
VARIABLE maxOut: real;
VARIABLE maxPos: INTEGER;
BEGIN
..
..
..
..
end fsl16;
END FindStdLogic16;

package FindStdLogic4 is
procedure
fsl4(
signal stdLogicArray4x1024 : in realmatrix4 x1024; ---
*********************** the compiler spits the dummy right about here
--signal arraySize : in INTEGER;
signal retOut: out INTEGER
);
end FindStdLogic4;
 
E

Egbert Molenkamp

Probably you think that everything that is in the top of the file is known
in the rest of the file.
This is not the case.
In your case the library and use clause are only known within th package
FindStdLogic16.
If you place a copy of them just before the package FindStdLogic4 it will
work.

Egbert Molenkamp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top