Strange error compiling a Package...

Discussion in 'VHDL' started by kwaj, Mar 5, 2004.

  1. kwaj

    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
    kwaj, Mar 5, 2004
    #1
    1. Advertising

  2. 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" <> schreef in bericht
    news:c2b3ss$i2m$...
    > 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
    >
    >
    >
    Egbert Molenkamp, Mar 7, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnab Nandi
    Replies:
    5
    Views:
    2,868
  2. frank
    Replies:
    5
    Views:
    13,566
  3. Garrett Cooper
    Replies:
    0
    Views:
    542
    Garrett Cooper
    Feb 24, 2009
  4. Garrett Cooper
    Replies:
    0
    Views:
    487
    Garrett Cooper
    Feb 24, 2009
  5. Jun W
    Replies:
    2
    Views:
    122
    Marcel Müller
    Dec 9, 2013
Loading...

Share This Page