FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-06-2005, 02:17 PM
[email protected]
Guest
 
Posts: n/a
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

Reply With Quote
  #2 (permalink)  
Old 07-06-2005, 05:09 PM
[email protected]
Guest
 
Posts: n/a
Default Re: fphdl package compilation error in Modelsim

Maybe the order of compilation.

Just compile it again. (?)

Rgds
André

Reply With Quote
  #3 (permalink)  
Old 07-06-2005, 07:22 PM
[email protected]
Guest
 
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



[email protected] wrote:
> Maybe the order of compilation.
>
> Just compile it again. (?)
>
> Rgds
> André


Reply With Quote
  #4 (permalink)  
Old 07-07-2005, 08:50 AM
[email protected]
Guest
 
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



[email protected] 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
>
>
>
> [email protected] wrote:
> > Maybe the order of compilation.
> >
> > Just compile it again. (?)
> >
> > Rgds
> > André


Reply With Quote
  #5 (permalink)  
Old 07-08-2005, 02:53 PM
David Bishop
Guest
 
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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
xilinx ise/edk/modelsim - what does compilation really do? Brad Parker FPGA 2 03-31-2007 01:06 AM
Error 10170 syntax error during compilation Jughead Verilog 3 08-28-2006 08:32 AM
COMPILATION ERROR srinukasam VHDL 1 07-05-2005 03:27 PM
unable to compile fphdl package (www.eda.org/fphdl) [email protected] VHDL 3 06-06-2005 01:20 PM
compilation error with ModelSim Vincent VHDL 3 09-17-2003 03:30 AM


All times are GMT +1. The time now is 02:47 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved