blob: 7f9864e304b55f1ca81a58e9a6b92c360bd361b2 (
plain)
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
|
library ieee;
use ieee.math_real.all;
entity mwe is
end entity;
architecture a of mwe is
begin
process
constant hr_real : real := 60.0**2.0;
constant div_real : real := 1.0e-15;
constant expect : real := 3.6e18;
variable got : real;
variable err : real;
begin
got := hr_real/div_real;
err := abs(got-expect);
report "hr_real=" & real'image(hr_real);
assert got = expect
report
"got=" & real'image(got) &LF&
"expect=" & real'image(expect) &LF&
"err=" & real'image(err)
severity error;
wait;
end process;
end;
|