fphdl package compilation error in Modelsim

Discussion in 'VHDL' started by vedpsingh@gmail.com, Jul 6, 2005.

  1. Guest

    Hello all,
    I wanted to use fphdl package (www.eda.org/fphdl) in my Modelsim.

    I compiled the folling package files :

    fphdl_real_base_pkg_body
    fixed_pkg
    fp_sin
    fphdl_base_pkg
    fphdl_base_pkg_alg_body
    fphdl32_pkg
    fphdl16_pkg
    fphdl_base_pkg_body
    fphdl32_pkg_body
    fixed_pkg_body
    fphdl16_pkg_body

    After compilation i got errors in two of the packages
    (fphdl32_pkg_body and fphdl16_pkg_body).
    In " fphdl32_pkg_body " i got error messeges like:
    (1) .unknown identifier :fp32
    (2) .function cannot return anonymous subtype
    (3) .attribute range requires an array prefix
    (4) .unknown identifier :floating point

    In " fphdl16_pkg_body " i got error messeges like:
    (1) .unknown identifier :fp16
    (2) .unknown identifier :floating_point
    (3) .unknown identifier :fp_absolute
    (4) .unknown identifier :fp_negative


    Though the fp16 error is vanished by using the ALIAS i.e.

    alias fp16 is fp;

    but how to remove other errors?

    Am i missing something ??

    Thnaks in advance
     
    , Jul 6, 2005
    #1
    1. Advertising

  2. Guest

    Maybe the order of compilation.

    Just compile it again. (?)

    Rgds
    André
     
    , Jul 6, 2005
    #2
    1. Advertising

  3. Guest

    The order of compilation is as follows:

    fixed_pkg
    fixed_pkg_body
    fphdl_base_pkg
    fphdl_base_pkg_body
    fphdl16_pkg
    fphdl16_pkg_body ----does not compile
    fphdl32_pkg
    fphdl32_pkg_body -----does not compile
    fphdl_base_pkg_alg_body

    Reiterating that all packages got compiled other than :

    fphdl16_pkg_body
    fphdl32_pkg_body

    That is body of the two packages does not compile... while their
    headings/declearations part gets compiled.

    A reply from Mr.David Bishop is expected :)

    Regards
    ved



    wrote:
    > Maybe the order of compilation.
    >
    > Just compile it again. (?)
    >
    > Rgds
    > André
     
    , Jul 6, 2005
    #3
  4. Guest

    The problem is solved,

    fphdl16_pkg already contains the body also, so no need to compile
    fphdl16_pkg_body seperately.

    Similarly for fphdl32_pkg.

    Thnaks
    ved



    wrote:
    > The order of compilation is as follows:
    >
    > fixed_pkg
    > fixed_pkg_body
    > fphdl_base_pkg
    > fphdl_base_pkg_body
    > fphdl16_pkg
    > fphdl16_pkg_body ----does not compile
    > fphdl32_pkg
    > fphdl32_pkg_body -----does not compile
    > fphdl_base_pkg_alg_body
    >
    > Reiterating that all packages got compiled other than :
    >
    > fphdl16_pkg_body
    > fphdl32_pkg_body
    >
    > That is body of the two packages does not compile... while their
    > headings/declearations part gets compiled.
    >
    > A reply from Mr.David Bishop is expected :)
    >
    > Regards
    > ved
    >
    >
    >
    > wrote:
    > > Maybe the order of compilation.
    > >
    > > Just compile it again. (?)
    > >
    > > Rgds
    > > André
     
    , Jul 7, 2005
    #4
  5. David Bishop Guest

    I see that somebody already posted a fix, but I'll put my own spin on
    it.

    First, we now have documentation for the fixed and floating point packages:
    http://www.eda.org/vhdl-200x/vhdl-200x-ft/packages/Fixed_ug.pdf
    and
    http://www.eda.org/vhdl-200x/vhdl-200x-ft/packages/Float_ug.pdf

    Also, for VHDL-2002 and VHDL-93 I created special versions of these packages
    which synthesize and simulate without using any of the VHDL-2005 tricks:
    http://www.eda.org/vhdl-200x/vhdl-200x-ft/packages/fixed_pkg_c.vhd
    http://www.eda.org/vhdl-200x/vhdl-200x-ft/packages/fphdl_base_pkg_c.vhd
    These are designed to be compiled into an "IEEE_PROPOSED" library.

    I am in the middle of making some changes to these packages. When I am done,
    the IEEE (IEEE_PROPOSED) library will have the following packages in it:

    fixed_pkg
    float_pkg

    These packages will be instances of "fixed_generic_pkg" and "float_generic_pkg",
    and will look like this (in VHDL-2005):

    library ieee;
    use ieee.std_logic_1164.all;
    use ieee.numeric_std.all;
    use ieee.fixed_pkg.all;

    package float_pkg is new ieee.float_generic_pkg
    generic map (
    fp_round_style => round_nearest; -- round nearest algorithm
    fp_denormalize => true; -- Use IEEE extended floating
    -- point (Denormalized numbers)
    fp_check_error => true; -- Turn on NAN and overflow processing
    fp_guard_bits => 3 -- number of guard bits
    );

    Where the type "float" will need to be constrained by the user. "float32",
    "float64", and "float128" will be predefined. For "fp16" the user will have to say:

    subtype fp16 is float (9 downto -6);

    I will create VHDL-93 compatable versions of these packages, but the
    "fphdl16_pkg" will not be in the next release.
     
    David Bishop, Jul 8, 2005
    #5
    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. Vincent
    Replies:
    3
    Views:
    701
  2. vijay

    VHDL 2005, VHDL93 and FPHDL

    vijay, Sep 16, 2005, in forum: VHDL
    Replies:
    2
    Views:
    627
    Jim Lewis
    Sep 23, 2005
  3. Ved

    Making library for FPHDL

    Ved, May 26, 2006, in forum: VHDL
    Replies:
    4
    Views:
    2,191
    David Bishop
    Jun 5, 2006
  4. Olaf Petzold
    Replies:
    4
    Views:
    1,552
  5. C__chp
    Replies:
    4
    Views:
    544
    Puppet_Sock
    Feb 15, 2008
Loading...

Share This Page