Strange error compiling a Package...

K

kwaj

Guest
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;







--
- Kwaj
 
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

"kwaj" <k.otengNOSPAM@student.unsw.edu.auNOSPAM> schreef in bericht
news:c2b3ss$i2m$2@tomahawk.unsw.edu.au...
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;







--
- Kwaj
 

Welcome to EDABoard.com

Sponsor

Back
Top