Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Type declarations

Reply
Thread Tools

Type declarations

 
 
FPGA
Guest
Posts: n/a
 
      01-23-2008
I am trying to use the following function defined in the
ieee_proposed
library

-- to_signed (float)
function to_signed (
arg : UNRESOLVED_float; -- floating point input
constant size : NATURAL; -- length of output
constant check_error : BOOLEAN := float_check_error; -- check
for errors
constant round_style : round_type := float_round_style) --
rounding option
return SIGNED is


I want to test this function. I have given inputs to entity as below


float_in : in std_logic_vector(31 downto 0);
signed_out : out std_logic_vector(63 DOWNTO 0);


I want to try


signed_out <= to_signed(float_in);


Note that the input(arg) to the function to_signed is of type
UNRESOLVED_float. How do i convert this to std_logic_vector.
If i mention the float_in input of type UNRESOLVED_float, it gives me
error : "Unknown identifier: UNRESOLVD_float". This is the same
problem i am having with some of the other functions I am trying to
test.
The type declarations are in the architecture body and NOT BEFORE THE
DECLARATION OF THE ENTITY. How do i fix this problem?


Complete function definition ca be found here
http://www.vhdl.org/vhdl-200x/vhdl-2...oat_pkg_c.vhdl


Thanks


 
Reply With Quote
 
 
 
 
kennheinrich@sympatico.ca
Guest
Posts: n/a
 
      01-23-2008
On Jan 23, 1:53 pm, FPGA <(E-Mail Removed)> wrote:

> If i mention the float_in input of type UNRESOLVED_float, it gives me
> error : "Unknown identifier: UNRESOLVD_float". This is the same


You probably want to include a "use float_pkg.all" or "use
whatever_library.float_pkg.all" before your entity declaration.

Alternatively, it might be a typo: your error message has a mis-
spelling in it.

- Kenn


 
Reply With Quote
 
 
 
 
FPGA
Guest
Posts: n/a
 
      01-23-2008
On Jan 23, 3:56*pm, (E-Mail Removed) wrote:
> On Jan 23, 1:53 pm, FPGA <(E-Mail Removed)> wrote:
>
> > If i mention the float_in input of type UNRESOLVED_float, it gives me
> > error : "Unknown identifier: UNRESOLVD_float". This is the same

>
> You probably want to include a "use float_pkg.all" or "use
> whatever_library.float_pkg.all" before your entity declaration.
>
> Alternatively, it might be a typo: your error message has a mis-
> spelling in it.
>
> *- Kenn


Thanks Kenn
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does using generics complicate the use of interface-type declarations? jan V Java 15 09-12-2005 02:44 AM
question on generics in class type declarations Roger Levy Java 20 01-05-2005 04:07 AM
non-type template args and friend declarations Wolfgang Meyer C++ 1 04-23-2004 11:31 PM
Mangled function type declarations? Marcus Lessard C Programming 1 10-17-2003 10:11 PM
Re: does lack of type declarations make Python unsafe? Mark 'Kamikaze' Hughes Python 4 07-01-2003 04:38 PM



Advertisments