Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - fphdl package compilation error in Modelsim

 
Thread Tools Search this Thread
Old 07-06-2005, 01:17 PM   #1
Default fphdl package compilation error in Modelsim


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



vedpsingh@gmail.com
  Reply With Quote
Old 07-06-2005, 04:09 PM   #2
ALuPin@web.de
 
Posts: n/a
Default Re: fphdl package compilation error in Modelsim
Maybe the order of compilation.

Just compile it again. (?)

Rgds
André



ALuPin@web.de
  Reply With Quote
Old 07-06-2005, 06:22 PM   #3
vedpsingh@gmail.com
 
Posts: n/a
Default Re: fphdl package compilation error in Modelsim
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é




vedpsingh@gmail.com
  Reply With Quote
Old 07-07-2005, 07:50 AM   #4
vedpsingh@gmail.com
 
Posts: n/a
Default Re: fphdl package compilation error in Modelsim
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é




vedpsingh@gmail.com
  Reply With Quote
Old 07-08-2005, 01:53 PM   #5
David Bishop
 
Posts: n/a
Default Re: fphdl package compilation error in Modelsim
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-20...s/Fixed_ug.pdf
and
http://www.eda.org/vhdl-200x/vhdl-20...s/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-20...ixed_pkg_c.vhd
http://www.eda.org/vhdl-200x/vhdl-20...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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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