Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   VHDL (http://www.velocityreviews.com/forums/f18-vhdl.html)
-   -   Can real number be synthesized (http://www.velocityreviews.com/forums/t23601-can-real-number-be-synthesized.html)

Kuan Zhou 04-22-2005 04:26 AM

Can real number be synthesized
 
Hi,

The textbook says the real number in the vhdl code can not be
synthesized. Is it correct? The example in the textbook is:

signal x: REAL := 2.5;
Begin
x <= x/3.0;

It says that the Lieteral 'of type REAL' is not supported for
synthesis. If this is true, how to implement real number operations in
vhdl?

Kuan

Mohammed A khader 04-22-2005 09:08 AM

Re: Can real number be synthesized
 
Hi Kuan,

At present tools cannot synthesize real numbers . Normally real
numbers are represented in fixed point format for synthesis.
Fixed point numbers are again represented as std_logic_vector with a
decimal point in between. User is reponsible to know where is the
decimal point and arithmetic operations done on it

There are fixed point packages availabe which does this work for you
but I have not used it yet ..

http://www.eda.org/vhdl-200x/vhdl-20...ges/files.html

Kuan I would suggest you to learn the basics of digital arithmetic
before you implement in hardware.


Phil Tomson 04-23-2005 02:20 AM

Re: Can real number be synthesized
 
In article <1114160911.867234.143460@o13g2000cwo.googlegroups .com>,
Mohammed A khader <am.imak@gmail.com> wrote:
>Hi Kuan,
>
> At present tools cannot synthesize real numbers . Normally real
>numbers are represented in fixed point format for synthesis.
> Fixed point numbers are again represented as std_logic_vector with a
>decimal point in between. User is reponsible to know where is the
>decimal point and arithmetic operations done on it
>
> There are fixed point packages availabe which does this work for you
>but I have not used it yet ..
>
> http://www.eda.org/vhdl-200x/vhdl-20...ges/files.html
>


The fixed_pkg listed on that web page will work fine in simulation and
with many synthesis tools, but be warned: it will not work with Xilinx's
XST synth tools due to a bug in XST (it's not able to handle negative
indices in ranges).

Phil


All times are GMT. The time now is 11:35 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, 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 47 48 49 50 51 52 53 54 55 56 57