1 |
d93979b7
|
Arnaud Dieumegard
|
|
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: tc1787.vhd,v 1.2 2001-10-26 16:29:43 paw Exp $
|
27 |
|
|
-- $Revision: 1.2 $
|
28 |
|
|
--
|
29 |
|
|
-- ---------------------------------------------------------------------
|
30 |
|
|
|
31 |
|
|
entity c09s06b00x00p04n05i01787ent_a is
|
32 |
|
|
generic (
|
33 |
|
|
g0 : Boolean ;
|
34 |
|
|
g1 : Bit ;
|
35 |
|
|
g2 : Character ;
|
36 |
|
|
g3 : SEVERITY_LEVEL ;
|
37 |
|
|
g4 : Integer ;
|
38 |
|
|
g5 : Real ;
|
39 |
|
|
g6 : TIME ;
|
40 |
|
|
g7 : Natural ;
|
41 |
|
|
g8 : Positive ;
|
42 |
|
|
g9 : String ;
|
43 |
|
|
gA : Bit_vector
|
44 |
|
|
);
|
45 |
|
|
port (
|
46 |
|
|
port0 : out Boolean ;
|
47 |
|
|
port1 : out Bit ;
|
48 |
|
|
port2 : out Character ;
|
49 |
|
|
port3 : out SEVERITY_LEVEL ;
|
50 |
|
|
port4 : out Integer ;
|
51 |
|
|
port5 : out Real ;
|
52 |
|
|
port6 : out TIME ;
|
53 |
|
|
port7 : out Natural ;
|
54 |
|
|
port8 : out Positive ;
|
55 |
|
|
port9 : out String ;
|
56 |
|
|
portA : out Bit_vector
|
57 |
|
|
);
|
58 |
|
|
end c09s06b00x00p04n05i01787ent_a;
|
59 |
|
|
|
60 |
|
|
architecture c09s06b00x00p04n05i01787arch_a of c09s06b00x00p04n05i01787ent_a is
|
61 |
|
|
begin
|
62 |
|
|
port0 <= g0 after 11 ns;
|
63 |
|
|
port1 <= g1 after 11 ns;
|
64 |
|
|
port2 <= g2 after 11 ns;
|
65 |
|
|
port3 <= g3 after 11 ns;
|
66 |
|
|
port4 <= g4 after 11 ns;
|
67 |
|
|
port5 <= g5 after 11 ns;
|
68 |
|
|
port6 <= g6 after 11 ns;
|
69 |
|
|
port7 <= g7 after 11 ns;
|
70 |
|
|
port8 <= g8 after 11 ns;
|
71 |
|
|
port9 <= g9 after 11 ns;
|
72 |
|
|
portA <= gA after 11 ns;
|
73 |
|
|
end c09s06b00x00p04n05i01787arch_a;
|
74 |
|
|
|
75 |
|
|
ENTITY c09s06b00x00p04n05i01787ent IS
|
76 |
|
|
END c09s06b00x00p04n05i01787ent;
|
77 |
|
|
|
78 |
|
|
ARCHITECTURE c09s06b00x00p04n05i01787arch OF c09s06b00x00p04n05i01787ent IS
|
79 |
|
|
component MultiType
|
80 |
|
|
generic (
|
81 |
|
|
g0 : Boolean ;
|
82 |
|
|
g1 : Bit ;
|
83 |
|
|
g2 : Character ;
|
84 |
|
|
g3 : SEVERITY_LEVEL ;
|
85 |
|
|
g4 : Integer ;
|
86 |
|
|
g5 : Real ;
|
87 |
|
|
g6 : TIME ;
|
88 |
|
|
g7 : Natural ;
|
89 |
|
|
g8 : Positive ;
|
90 |
|
|
g9 : String ;
|
91 |
|
|
gA : Bit_vector
|
92 |
|
|
);
|
93 |
|
|
port (
|
94 |
|
|
port0 : out Boolean ;
|
95 |
|
|
port1 : out Bit ;
|
96 |
|
|
port2 : out Character ;
|
97 |
|
|
port3 : out SEVERITY_LEVEL ;
|
98 |
|
|
port4 : out Integer ;
|
99 |
|
|
port5 : out Real ;
|
100 |
|
|
port6 : out TIME ;
|
101 |
|
|
port7 : out Natural ;
|
102 |
|
|
port8 : out Positive ;
|
103 |
|
|
port9 : out String ;
|
104 |
|
|
portA : out Bit_vector
|
105 |
|
|
);
|
106 |
|
|
end component;
|
107 |
|
|
for u1 : MultiType use entity work.c09s06b00x00p04n05i01787ent_a(c09s06b00x00p04n05i01787arch_a);
|
108 |
|
|
|
109 |
|
|
subtype reg32 is Bit_vector ( 31 downto 0 );
|
110 |
|
|
subtype string16 is String ( 1 to 16 );
|
111 |
|
|
|
112 |
|
|
signal signal0 : Boolean ;
|
113 |
|
|
signal signal1 : Bit ;
|
114 |
|
|
signal signal2 : Character ;
|
115 |
|
|
signal signal3 : SEVERITY_LEVEL ;
|
116 |
|
|
signal signal4 : Integer ;
|
117 |
|
|
signal signal5 : Real ;
|
118 |
|
|
signal signal6 : TIME ;
|
119 |
|
|
signal signal7 : Natural ;
|
120 |
|
|
signal signal8 : Positive ;
|
121 |
|
|
signal signal9 : String16 ;
|
122 |
|
|
signal signalA : Reg32 ;
|
123 |
|
|
|
124 |
|
|
|
125 |
|
|
BEGIN
|
126 |
|
|
u1 : MultiType
|
127 |
|
|
generic map (
|
128 |
|
|
True,
|
129 |
|
|
'0',
|
130 |
|
|
'@',
|
131 |
|
|
NOTE,
|
132 |
|
|
123456789,
|
133 |
|
|
987654321.5,
|
134 |
|
|
110 ns,
|
135 |
|
|
12312,
|
136 |
|
|
3423,
|
137 |
|
|
"16 characters OK",
|
138 |
|
|
B"0101_0010_1001_0101_0010_1010_0101_0100"
|
139 |
|
|
)
|
140 |
|
|
port map (
|
141 |
|
|
signal0 ,
|
142 |
|
|
signal1 ,
|
143 |
|
|
signal2 ,
|
144 |
|
|
signal3 ,
|
145 |
|
|
signal4 ,
|
146 |
|
|
signal5 ,
|
147 |
|
|
signal6 ,
|
148 |
|
|
signal7 ,
|
149 |
|
|
signal8 ,
|
150 |
|
|
signal9 ,
|
151 |
|
|
signalA
|
152 |
|
|
);
|
153 |
|
|
|
154 |
|
|
TESTING: PROCESS
|
155 |
|
|
BEGIN
|
156 |
|
|
wait on signal0,signal1,signal2,signal3,signal4,signal5,signal6,signal7,signal8;
|
157 |
|
|
assert NOT( signal0 = True and
|
158 |
|
|
signal1 = '0' and
|
159 |
|
|
signal2 = '@' and
|
160 |
|
|
signal3 = NOTE and
|
161 |
|
|
signal4 = 123456789 and
|
162 |
|
|
signal5 = 987654321.5 and
|
163 |
|
|
signal6 = 110 ns and
|
164 |
|
|
signal7 = 12312 and
|
165 |
|
|
signal8 = 3423 and
|
166 |
|
|
signal9 = "16 characters OK" and
|
167 |
|
|
signalA = B"01010010100101010010101001010100")
|
168 |
|
|
report "***PASSED TEST: c09s06b00x00p04n05i01787"
|
169 |
|
|
severity NOTE;
|
170 |
|
|
assert ( signal0 = True and
|
171 |
|
|
signal1 = '0' and
|
172 |
|
|
signal2 = '@' and
|
173 |
|
|
signal3 = NOTE and
|
174 |
|
|
signal4 = 123456789 and
|
175 |
|
|
signal5 = 987654321.5 and
|
176 |
|
|
signal6 = 110 ns and
|
177 |
|
|
signal7 = 12312 and
|
178 |
|
|
signal8 = 3423 and
|
179 |
|
|
signal9 = "16 characters OK" and
|
180 |
|
|
signalA = B"01010010100101010010101001010100")
|
181 |
|
|
report "***FAILED TEST: c09s06b00x00p04n05i01787 - The generic map aspect, if present, should associate a single actual with each local generic in the corresponding component declaration."
|
182 |
|
|
severity ERROR;
|
183 |
|
|
wait;
|
184 |
|
|
END PROCESS TESTING;
|
185 |
|
|
|
186 |
|
|
END c09s06b00x00p04n05i01787arch;
|