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: tc1782.vhd,v 1.2 2001-10-26 16:29:43 paw Exp $
|
27
|
-- $Revision: 1.2 $
|
28
|
--
|
29
|
-- ---------------------------------------------------------------------
|
30
|
|
31
|
Package c09s06b00x00p04n05i01782pkg 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 c09s06b00x00p04n05i01782pkg;
|
38
|
|
39
|
use work.c09s06b00x00p04n05i01782pkg.all;
|
40
|
entity c09s06b00x00p04n05i01782ent_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 := ((234,567.7),(429,35.7))
|
54
|
);
|
55
|
end c09s06b00x00p04n05i01782ent_a;
|
56
|
|
57
|
use work.c09s06b00x00p04n05i01782pkg.all;
|
58
|
architecture c09s06b00x00p04n05i01782arch_a of c09s06b00x00p04n05i01782ent_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: c09s06b00x00p04n05i01782"
|
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: c09s06b00x00p04n05i01782 - 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 c09s06b00x00p04n05i01782arch_a;
|
94
|
|
95
|
-------------------------------------------------------------------------
|
96
|
|
97
|
ENTITY c09s06b00x00p04n05i01782ent IS
|
98
|
END c09s06b00x00p04n05i01782ent;
|
99
|
|
100
|
|
101
|
use work.c09s06b00x00p04n05i01782pkg.all;
|
102
|
ARCHITECTURE c09s06b00x00p04n05i01782arch OF c09s06b00x00p04n05i01782ent IS
|
103
|
subtype reg32 is Bit_vector ( 31 downto 0 );
|
104
|
subtype string16 is String ( 1 to 16 );
|
105
|
component MultiType
|
106
|
generic (
|
107
|
g0 : Boolean ;
|
108
|
g1 : Bit ;
|
109
|
g2 : Character ;
|
110
|
g3 : SEVERITY_LEVEL ;
|
111
|
g4 : Integer ;
|
112
|
g5 : Real ;
|
113
|
g6 : TIME ;
|
114
|
g7 : Natural ;
|
115
|
g8 : Positive ;
|
116
|
g9 : String ;
|
117
|
gA : Bit_vector ;
|
118
|
gB : stuff :=((123,456.7),(890,135.7)));
|
119
|
end component;
|
120
|
for u1 : MultiType use entity work.c09s06b00x00p04n05i01782ent_a(c09s06b00x00p04n05i01782arch_a);
|
121
|
BEGIN
|
122
|
u1 : MultiType generic map (
|
123
|
True,
|
124
|
'0',
|
125
|
'@',
|
126
|
NOTE,
|
127
|
123456789,
|
128
|
987654321.5,
|
129
|
110 ns,
|
130
|
12312,
|
131
|
3423,
|
132
|
"16 characters OK",
|
133
|
B"0101_0010_1001_0101_0010_1010_0101_0100"
|
134
|
);
|
135
|
|
136
|
END c09s06b00x00p04n05i01782arch;
|