Project

General

Profile

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

    
31
Package c09s06b00x00p04n05i01781pkg is
32
  type info is record
33
                 field_1 : integer;
34
                 field_2 : real;
35
               end record;
36
  type stuff is array (Integer range 1 to 2) of info;
37
end c09s06b00x00p04n05i01781pkg;
38

    
39
use work.c09s06b00x00p04n05i01781pkg.all;
40
entity c09s06b00x00p04n05i01781ent_a is
41
  generic (
42
    g0  :   Boolean        ;
43
    g1  :   Bit            ;
44
    g2  :   Character      ;
45
    g3  :   SEVERITY_LEVEL ;
46
    g4  :   Integer        ;
47
    g5  :   Real           ;
48
    g6  :   TIME           ;
49
    g7  :   Natural        ;
50
    g8  :   Positive       ;
51
    g9  :   String         ;
52
    gA  :   Bit_vector     ;
53
    gB  :   stuff
54
    );
55
end c09s06b00x00p04n05i01781ent_a;
56

    
57
use work.c09s06b00x00p04n05i01781pkg.all;
58
architecture c09s06b00x00p04n05i01781arch_a of c09s06b00x00p04n05i01781ent_a is
59
  -- Check that the data was passed...
60
begin
61
  TESTING: PROCESS
62
  BEGIN
63
    assert NOT(   g0 = True                   and 
64
                  g1 = '0'                      and  
65
                  g2 = '@'                      and 
66
                  g3 = NOTE                     and 
67
                  g4 = 123456789                and 
68
                  g5 = 987654321.5              and 
69
                  g6 = 110  ns                   and 
70
                  g7 = 12312                    and 
71
                  g8 = 3423                     and 
72
                  g9 = "16 characters OK"       and 
73
                  gA = B"01010010100101010010101001010100"and 
74
                  gB = ((123, 456.7 ), (890, 135.7))) 
75
      report "***PASSED TEST: c09s06b00x00p04n05i01781"
76
      severity NOTE;
77
    assert (   g0 = True                   and 
78
               g1 = '0'                      and  
79
               g2 = '@'                      and 
80
               g3 = NOTE                     and 
81
               g4 = 123456789                and 
82
               g5 = 987654321.5              and 
83
               g6 = 110  ns                   and 
84
               g7 = 12312                    and 
85
               g8 = 3423                     and 
86
               g9 = "16 characters OK"       and 
87
               gA = B"01010010100101010010101001010100"and 
88
               gB = ((123, 456.7 ), (890, 135.7))) 
89
      report "***FAILED TEST: c09s06b00x00p04n05i01781 - The generic map aspect, if present, should associate a single actual with each local generic in the corresponding component declaration."
90
      severity ERROR;
91
    wait;
92
  END PROCESS TESTING;
93
end c09s06b00x00p04n05i01781arch_a;
94

    
95
-------------------------------------------------------------------------
96

    
97
ENTITY c09s06b00x00p04n05i01781ent IS
98
END c09s06b00x00p04n05i01781ent;
99

    
100
use work.c09s06b00x00p04n05i01781pkg.all;
101
ARCHITECTURE c09s06b00x00p04n05i01781arch OF c09s06b00x00p04n05i01781ent IS
102
  subtype reg32    is Bit_vector ( 31 downto 0 );
103
  subtype string16    is String ( 1 to 16 );
104
  component MultiType
105
    generic (
106
      g0  :   Boolean        ;
107
      g1  :   Bit            ;
108
      g2  :   Character      ;
109
      g3  :   SEVERITY_LEVEL ;
110
      g4  :   Integer        ;
111
      g5  :   Real           ;
112
      g6  :   TIME           ;
113
      g7  :   Natural        ;
114
      g8  :   Positive       ;
115
      g9  :   String         ;
116
      gA  :   Bit_vector     ;
117
      gB  :   stuff
118
      );
119
  end component;
120
  for u1 : MultiType use entity work.c09s06b00x00p04n05i01781ent_a(c09s06b00x00p04n05i01781arch_a);
121

    
122
BEGIN
123
  u1 : MultiType
124
    generic map (
125
      True,
126
      '0',
127
      '@',
128
      NOTE,
129
      123456789,
130
      987654321.5,
131
      110 ns,
132
      12312,
133
      3423,
134
      "16 characters OK",
135
      B"0101_0010_1001_0101_0010_1010_0101_0100",
136
      gB(2) => ( 890, 135.7 ),
137
      gB(1) => ( 123, 456.7 )
138
      );
139

    
140
END c09s06b00x00p04n05i01781arch;
(343-343/2088)