F
fl
Guest
Hi,
When I run a simulation VHDL code, there is a out of range fatal error. The
signal source is from below code. corner0 is 111.5 while DINar_corner is
111.9. The division result should be below 1. Now the console output is:
# ** Note: The value of 'corner0' is 1.119000e+002
# Time: 30 ns Iteration: 3 Instance: /one_realmul0_tb/component1/component_corner1
# ** Note: The value of 'DINar_corner' is 1.115000e+002
# Time: 30 ns Iteration: 3 Instance: /one_realmul0_tb/component1/component_corner1
# ** Note: The value of 'Cout' is -1.000000e+308
# Time: 30 ns Iteration: 3 Instance: /one_realmul0_tb/component1/component_corner1
I think that Cout should be the correct value after the process updates the
signal value. But the other module which accespts Cout of below code, still
sees Cout's value as -1.000000e+308. This results an out of range error.
What is wrong in my code and signal value understanding?
Thanks a lot to you.
..............
p1: process (clk)
variable tmp_XP, tmp_X : real;
begin
if (clk'event and clk = '1') then
if reset = '1' then
ar <= 0.0; ai <= 0.0;
br <= 0.0; bi <= 0.0;
else
if cnt < x"02" then
if cnt = x"00" then
corner0 <= DINar_corner;
elsif abs(corner0) < abs(DINar_corner) then
corner0_q_real <= corner0/DINar_corner;
Cout <= corner0_q_real;
report "The value of 'corner0' is " & real'image(corner0);
report "The value of 'DINar_corner' is " & real'image(DINar_corner);
report "The value of 'Cout' is " & real'image(corner0_q_real);
Sout <= 1;
else
corner0_q_real <= DINar_corner/corner0;
Cout <= corner0_q_real;
report "The value of 'Cout' is " & real'image(corner0_q_real);
Sout <= 0;
end if;
else
corner0_q_real <= DINar_corner/corner0;
end if;
When I run a simulation VHDL code, there is a out of range fatal error. The
signal source is from below code. corner0 is 111.5 while DINar_corner is
111.9. The division result should be below 1. Now the console output is:
# ** Note: The value of 'corner0' is 1.119000e+002
# Time: 30 ns Iteration: 3 Instance: /one_realmul0_tb/component1/component_corner1
# ** Note: The value of 'DINar_corner' is 1.115000e+002
# Time: 30 ns Iteration: 3 Instance: /one_realmul0_tb/component1/component_corner1
# ** Note: The value of 'Cout' is -1.000000e+308
# Time: 30 ns Iteration: 3 Instance: /one_realmul0_tb/component1/component_corner1
I think that Cout should be the correct value after the process updates the
signal value. But the other module which accespts Cout of below code, still
sees Cout's value as -1.000000e+308. This results an out of range error.
What is wrong in my code and signal value understanding?
Thanks a lot to you.
..............
p1: process (clk)
variable tmp_XP, tmp_X : real;
begin
if (clk'event and clk = '1') then
if reset = '1' then
ar <= 0.0; ai <= 0.0;
br <= 0.0; bi <= 0.0;
else
if cnt < x"02" then
if cnt = x"00" then
corner0 <= DINar_corner;
elsif abs(corner0) < abs(DINar_corner) then
corner0_q_real <= corner0/DINar_corner;
Cout <= corner0_q_real;
report "The value of 'corner0' is " & real'image(corner0);
report "The value of 'DINar_corner' is " & real'image(DINar_corner);
report "The value of 'Cout' is " & real'image(corner0_q_real);
Sout <= 1;
else
corner0_q_real <= DINar_corner/corner0;
Cout <= corner0_q_real;
report "The value of 'Cout' is " & real'image(corner0_q_real);
Sout <= 0;
end if;
else
corner0_q_real <= DINar_corner/corner0;
end if;