Problem with using Floating Point Package

R

ravi81082

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top