Project

General

Profile

Download (2.47 KB) Statistics
| Branch: | Tag: | Revision:
1

    
2
-- Copyright (C) 2001 Bill Billowitch.
3

    
4
-- Some of the work to develop this test suite was done with Air Force
5
-- support.  The Air Force and Bill Billowitch assume no
6
-- responsibilities for this software.
7

    
8
-- This file is part of VESTs (Vhdl tESTs).
9

    
10
-- VESTs is free software; you can redistribute it and/or modify it
11
-- under the terms of the GNU General Public License as published by the
12
-- Free Software Foundation; either version 2 of the License, or (at
13
-- your option) any later version. 
14

    
15
-- VESTs is distributed in the hope that it will be useful, but WITHOUT
16
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18
-- for more details. 
19

    
20
-- You should have received a copy of the GNU General Public License
21
-- along with VESTs; if not, write to the Free Software Foundation,
22
-- Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
23

    
24
-- ---------------------------------------------------------------------
25
--
26
-- $Id: tc1507.vhd,v 1.2 2001-10-26 16:29:41 paw Exp $
27
-- $Revision: 1.2 $
28
--
29
-- ---------------------------------------------------------------------
30

    
31
ENTITY c08s08b00x00p16n01i01507ent IS
32
END c08s08b00x00p16n01i01507ent;
33

    
34
ARCHITECTURE c08s08b00x00p16n01i01507arch OF c08s08b00x00p16n01i01507ent IS
35

    
36
BEGIN
37
  TESTING: PROCESS
38
    variable s1, s2, s3, s4, s5, s6 : INTEGER := 0;
39
  BEGIN
40

    
41
    for i in 1 to 1000 loop
42
      case i is
43
        when 1 =>                           s1 := s1 + 1;
44
        when 2 | 3 =>                       s2 := s2 + 1;
45
        when 4 to 100 =>                    s3 := s3 + 1;
46
        when 200 to 201 | 300 to 350 =>     s4 := s4 + 1;
47
        when 400 to 450 =>                  s5 := s5 + 1;
48
        when others =>                      s6 := s6 + 1;
49
      end case;
50
    end loop;
51
    wait for 5 ns;
52
    assert NOT(    s1 = 1   and
53
                   s2 = 2   and
54
                   s3 = 97   and
55
                   s4 = 2 + 51   and
56
                   s5 = 51   and
57
                   s6 = 1000 - (s1+s2+s3+s4+s5)   )
58
      report "***PASSED TEST: c08s08b00x00p16n01i01507"
59
      severity NOTE;
60
    assert (    s1 = 1   and
61
                s2 = 2   and
62
                s3 = 97   and
63
                s4 = 2 + 51   and
64
                s5 = 51   and
65
                s6 = 1000 - (s1+s2+s3+s4+s5)   )
66
      report "***FAILED TEST: c08s08b00x00p16n01i01507 - Case statement execution test failed."
67
      severity ERROR;
68
    wait;
69
  END PROCESS TESTING;
70

    
71
END c08s08b00x00p16n01i01507arch;
(202-202/2088)