Can real number be synthesized

Discussion in 'VHDL' started by Kuan Zhou, Apr 22, 2005.

  1. Kuan Zhou

    Kuan Zhou Guest

    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
     
    Kuan Zhou, Apr 22, 2005
    #1
    1. Advertising

  2. 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-200x-ft/packages/files.html

    Kuan I would suggest you to learn the basics of digital arithmetic
    before you implement in hardware.
     
    Mohammed A khader, Apr 22, 2005
    #2
    1. Advertising

  3. Kuan Zhou

    Phil Tomson Guest

    In article <>,
    Mohammed A khader <> 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-200x-ft/packages/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
     
    Phil Tomson, Apr 23, 2005
    #3
    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. Aoniti
    Replies:
    1
    Views:
    561
    Mike Treseler
    May 25, 2004
  2. Noohul Ali
    Replies:
    2
    Views:
    2,696
  3. Zenock
    Replies:
    7
    Views:
    9,052
    vipinlal
    Mar 10, 2010
  4. Replies:
    0
    Views:
    309
  5. Replies:
    14
    Views:
    553
Loading...

Share This Page