Project

General

Profile

Download (2.69 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: tc1386.vhd,v 1.2 2001-10-26 16:29:40 paw Exp $
27
-- $Revision: 1.2 $
28
--
29
-- ---------------------------------------------------------------------
30

    
31
ENTITY c08s05b00x00p03n02i01386ent IS
32
END c08s05b00x00p03n02i01386ent;
33

    
34
ARCHITECTURE c08s05b00x00p03n02i01386arch OF c08s05b00x00p03n02i01386ent IS
35

    
36
BEGIN
37
  TESTING : PROCESS   
38

    
39
    variable radix : natural := 10;
40
    variable v1 : natural;
41

    
42
    type r_array_index_type is range 1 to 3;
43
    type r_array_type is array (r_array_index_type) of natural;
44
    variable r_array : r_array_type;
45

    
46
    procedure set_radix ( constant radix : natural
47
                          ) is
48
    begin
49
      TESTING.radix := radix;             -- test selected name as target
50
    end set_radix;
51

    
52
  BEGIN
53
    v1 := 8;   --test simple name as target
54
    assert v1 = 8
55
      report "Simple name as target failed."
56
      severity note ;
57

    
58
    set_radix (v1);
59
    assert radix = v1
60
      report "Selected name as target failed."
61
      severity note ;
62

    
63
    r_array ( 3 to 3 ) := (3 => 10);          -- test slice name as target
64
    assert r_array ( 3 ) = 10
65
      report "Slice name as target failed."
66
      severity note ;
67

    
68
    r_array ( 2 ) := 8;               -- test indexed name as target
69
    assert r_array ( 2 ) = 8
70
      report "Indexed name as target failed."
71
      severity note ;
72

    
73
    assert NOT(v1=8 and r_array(3)=10 and r_array(2)=8) 
74
      report "***PASSED TEST: c08s05b00x00p03n02i01386" 
75
      severity NOTE;
76
    assert (v1=8 and r_array(3)=10 and r_array(2)=8) 
77
      report "***FAILED TEST: c08s05b00x00p03n02i01386 - The name of thetarget of the variable assignment statement must denote a variable"
78
      severity ERROR;
79
    wait;
80
  END PROCESS TESTING;
81

    
82
END c08s05b00x00p03n02i01386arch;
(163-163/2088)