1package ENV is
2
3  procedure STOP (STATUS   : INTEGER);
4  procedure FINISH (STATUS : INTEGER);
5
6  function RESOLUTION_LIMIT return DELAY_LENGTH;
7
8end package ENV;
9library ieee_proposed;
10use ieee_proposed.standard_additions.all;
11package body ENV is
12
13  procedure STOP (STATUS   : INTEGER) is
14  begin
15    report "Procedure STOP called with status: " & INTEGER'image(STATUS)
16      severity failure;
17  end procedure STOP;
18  procedure FINISH (STATUS : INTEGER) is
19  begin
20    report "Procedure FINISH called with status: " & INTEGER'image(STATUS)
21      severity failure;
22  end procedure FINISH;
23
24  constant BASE_TIME_ARRAY : time_vector :=
25    (
26      1 fs, 10 fs, 100 fs,
27      1 ps, 10 ps, 100 ps,
28      1 ns, 10 ns, 100 ns,
29      1 us, 10 us, 100 us,
30      1 ms, 10 ms, 100 ms,
31      1 sec, 10 sec, 100 sec,
32      1 min, 10 min, 100 min,
33      1 hr, 10 hr, 100 hr
34      ) ;
35
36  function RESOLUTION_LIMIT return DELAY_LENGTH is
37  begin
38    for i in BASE_TIME_ARRAY'range loop
39      if BASE_TIME_ARRAY(i) > 0 hr then
40        return BASE_TIME_ARRAY(i);
41      end if;
42    end loop;
43    report "STANDATD.RESOLUTION_LIMIT: Simulator resolution not less than 100 hr"
44      severity failure;
45    return 1 ns;
46  end function RESOLUTION_LIMIT;
47
48end package body ENV;
49