Problem with using Floating Point Package

Discussion in 'VHDL' started by ravi81082@gmail.com, Oct 30, 2006.

  1. Guest

    Hi all,
    I am using float package of David Bishop.

    I want to see value of -1.5129E-15 i.e. (-1.5129)*10^(-15).

    I have written the program mentioned below.
    Modelsim is returning error saying :
    "Negative exponents not allowed with integers." at the line
    z <= to_float((-1.5129)*10**(-15)) ;

    What is the mistake I am making ?

    Thanks

    Ravinder Chaudhry


    library IEEE,WORK;
    use IEEE.STD_LOGIC_1164.all;
    use IEEE.NUMERIC_STD.all;
    use work.float_pkg.all;

    entity value_test1 is
    port(

    a,b : in float(5 downto -10);
    c : out float(5 downto -10)
    );

    end entity;

    architecture behv of value_test1 is


    signal z : float32;
    begin

    z <= to_float((-1.5129)*10**(-15)) ;


    end behv;

    -- A6DA0829
     
    , Oct 30, 2006
    #1
    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. H aka N
    Replies:
    15
    Views:
    15,724
    Ben Jones
    Mar 2, 2006
  2. Motaz Saad
    Replies:
    7
    Views:
    6,516
  3. kdas
    Replies:
    0
    Views:
    1,648
  4. Saraswati lakki
    Replies:
    0
    Views:
    1,374
    Saraswati lakki
    Jan 6, 2012
  5. teeshift
    Replies:
    2
    Views:
    274
    Chris Pearl
    Dec 1, 2006
Loading...

Share This Page