1 |
3 |
magro732 |
-------------------------------------------------------------------------------
|
2 |
|
|
--
|
3 |
|
|
-- RapidIO IP Library Core
|
4 |
|
|
--
|
5 |
|
|
-- This file is part of the RapidIO IP library project
|
6 |
|
|
-- http://www.opencores.org/cores/rio/
|
7 |
|
|
--
|
8 |
|
|
-- Description
|
9 |
|
|
-- Contains automatic simulation test code to verify a RioPacketBufferWindow
|
10 |
|
|
-- implementation.
|
11 |
|
|
--
|
12 |
|
|
-- To Do:
|
13 |
|
|
-- -
|
14 |
|
|
--
|
15 |
|
|
-- Author(s):
|
16 |
|
|
-- - Magnus Rosenius, magro732@opencores.org
|
17 |
|
|
--
|
18 |
|
|
-------------------------------------------------------------------------------
|
19 |
|
|
--
|
20 |
|
|
-- Copyright (C) 2013 Authors and OPENCORES.ORG
|
21 |
|
|
--
|
22 |
|
|
-- This source file may be used and distributed without
|
23 |
|
|
-- restriction provided that this copyright statement is not
|
24 |
|
|
-- removed from the file and that any derivative work contains
|
25 |
|
|
-- the original copyright notice and the associated disclaimer.
|
26 |
|
|
--
|
27 |
|
|
-- This source file is free software; you can redistribute it
|
28 |
|
|
-- and/or modify it under the terms of the GNU Lesser General
|
29 |
|
|
-- Public License as published by the Free Software Foundation;
|
30 |
|
|
-- either version 2.1 of the License, or (at your option) any
|
31 |
|
|
-- later version.
|
32 |
|
|
--
|
33 |
|
|
-- This source is distributed in the hope that it will be
|
34 |
|
|
-- useful, but WITHOUT ANY WARRANTY; without even the implied
|
35 |
|
|
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
36 |
|
|
-- PURPOSE. See the GNU Lesser General Public License for more
|
37 |
|
|
-- details.
|
38 |
|
|
--
|
39 |
|
|
-- You should have received a copy of the GNU Lesser General
|
40 |
|
|
-- Public License along with this source; if not, download it
|
41 |
|
|
-- from http://www.opencores.org/lgpl.shtml
|
42 |
|
|
--
|
43 |
|
|
-------------------------------------------------------------------------------
|
44 |
|
|
|
45 |
|
|
-------------------------------------------------------------------------------
|
46 |
|
|
-- TestRioPacketBuffer.
|
47 |
|
|
-------------------------------------------------------------------------------
|
48 |
|
|
|
49 |
|
|
library ieee;
|
50 |
|
|
use ieee.std_logic_1164.all;
|
51 |
|
|
use ieee.numeric_std.all;
|
52 |
|
|
use ieee.math_real.all;
|
53 |
|
|
library std;
|
54 |
|
|
use std.textio.all;
|
55 |
|
|
use work.rio_common.all;
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
-------------------------------------------------------------------------------
|
59 |
|
|
-- Entity for TestRioPacketBuffer.
|
60 |
|
|
-------------------------------------------------------------------------------
|
61 |
|
|
entity TestRioPacketBuffer is
|
62 |
|
|
end entity;
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
-------------------------------------------------------------------------------
|
66 |
|
|
-- Architecture for TestRioPacketBuffer.
|
67 |
|
|
-------------------------------------------------------------------------------
|
68 |
|
|
architecture TestRioPacketBufferImpl of TestRioPacketBuffer is
|
69 |
|
|
|
70 |
|
|
component RioPacketBufferWindow is
|
71 |
|
|
port(
|
72 |
|
|
clk : in std_logic;
|
73 |
|
|
areset_n : in std_logic;
|
74 |
|
|
|
75 |
|
|
inboundWriteFrameFull_o : out std_logic;
|
76 |
|
|
inboundWriteFrame_i : in std_logic;
|
77 |
|
|
inboundWriteFrameAbort_i : in std_logic;
|
78 |
|
|
inboundWriteContent_i : in std_logic;
|
79 |
|
|
inboundWriteContentData_i : in std_logic_vector(31 downto 0);
|
80 |
|
|
inboundReadFrameEmpty_o : out std_logic;
|
81 |
|
|
inboundReadFrame_i : in std_logic;
|
82 |
|
|
inboundReadFrameRestart_i : in std_logic;
|
83 |
|
|
inboundReadFrameAborted_o : out std_logic;
|
84 |
|
|
inboundReadContentEmpty_o : out std_logic;
|
85 |
|
|
inboundReadContent_i : in std_logic;
|
86 |
|
|
inboundReadContentEnd_o : out std_logic;
|
87 |
|
|
inboundReadContentData_o : out std_logic_vector(31 downto 0);
|
88 |
|
|
|
89 |
|
|
outboundWriteFrameFull_o : out std_logic;
|
90 |
|
|
outboundWriteFrame_i : in std_logic;
|
91 |
|
|
outboundWriteFrameAbort_i : in std_logic;
|
92 |
|
|
outboundWriteContent_i : in std_logic;
|
93 |
|
|
outboundWriteContentData_i : in std_logic_vector(31 downto 0);
|
94 |
|
|
outboundReadFrameEmpty_o : out std_logic;
|
95 |
|
|
outboundReadFrame_i : in std_logic;
|
96 |
|
|
outboundReadFrameRestart_i : in std_logic;
|
97 |
|
|
outboundReadFrameAborted_o : out std_logic;
|
98 |
|
|
outboundReadWindowEmpty_o : out std_logic;
|
99 |
|
|
outboundReadWindowReset_i : in std_logic;
|
100 |
|
|
outboundReadWindowNext_i : in std_logic;
|
101 |
|
|
outboundReadContentEmpty_o : out std_logic;
|
102 |
|
|
outboundReadContent_i : in std_logic;
|
103 |
|
|
outboundReadContentEnd_o : out std_logic;
|
104 |
|
|
outboundReadContentData_o : out std_logic_vector(31 downto 0));
|
105 |
|
|
end component;
|
106 |
|
|
|
107 |
|
|
signal clk : std_logic;
|
108 |
|
|
signal areset_n : std_logic;
|
109 |
|
|
|
110 |
|
|
signal inboundWriteFrameFull : std_logic;
|
111 |
|
|
signal inboundWriteFrame : std_logic;
|
112 |
|
|
signal inboundWriteFrameAbort : std_logic;
|
113 |
|
|
signal inboundWriteContent : std_logic;
|
114 |
|
|
signal inboundWriteContentData : std_logic_vector(31 downto 0);
|
115 |
|
|
signal inboundReadFrameEmpty : std_logic;
|
116 |
|
|
signal inboundReadFrame : std_logic;
|
117 |
|
|
signal inboundReadFrameRestart : std_logic;
|
118 |
|
|
signal inboundReadFrameAborted : std_logic;
|
119 |
|
|
signal inboundReadContentEmpty : std_logic;
|
120 |
|
|
signal inboundReadContent : std_logic;
|
121 |
|
|
signal inboundReadContentEnd : std_logic;
|
122 |
|
|
signal inboundReadContentData : std_logic_vector(31 downto 0);
|
123 |
|
|
|
124 |
|
|
signal outboundWriteFrameFull : std_logic;
|
125 |
|
|
signal outboundWriteFrame : std_logic;
|
126 |
|
|
signal outboundWriteFrameAbort : std_logic;
|
127 |
|
|
signal outboundWriteContent : std_logic;
|
128 |
|
|
signal outboundWriteContentData : std_logic_vector(31 downto 0);
|
129 |
|
|
signal outboundReadFrameEmpty : std_logic;
|
130 |
|
|
signal outboundReadFrame : std_logic;
|
131 |
|
|
signal outboundReadFrameRestart : std_logic;
|
132 |
|
|
signal outboundReadFrameAborted : std_logic;
|
133 |
|
|
signal outboundReadWindowEmpty : std_logic;
|
134 |
|
|
signal outboundReadWindowReset : std_logic;
|
135 |
|
|
signal outboundReadWindowNext : std_logic;
|
136 |
|
|
signal outboundReadContentEmpty : std_logic;
|
137 |
|
|
signal outboundReadContent : std_logic;
|
138 |
|
|
signal outboundReadContentEnd : std_logic;
|
139 |
|
|
signal outboundReadContentData : std_logic_vector(31 downto 0);
|
140 |
|
|
|
141 |
|
|
begin
|
142 |
|
|
|
143 |
|
|
-----------------------------------------------------------------------------
|
144 |
|
|
-- Clock generation.
|
145 |
|
|
-----------------------------------------------------------------------------
|
146 |
|
|
ClockGenerator: process
|
147 |
|
|
begin
|
148 |
|
|
clk <= '0';
|
149 |
|
|
wait for 20 ns;
|
150 |
|
|
clk <= '1';
|
151 |
|
|
wait for 20 ns;
|
152 |
|
|
end process;
|
153 |
|
|
|
154 |
|
|
|
155 |
|
|
-----------------------------------------------------------------------------
|
156 |
|
|
-- Test case driver.
|
157 |
|
|
-----------------------------------------------------------------------------
|
158 |
|
|
TestDriver: process
|
159 |
|
|
---------------------------------------------------------------------------
|
160 |
|
|
-- Inbound procedures.
|
161 |
|
|
---------------------------------------------------------------------------
|
162 |
|
|
|
163 |
|
|
procedure SetInboundWriteContent(
|
164 |
|
|
constant content : in std_logic_vector(31 downto 0)) is
|
165 |
|
|
begin
|
166 |
|
|
assert inboundWriteFrameFull = '0'
|
167 |
|
|
report "Inbound frame cannot be accepted." severity error;
|
168 |
|
|
|
169 |
|
|
inboundWriteContent <= '1';
|
170 |
|
|
inboundWriteContentData <= content;
|
171 |
|
|
wait until clk'event and clk = '1';
|
172 |
|
|
wait for 1 ns;
|
173 |
|
|
inboundWriteContent <= '0';
|
174 |
|
|
inboundWriteContentData <= (others=>'U');
|
175 |
|
|
end procedure;
|
176 |
|
|
|
177 |
|
|
procedure SetInboundWriteFrame is
|
178 |
|
|
begin
|
179 |
|
|
inboundWriteFrame <= '1';
|
180 |
|
|
wait until clk'event and clk = '1';
|
181 |
|
|
wait for 1 ns;
|
182 |
|
|
|
183 |
|
|
inboundWriteFrame <= '0';
|
184 |
|
|
end procedure;
|
185 |
|
|
|
186 |
|
|
procedure SetInboundWriteFrameAbort is
|
187 |
|
|
begin
|
188 |
|
|
inboundWriteFrameAbort <= '1';
|
189 |
|
|
wait until clk'event and clk = '1';
|
190 |
|
|
wait for 1 ns;
|
191 |
|
|
|
192 |
|
|
inboundWriteFrameAbort <= '0';
|
193 |
|
|
end procedure;
|
194 |
|
|
|
195 |
|
|
procedure SetInboundReadContent(
|
196 |
|
|
constant content : in std_logic_vector(31 downto 0)) is
|
197 |
|
|
begin
|
198 |
|
|
inboundReadContent <= '1';
|
199 |
|
|
wait until clk'event and clk = '1';
|
200 |
|
|
wait for 1 ns;
|
201 |
|
|
|
202 |
|
|
assert (inboundReadContentData = content)
|
203 |
|
|
report "Unexpected content read." severity error;
|
204 |
|
|
assert (inboundReadContentEnd = '0')
|
205 |
|
|
report "Unexpected content end." severity error;
|
206 |
|
|
|
207 |
|
|
inboundReadContent <= '0';
|
208 |
|
|
end procedure;
|
209 |
|
|
|
210 |
|
|
procedure SetInboundReadContentEnd is
|
211 |
|
|
begin
|
212 |
|
|
inboundReadContent <= '1';
|
213 |
|
|
wait until clk'event and clk = '1';
|
214 |
|
|
wait for 1 ns;
|
215 |
|
|
|
216 |
|
|
assert (inboundReadContentEnd = '1')
|
217 |
|
|
report "Unexpected content end." severity error;
|
218 |
|
|
|
219 |
|
|
inboundReadContent <= '0';
|
220 |
|
|
end procedure;
|
221 |
|
|
|
222 |
|
|
procedure SetInboundReadFrame is
|
223 |
|
|
begin
|
224 |
|
|
assert inboundReadFrameEmpty = '0'
|
225 |
|
|
report "No pending inbound frame to be read." severity error;
|
226 |
|
|
|
227 |
|
|
inboundReadFrame <= '1';
|
228 |
|
|
wait until clk'event and clk = '1';
|
229 |
|
|
wait for 1 ns;
|
230 |
|
|
|
231 |
|
|
inboundReadFrame <= '0';
|
232 |
|
|
end procedure;
|
233 |
|
|
|
234 |
|
|
procedure SetInboundReadFrameRestart is
|
235 |
|
|
begin
|
236 |
|
|
inboundReadFrameRestart <= '1';
|
237 |
|
|
wait until clk'event and clk = '1';
|
238 |
|
|
wait for 1 ns;
|
239 |
|
|
|
240 |
|
|
inboundReadFrameRestart <= '0';
|
241 |
|
|
end procedure;
|
242 |
|
|
|
243 |
|
|
---------------------------------------------------------------------------
|
244 |
|
|
-- Outbound procedures.
|
245 |
|
|
---------------------------------------------------------------------------
|
246 |
|
|
|
247 |
|
|
procedure SetOutboundWriteContent(
|
248 |
|
|
constant content : in std_logic_vector(31 downto 0)) is
|
249 |
|
|
begin
|
250 |
|
|
assert outboundWriteFrameFull = '0'
|
251 |
|
|
report "Outbound frame cannot be accepted." severity error;
|
252 |
|
|
|
253 |
|
|
outboundWriteContent <= '1';
|
254 |
|
|
outboundWriteContentData <= content;
|
255 |
|
|
wait until clk'event and clk = '1';
|
256 |
|
|
wait for 1 ns;
|
257 |
|
|
outboundWriteContent <= '0';
|
258 |
|
|
outboundWriteContentData <= (others=>'U');
|
259 |
|
|
end procedure;
|
260 |
|
|
|
261 |
|
|
procedure SetOutboundWriteFrame is
|
262 |
|
|
begin
|
263 |
|
|
assert outboundWriteFrameFull = '0'
|
264 |
|
|
report "Outbound frame cannot be accepted." severity error;
|
265 |
|
|
|
266 |
|
|
outboundWriteFrame <= '1';
|
267 |
|
|
wait until clk'event and clk = '1';
|
268 |
|
|
wait for 1 ns;
|
269 |
|
|
|
270 |
|
|
outboundWriteFrame <= '0';
|
271 |
|
|
end procedure;
|
272 |
|
|
|
273 |
|
|
procedure SetOutboundWriteFrameAbort is
|
274 |
|
|
begin
|
275 |
|
|
outboundWriteFrameAbort <= '1';
|
276 |
|
|
wait until clk'event and clk = '1';
|
277 |
|
|
wait for 1 ns;
|
278 |
|
|
|
279 |
|
|
outboundWriteFrameAbort <= '0';
|
280 |
|
|
end procedure;
|
281 |
|
|
|
282 |
|
|
procedure SetOutboundReadContent(
|
283 |
|
|
constant content : in std_logic_vector(31 downto 0)) is
|
284 |
|
|
begin
|
285 |
|
|
outboundReadContent <= '1';
|
286 |
|
|
wait until clk'event and clk = '1';
|
287 |
|
|
wait for 1 ns;
|
288 |
|
|
|
289 |
|
|
assert (outboundReadContentData = content)
|
290 |
|
|
report "Unexpected content read." severity error;
|
291 |
|
|
assert (outboundReadContentEnd = '0')
|
292 |
|
|
report "Unexpected content end." severity error;
|
293 |
|
|
|
294 |
|
|
outboundReadContent <= '0';
|
295 |
|
|
end procedure;
|
296 |
|
|
|
297 |
|
|
procedure SetOutboundReadContentEnd is
|
298 |
|
|
begin
|
299 |
|
|
outboundReadContent <= '1';
|
300 |
|
|
wait until clk'event and clk = '1';
|
301 |
|
|
wait for 1 ns;
|
302 |
|
|
|
303 |
|
|
assert (outboundReadContentEnd = '1')
|
304 |
|
|
report "Unexpected content end." severity error;
|
305 |
|
|
|
306 |
|
|
outboundReadContent <= '0';
|
307 |
|
|
end procedure;
|
308 |
|
|
|
309 |
|
|
procedure SetOutboundReadFrame is
|
310 |
|
|
begin
|
311 |
|
|
assert outboundReadFrameEmpty = '0'
|
312 |
|
|
report "No pending outbound frame to be read." severity error;
|
313 |
|
|
|
314 |
|
|
outboundReadFrame <= '1';
|
315 |
|
|
wait until clk'event and clk = '1';
|
316 |
|
|
wait for 1 ns;
|
317 |
|
|
|
318 |
|
|
outboundReadFrame <= '0';
|
319 |
|
|
end procedure;
|
320 |
|
|
|
321 |
|
|
procedure SetOutboundReadFrameRestart is
|
322 |
|
|
begin
|
323 |
|
|
outboundReadFrameRestart <= '1';
|
324 |
|
|
wait until clk'event and clk = '1';
|
325 |
|
|
wait for 1 ns;
|
326 |
|
|
|
327 |
|
|
outboundReadFrameRestart <= '0';
|
328 |
|
|
end procedure;
|
329 |
|
|
|
330 |
|
|
procedure SetOutboundReadWindowReset is
|
331 |
|
|
begin
|
332 |
|
|
outboundReadWindowReset <= '1';
|
333 |
|
|
wait until clk'event and clk = '1';
|
334 |
|
|
wait for 1 ns;
|
335 |
|
|
|
336 |
|
|
outboundReadWindowReset <= '0';
|
337 |
|
|
end procedure;
|
338 |
|
|
|
339 |
|
|
procedure SetOutboundReadWindowNext is
|
340 |
|
|
begin
|
341 |
|
|
assert outboundReadWindowEmpty = '0'
|
342 |
|
|
report "No pending outbound window frame to be read." severity error;
|
343 |
|
|
|
344 |
|
|
outboundReadWindowNext <= '1';
|
345 |
|
|
wait until clk'event and clk = '1';
|
346 |
|
|
wait for 1 ns;
|
347 |
|
|
|
348 |
|
|
outboundReadWindowNext <= '0';
|
349 |
|
|
end procedure;
|
350 |
|
|
|
351 |
|
|
begin
|
352 |
|
|
inboundWriteFrame <= '0';
|
353 |
|
|
inboundWriteFrameAbort <= '0';
|
354 |
|
|
inboundWriteContent <= '0';
|
355 |
|
|
inboundWriteContentData <= (others=>'U');
|
356 |
|
|
inboundReadFrame <= '0';
|
357 |
|
|
inboundReadFrameRestart <= '0';
|
358 |
|
|
inboundReadContent <= '0';
|
359 |
|
|
|
360 |
|
|
outboundWriteFrame <= '0';
|
361 |
|
|
outboundWriteFrameAbort <= '0';
|
362 |
|
|
outboundWriteContent <= '0';
|
363 |
|
|
outboundWriteContentData <= (others=>'U');
|
364 |
|
|
outboundReadFrame <= '0';
|
365 |
|
|
outboundReadFrameRestart <= '0';
|
366 |
|
|
outboundReadWindowReset <= '0';
|
367 |
|
|
outboundReadWindowNext <= '0';
|
368 |
|
|
outboundReadContent <= '0';
|
369 |
|
|
|
370 |
|
|
areset_n <= '0';
|
371 |
|
|
wait until clk'event and clk = '1';
|
372 |
|
|
wait until clk'event and clk = '1';
|
373 |
|
|
areset_n <= '1';
|
374 |
|
|
wait until clk'event and clk = '1';
|
375 |
|
|
wait until clk'event and clk = '1';
|
376 |
|
|
|
377 |
|
|
---------------------------------------------------------------------------
|
378 |
|
|
PrintS("-----------------------------------------------------------------");
|
379 |
|
|
PrintS("TG_RioPacketBuffer");
|
380 |
|
|
PrintS("-----------------------------------------------------------------");
|
381 |
|
|
PrintS("TG_RioPacketBuffer-TC1");
|
382 |
|
|
PrintS("Description: Test normal operation without using the window. Only");
|
383 |
|
|
PrintS(" full frames are tested.");
|
384 |
|
|
PrintS("Requirement: XXXXX");
|
385 |
|
|
PrintS("-----------------------------------------------------------------");
|
386 |
|
|
PrintS("Step 1:");
|
387 |
|
|
PrintS("Action: Complete a small frame and read it.");
|
388 |
|
|
PrintS("Result: The read frame should be equal to the one written.");
|
389 |
|
|
---------------------------------------------------------------------------
|
390 |
|
|
PrintR("TG_RioPacketBuffer-TC1-Step1");
|
391 |
|
|
---------------------------------------------------------------------------
|
392 |
|
|
-- REMARK: Update testcases for inbound and outbound...
|
393 |
|
|
|
394 |
|
|
assert (inboundWriteFrameFull = '0')
|
395 |
|
|
report "Unexpected writeFrameFull." severity error;
|
396 |
|
|
assert (inboundReadFrameEmpty = '1')
|
397 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
398 |
|
|
|
399 |
|
|
SetInboundWriteContent(x"deadbeef");
|
400 |
|
|
|
401 |
|
|
assert (inboundWriteFrameFull = '0')
|
402 |
|
|
report "Unexpected writeFrameFull." severity error;
|
403 |
|
|
assert (inboundReadFrameEmpty = '1')
|
404 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
405 |
|
|
|
406 |
|
|
SetInboundWriteFrame;
|
407 |
|
|
|
408 |
|
|
assert (inboundWriteFrameFull = '0')
|
409 |
|
|
report "Unexpected writeFrameFull." severity error;
|
410 |
|
|
assert (inboundReadFrameEmpty = '0')
|
411 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
412 |
|
|
|
413 |
|
|
SetInboundReadContent(x"deadbeef");
|
414 |
|
|
|
415 |
|
|
assert (inboundWriteFrameFull = '0')
|
416 |
|
|
report "Unexpected writeFrameFull." severity error;
|
417 |
|
|
assert (inboundReadFrameEmpty = '0')
|
418 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
419 |
|
|
|
420 |
|
|
SetInboundReadContentEnd;
|
421 |
|
|
|
422 |
|
|
assert (inboundWriteFrameFull = '0')
|
423 |
|
|
report "Unexpected writeFrameFull." severity error;
|
424 |
|
|
assert (inboundReadFrameEmpty = '0')
|
425 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
426 |
|
|
|
427 |
|
|
SetInboundReadFrame;
|
428 |
|
|
|
429 |
|
|
assert (inboundWriteFrameFull = '0')
|
430 |
|
|
report "Unexpected writeFrameFull." severity error;
|
431 |
|
|
assert (inboundReadFrameEmpty = '1')
|
432 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
433 |
|
|
|
434 |
|
|
---------------------------------------------------------------------------
|
435 |
|
|
PrintS("-----------------------------------------------------------------");
|
436 |
|
|
PrintS("Step 2:");
|
437 |
|
|
PrintS("Action: Write a rio maximum size frame and read it.");
|
438 |
|
|
PrintS("Result: The read frame should be equal to the one written.");
|
439 |
|
|
---------------------------------------------------------------------------
|
440 |
|
|
PrintR("TG_RioPacketBuffer-TC1-Step2");
|
441 |
|
|
---------------------------------------------------------------------------
|
442 |
|
|
|
443 |
|
|
for i in 0 to 68 loop
|
444 |
|
|
SetInboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
445 |
|
|
|
446 |
|
|
assert (inboundWriteFrameFull = '0')
|
447 |
|
|
report "Unexpected writeFrameFull." severity error;
|
448 |
|
|
assert (inboundReadFrameEmpty = '1')
|
449 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
450 |
|
|
end loop;
|
451 |
|
|
|
452 |
|
|
SetInboundWriteFrame;
|
453 |
|
|
|
454 |
|
|
assert (inboundWriteFrameFull = '0')
|
455 |
|
|
report "Unexpected writeFrameFull." severity error;
|
456 |
|
|
assert (inboundReadFrameEmpty = '0')
|
457 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
458 |
|
|
|
459 |
|
|
for i in 0 to 68 loop
|
460 |
|
|
SetInboundReadContent(std_logic_vector(to_unsigned(i, 32)));
|
461 |
|
|
|
462 |
|
|
assert (inboundWriteFrameFull = '0')
|
463 |
|
|
report "Unexpected writeFrameFull." severity error;
|
464 |
|
|
assert (inboundReadFrameEmpty = '0')
|
465 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
466 |
|
|
end loop;
|
467 |
|
|
|
468 |
|
|
SetInboundReadContentEnd;
|
469 |
|
|
|
470 |
|
|
assert (inboundWriteFrameFull = '0')
|
471 |
|
|
report "Unexpected writeFrameFull." severity error;
|
472 |
|
|
assert (inboundReadFrameEmpty = '0')
|
473 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
474 |
|
|
|
475 |
|
|
SetInboundReadFrame;
|
476 |
|
|
|
477 |
|
|
assert (inboundWriteFrameFull = '0')
|
478 |
|
|
report "Unexpected writeFrameFull." severity error;
|
479 |
|
|
assert (inboundReadFrameEmpty = '1')
|
480 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
481 |
|
|
|
482 |
|
|
---------------------------------------------------------------------------
|
483 |
|
|
PrintS("-----------------------------------------------------------------");
|
484 |
|
|
PrintS("Step 3:");
|
485 |
|
|
PrintS("Action: Fill the maximum number of small frames without filling ");
|
486 |
|
|
PrintS(" the memory.");
|
487 |
|
|
PrintS("Result: The frame buffer should accept 63 frames.");
|
488 |
|
|
---------------------------------------------------------------------------
|
489 |
|
|
PrintR("TG_RioPacketBuffer-TC1-Step3");
|
490 |
|
|
---------------------------------------------------------------------------
|
491 |
|
|
|
492 |
|
|
---------------------------------------------------------------------------
|
493 |
|
|
-- Write maximum number of frames.
|
494 |
|
|
---------------------------------------------------------------------------
|
495 |
|
|
|
496 |
|
|
for i in 0 to 2 loop
|
497 |
|
|
SetInboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
498 |
|
|
assert (inboundWriteFrameFull = '0')
|
499 |
|
|
report "Unexpected writeFrameFull." severity error;
|
500 |
|
|
assert (inboundReadFrameEmpty = '1')
|
501 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
502 |
|
|
end loop;
|
503 |
|
|
|
504 |
|
|
for j in 1 to 62 loop
|
505 |
|
|
SetInboundWriteFrame;
|
506 |
|
|
assert (inboundWriteFrameFull = '0')
|
507 |
|
|
report "Unexpected writeFrameFull." severity error;
|
508 |
|
|
assert (inboundReadFrameEmpty = '0')
|
509 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
510 |
|
|
|
511 |
|
|
for i in 0 to 2 loop
|
512 |
|
|
SetInboundWriteContent(std_logic_vector(to_unsigned(j+i, 32)));
|
513 |
|
|
|
514 |
|
|
assert (inboundWriteFrameFull = '0')
|
515 |
|
|
report "Unexpected writeFrameFull." severity error;
|
516 |
|
|
assert (inboundReadFrameEmpty = '0')
|
517 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
518 |
|
|
end loop;
|
519 |
|
|
end loop;
|
520 |
|
|
|
521 |
|
|
SetInboundWriteFrame;
|
522 |
|
|
assert (inboundWriteFrameFull = '1')
|
523 |
|
|
report "Unexpected writeFrameFull." severity error;
|
524 |
|
|
assert (inboundReadFrameEmpty = '0')
|
525 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
526 |
|
|
|
527 |
|
|
---------------------------------------------------------------------------
|
528 |
|
|
-- Read the frames written in the above steps.
|
529 |
|
|
---------------------------------------------------------------------------
|
530 |
|
|
|
531 |
|
|
for i in 0 to 2 loop
|
532 |
|
|
SetInboundReadContent(std_logic_vector(to_unsigned(i, 32)));
|
533 |
|
|
|
534 |
|
|
assert (inboundWriteFrameFull = '1')
|
535 |
|
|
report "Unexpected writeFrameFull." severity error;
|
536 |
|
|
assert (inboundReadFrameEmpty = '0')
|
537 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
538 |
|
|
end loop;
|
539 |
|
|
|
540 |
|
|
SetInboundReadContentEnd;
|
541 |
|
|
assert (inboundWriteFrameFull = '1')
|
542 |
|
|
report "Unexpected writeFrameFull." severity error;
|
543 |
|
|
assert (inboundReadFrameEmpty = '0')
|
544 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
545 |
|
|
|
546 |
|
|
for j in 1 to 62 loop
|
547 |
|
|
SetInboundReadFrame;
|
548 |
|
|
assert (inboundWriteFrameFull = '0')
|
549 |
|
|
report "Unexpected writeFrameFull." severity error;
|
550 |
|
|
assert (inboundReadFrameEmpty = '0')
|
551 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
552 |
|
|
|
553 |
|
|
for i in 0 to 2 loop
|
554 |
|
|
SetInboundReadContent(std_logic_vector(to_unsigned(j+i, 32)));
|
555 |
|
|
|
556 |
|
|
assert (inboundWriteFrameFull = '0')
|
557 |
|
|
report "Unexpected writeFrameFull." severity error;
|
558 |
|
|
assert (inboundReadFrameEmpty = '0')
|
559 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
560 |
|
|
end loop;
|
561 |
|
|
|
562 |
|
|
SetInboundReadContentEnd;
|
563 |
|
|
assert (inboundWriteFrameFull = '0')
|
564 |
|
|
report "Unexpected writeFrameFull." severity error;
|
565 |
|
|
assert (inboundReadFrameEmpty = '0')
|
566 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
567 |
|
|
end loop;
|
568 |
|
|
|
569 |
|
|
SetInboundReadFrame;
|
570 |
|
|
assert (inboundWriteFrameFull = '0')
|
571 |
|
|
report "Unexpected writeFrameFull." severity error;
|
572 |
|
|
assert (inboundReadFrameEmpty = '1')
|
573 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
574 |
|
|
|
575 |
|
|
---------------------------------------------------------------------------
|
576 |
|
|
PrintS("-----------------------------------------------------------------");
|
577 |
|
|
PrintS("Step 4:");
|
578 |
|
|
PrintS("Action: Fill the memory to its limit.");
|
579 |
|
|
PrintS("Result: The frame buffer should accept 255-69 words.");
|
580 |
|
|
---------------------------------------------------------------------------
|
581 |
|
|
PrintR("TG_RioPacketBuffer-TC1-Step4");
|
582 |
|
|
---------------------------------------------------------------------------
|
583 |
|
|
|
584 |
|
|
for i in 0 to 186 loop
|
585 |
|
|
SetInboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
586 |
|
|
assert (inboundWriteFrameFull = '0')
|
587 |
|
|
report "Unexpected writeFrameFull." severity error;
|
588 |
|
|
assert (inboundReadFrameEmpty = '1')
|
589 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
590 |
|
|
end loop;
|
591 |
|
|
|
592 |
|
|
SetInboundWriteFrame;
|
593 |
|
|
assert (inboundWriteFrameFull = '1')
|
594 |
|
|
report "Unexpected writeFrameFull." severity error;
|
595 |
|
|
assert (inboundReadFrameEmpty = '0')
|
596 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
597 |
|
|
|
598 |
|
|
---------------------------------------------------------------------------
|
599 |
|
|
|
600 |
|
|
for i in 0 to 186 loop
|
601 |
|
|
SetInboundReadContent(std_logic_vector(to_unsigned(i, 32)));
|
602 |
|
|
|
603 |
|
|
assert (inboundWriteFrameFull = '1')
|
604 |
|
|
report "Unexpected writeFrameFull." severity error;
|
605 |
|
|
assert (inboundReadFrameEmpty = '0')
|
606 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
607 |
|
|
end loop;
|
608 |
|
|
|
609 |
|
|
SetInboundReadContentEnd;
|
610 |
|
|
assert (inboundWriteFrameFull = '1')
|
611 |
|
|
report "Unexpected writeFrameFull." severity error;
|
612 |
|
|
assert (inboundReadFrameEmpty = '0')
|
613 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
614 |
|
|
|
615 |
|
|
SetInboundReadFrame;
|
616 |
|
|
assert (inboundWriteFrameFull = '0')
|
617 |
|
|
report "Unexpected writeFrameFull." severity error;
|
618 |
|
|
assert (inboundReadFrameEmpty = '1')
|
619 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
620 |
|
|
|
621 |
|
|
---------------------------------------------------------------------------
|
622 |
|
|
PrintS("-----------------------------------------------------------------");
|
623 |
|
|
PrintS("TG_RioPacketBuffer-TC2");
|
624 |
|
|
PrintS("Description: Test operation when using the window.");
|
625 |
|
|
PrintS("Requirement: XXXXX");
|
626 |
|
|
PrintS("-----------------------------------------------------------------");
|
627 |
|
|
PrintS("Step 1:");
|
628 |
|
|
PrintS("Action: Add one frame and update the window.");
|
629 |
|
|
PrintS("Result: The window empty flag and the read frame empty flag should");
|
630 |
|
|
PrintS(" be updated and it should be possible to read the frame again.");
|
631 |
|
|
---------------------------------------------------------------------------
|
632 |
|
|
PrintR("TG_RioPacketBuffer-TC2-Step1");
|
633 |
|
|
---------------------------------------------------------------------------
|
634 |
|
|
|
635 |
|
|
assert (outboundWriteFrameFull = '0')
|
636 |
|
|
report "Unexpected writeFrameFull." severity error;
|
637 |
|
|
assert (outboundReadFrameEmpty = '1')
|
638 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
639 |
|
|
assert (outboundReadWindowEmpty = '1')
|
640 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
641 |
|
|
|
642 |
|
|
for i in 0 to 2 loop
|
643 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
644 |
|
|
assert (outboundWriteFrameFull = '0')
|
645 |
|
|
report "Unexpected writeFrameFull." severity error;
|
646 |
|
|
assert (outboundReadFrameEmpty = '1')
|
647 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
648 |
|
|
assert (outboundReadWindowEmpty = '1')
|
649 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
650 |
|
|
end loop;
|
651 |
|
|
|
652 |
|
|
SetOutboundWriteFrame;
|
653 |
|
|
assert (outboundWriteFrameFull = '0')
|
654 |
|
|
report "Unexpected writeFrameFull." severity error;
|
655 |
|
|
assert (outboundReadFrameEmpty = '0')
|
656 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
657 |
|
|
assert (outboundReadWindowEmpty = '0')
|
658 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
659 |
|
|
|
660 |
|
|
---------------------------------------------------------------------------
|
661 |
|
|
|
662 |
|
|
for i in 0 to 2 loop
|
663 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(i, 32)));
|
664 |
|
|
assert (outboundWriteFrameFull = '0')
|
665 |
|
|
report "Unexpected writeFrameFull." severity error;
|
666 |
|
|
assert (outboundReadFrameEmpty = '0')
|
667 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
668 |
|
|
assert (outboundReadWindowEmpty = '0')
|
669 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
670 |
|
|
end loop;
|
671 |
|
|
|
672 |
|
|
SetOutboundReadContentEnd;
|
673 |
|
|
assert (outboundWriteFrameFull = '0')
|
674 |
|
|
report "Unexpected writeFrameFull." severity error;
|
675 |
|
|
assert (outboundReadFrameEmpty = '0')
|
676 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
677 |
|
|
assert (outboundReadWindowEmpty = '0')
|
678 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
679 |
|
|
|
680 |
|
|
SetOutboundReadWindowReset;
|
681 |
|
|
assert (outboundWriteFrameFull = '0')
|
682 |
|
|
report "Unexpected writeFrameFull." severity error;
|
683 |
|
|
assert (outboundReadFrameEmpty = '0')
|
684 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
685 |
|
|
assert (outboundReadWindowEmpty = '0')
|
686 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
687 |
|
|
|
688 |
|
|
for i in 0 to 2 loop
|
689 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(i, 32)));
|
690 |
|
|
assert (outboundWriteFrameFull = '0')
|
691 |
|
|
report "Unexpected writeFrameFull." severity error;
|
692 |
|
|
assert (outboundReadFrameEmpty = '0')
|
693 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
694 |
|
|
assert (outboundReadWindowEmpty = '0')
|
695 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
696 |
|
|
end loop;
|
697 |
|
|
|
698 |
|
|
SetOutboundReadContentEnd;
|
699 |
|
|
assert (outboundWriteFrameFull = '0')
|
700 |
|
|
report "Unexpected writeFrameFull." severity error;
|
701 |
|
|
assert (outboundReadFrameEmpty = '0')
|
702 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
703 |
|
|
assert (outboundReadWindowEmpty = '0')
|
704 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
705 |
|
|
|
706 |
|
|
SetOutboundReadWindowNext;
|
707 |
|
|
assert (outboundWriteFrameFull = '0')
|
708 |
|
|
report "Unexpected writeFrameFull." severity error;
|
709 |
|
|
assert (outboundReadFrameEmpty = '0')
|
710 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
711 |
|
|
assert (outboundReadWindowEmpty = '1')
|
712 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
713 |
|
|
|
714 |
|
|
SetOutboundReadFrame;
|
715 |
|
|
assert (outboundWriteFrameFull = '0')
|
716 |
|
|
report "Unexpected writeFrameFull." severity error;
|
717 |
|
|
assert (outboundReadFrameEmpty = '1')
|
718 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
719 |
|
|
assert (outboundReadWindowEmpty = '1')
|
720 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
721 |
|
|
|
722 |
|
|
---------------------------------------------------------------------------
|
723 |
|
|
PrintS("-----------------------------------------------------------------");
|
724 |
|
|
PrintS("Step 2:");
|
725 |
|
|
PrintS("Action: Add two frames and test the window accesses.");
|
726 |
|
|
PrintS("Result: .");
|
727 |
|
|
---------------------------------------------------------------------------
|
728 |
|
|
PrintR("TG_RioPacketBuffer-TC2-Step2");
|
729 |
|
|
---------------------------------------------------------------------------
|
730 |
|
|
|
731 |
|
|
---------------------------------------------------------------------------
|
732 |
|
|
-- Write two frames.
|
733 |
|
|
---------------------------------------------------------------------------
|
734 |
|
|
|
735 |
|
|
assert (outboundWriteFrameFull = '0')
|
736 |
|
|
report "Unexpected writeFrameFull." severity error;
|
737 |
|
|
assert (outboundReadFrameEmpty = '1')
|
738 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
739 |
|
|
assert (outboundReadWindowEmpty = '1')
|
740 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
741 |
|
|
|
742 |
|
|
for i in 0 to 2 loop
|
743 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(1+i, 32)));
|
744 |
|
|
assert (outboundWriteFrameFull = '0')
|
745 |
|
|
report "Unexpected writeFrameFull." severity error;
|
746 |
|
|
assert (outboundReadFrameEmpty = '1')
|
747 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
748 |
|
|
assert (outboundReadWindowEmpty = '1')
|
749 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
750 |
|
|
end loop;
|
751 |
|
|
|
752 |
|
|
SetOutboundWriteFrame;
|
753 |
|
|
assert (outboundWriteFrameFull = '0')
|
754 |
|
|
report "Unexpected writeFrameFull." severity error;
|
755 |
|
|
assert (outboundReadFrameEmpty = '0')
|
756 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
757 |
|
|
assert (outboundReadWindowEmpty = '0')
|
758 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
759 |
|
|
|
760 |
|
|
for i in 0 to 2 loop
|
761 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(2+i, 32)));
|
762 |
|
|
assert (outboundWriteFrameFull = '0')
|
763 |
|
|
report "Unexpected writeFrameFull." severity error;
|
764 |
|
|
assert (outboundReadFrameEmpty = '0')
|
765 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
766 |
|
|
assert (outboundReadWindowEmpty = '0')
|
767 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
768 |
|
|
end loop;
|
769 |
|
|
|
770 |
|
|
SetOutboundWriteFrame;
|
771 |
|
|
assert (outboundWriteFrameFull = '0')
|
772 |
|
|
report "Unexpected writeFrameFull." severity error;
|
773 |
|
|
assert (outboundReadFrameEmpty = '0')
|
774 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
775 |
|
|
assert (outboundReadWindowEmpty = '0')
|
776 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
777 |
|
|
|
778 |
|
|
---------------------------------------------------------------------------
|
779 |
|
|
-- Read the frames using the window mechanism.
|
780 |
|
|
---------------------------------------------------------------------------
|
781 |
|
|
|
782 |
|
|
for i in 0 to 2 loop
|
783 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1+i, 32)));
|
784 |
|
|
assert (outboundWriteFrameFull = '0')
|
785 |
|
|
report "Unexpected writeFrameFull." severity error;
|
786 |
|
|
assert (outboundReadFrameEmpty = '0')
|
787 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
788 |
|
|
assert (outboundReadWindowEmpty = '0')
|
789 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
790 |
|
|
end loop;
|
791 |
|
|
|
792 |
|
|
SetOutboundReadContentEnd;
|
793 |
|
|
assert (outboundWriteFrameFull = '0')
|
794 |
|
|
report "Unexpected writeFrameFull." severity error;
|
795 |
|
|
assert (outboundReadFrameEmpty = '0')
|
796 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
797 |
|
|
assert (outboundReadWindowEmpty = '0')
|
798 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
799 |
|
|
|
800 |
|
|
SetOutboundReadWindowNext;
|
801 |
|
|
assert (outboundWriteFrameFull = '0')
|
802 |
|
|
report "Unexpected writeFrameFull." severity error;
|
803 |
|
|
assert (outboundReadFrameEmpty = '0')
|
804 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
805 |
|
|
assert (outboundReadWindowEmpty = '0')
|
806 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
807 |
|
|
|
808 |
|
|
for i in 0 to 2 loop
|
809 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(2+i, 32)));
|
810 |
|
|
assert (outboundWriteFrameFull = '0')
|
811 |
|
|
report "Unexpected writeFrameFull." severity error;
|
812 |
|
|
assert (outboundReadFrameEmpty = '0')
|
813 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
814 |
|
|
assert (outboundReadWindowEmpty = '0')
|
815 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
816 |
|
|
end loop;
|
817 |
|
|
|
818 |
|
|
SetOutboundReadContentEnd;
|
819 |
|
|
assert (outboundWriteFrameFull = '0')
|
820 |
|
|
report "Unexpected writeFrameFull." severity error;
|
821 |
|
|
assert (outboundReadFrameEmpty = '0')
|
822 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
823 |
|
|
assert (outboundReadWindowEmpty = '0')
|
824 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
825 |
|
|
|
826 |
|
|
SetOutboundReadWindowNext;
|
827 |
|
|
assert (outboundWriteFrameFull = '0')
|
828 |
|
|
report "Unexpected writeFrameFull." severity error;
|
829 |
|
|
assert (outboundReadFrameEmpty = '0')
|
830 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
831 |
|
|
assert (outboundReadWindowEmpty = '1')
|
832 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
833 |
|
|
|
834 |
|
|
---------------------------------------------------------------------------
|
835 |
|
|
-- Reset the window and read the frames again.
|
836 |
|
|
---------------------------------------------------------------------------
|
837 |
|
|
|
838 |
|
|
SetOutboundReadWindowReset;
|
839 |
|
|
assert (outboundWriteFrameFull = '0')
|
840 |
|
|
report "Unexpected writeFrameFull." severity error;
|
841 |
|
|
assert (outboundReadFrameEmpty = '0')
|
842 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
843 |
|
|
assert (outboundReadWindowEmpty = '0')
|
844 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
845 |
|
|
|
846 |
|
|
for i in 0 to 2 loop
|
847 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1+i, 32)));
|
848 |
|
|
assert (outboundWriteFrameFull = '0')
|
849 |
|
|
report "Unexpected writeFrameFull." severity error;
|
850 |
|
|
assert (outboundReadFrameEmpty = '0')
|
851 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
852 |
|
|
assert (outboundReadWindowEmpty = '0')
|
853 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
854 |
|
|
end loop;
|
855 |
|
|
|
856 |
|
|
SetOutboundReadContentEnd;
|
857 |
|
|
assert (outboundWriteFrameFull = '0')
|
858 |
|
|
report "Unexpected writeFrameFull." severity error;
|
859 |
|
|
assert (outboundReadFrameEmpty = '0')
|
860 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
861 |
|
|
assert (outboundReadWindowEmpty = '0')
|
862 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
863 |
|
|
|
864 |
|
|
SetOutboundReadWindowNext;
|
865 |
|
|
assert (outboundWriteFrameFull = '0')
|
866 |
|
|
report "Unexpected writeFrameFull." severity error;
|
867 |
|
|
assert (outboundReadFrameEmpty = '0')
|
868 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
869 |
|
|
assert (outboundReadWindowEmpty = '0')
|
870 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
871 |
|
|
|
872 |
|
|
for i in 0 to 2 loop
|
873 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(2+i, 32)));
|
874 |
|
|
assert (outboundWriteFrameFull = '0')
|
875 |
|
|
report "Unexpected writeFrameFull." severity error;
|
876 |
|
|
assert (outboundReadFrameEmpty = '0')
|
877 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
878 |
|
|
assert (outboundReadWindowEmpty = '0')
|
879 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
880 |
|
|
end loop;
|
881 |
|
|
|
882 |
|
|
SetOutboundReadContentEnd;
|
883 |
|
|
assert (outboundWriteFrameFull = '0')
|
884 |
|
|
report "Unexpected writeFrameFull." severity error;
|
885 |
|
|
assert (outboundReadFrameEmpty = '0')
|
886 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
887 |
|
|
assert (outboundReadWindowEmpty = '0')
|
888 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
889 |
|
|
|
890 |
|
|
SetOutboundReadWindowNext;
|
891 |
|
|
assert (outboundWriteFrameFull = '0')
|
892 |
|
|
report "Unexpected writeFrameFull." severity error;
|
893 |
|
|
assert (outboundReadFrameEmpty = '0')
|
894 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
895 |
|
|
assert (outboundReadWindowEmpty = '1')
|
896 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
897 |
|
|
|
898 |
|
|
---------------------------------------------------------------------------
|
899 |
|
|
-- Remove one frame and access the remaining frame.
|
900 |
|
|
---------------------------------------------------------------------------
|
901 |
|
|
SetOutboundReadFrame;
|
902 |
|
|
assert (outboundWriteFrameFull = '0')
|
903 |
|
|
report "Unexpected writeFrameFull." severity error;
|
904 |
|
|
assert (outboundReadFrameEmpty = '0')
|
905 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
906 |
|
|
assert (outboundReadWindowEmpty = '1')
|
907 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
908 |
|
|
|
909 |
|
|
SetOutboundReadWindowReset;
|
910 |
|
|
assert (outboundWriteFrameFull = '0')
|
911 |
|
|
report "Unexpected writeFrameFull." severity error;
|
912 |
|
|
assert (outboundReadFrameEmpty = '0')
|
913 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
914 |
|
|
assert (outboundReadWindowEmpty = '0')
|
915 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
916 |
|
|
|
917 |
|
|
for i in 0 to 2 loop
|
918 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(2+i, 32)));
|
919 |
|
|
assert (outboundWriteFrameFull = '0')
|
920 |
|
|
report "Unexpected writeFrameFull." severity error;
|
921 |
|
|
assert (outboundReadFrameEmpty = '0')
|
922 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
923 |
|
|
assert (outboundReadWindowEmpty = '0')
|
924 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
925 |
|
|
end loop;
|
926 |
|
|
|
927 |
|
|
SetOutboundReadContentEnd;
|
928 |
|
|
assert (outboundWriteFrameFull = '0')
|
929 |
|
|
report "Unexpected writeFrameFull." severity error;
|
930 |
|
|
assert (outboundReadFrameEmpty = '0')
|
931 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
932 |
|
|
assert (outboundReadWindowEmpty = '0')
|
933 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
934 |
|
|
|
935 |
|
|
SetOutboundReadWindowNext;
|
936 |
|
|
assert (outboundWriteFrameFull = '0')
|
937 |
|
|
report "Unexpected writeFrameFull." severity error;
|
938 |
|
|
assert (outboundReadFrameEmpty = '0')
|
939 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
940 |
|
|
assert (outboundReadWindowEmpty = '1')
|
941 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
942 |
|
|
|
943 |
|
|
---------------------------------------------------------------------------
|
944 |
|
|
-- Remove the remaining frame.
|
945 |
|
|
---------------------------------------------------------------------------
|
946 |
|
|
|
947 |
|
|
SetOutboundReadFrame;
|
948 |
|
|
assert (outboundWriteFrameFull = '0')
|
949 |
|
|
report "Unexpected writeFrameFull." severity error;
|
950 |
|
|
assert (outboundReadFrameEmpty = '1')
|
951 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
952 |
|
|
assert (outboundReadWindowEmpty = '1')
|
953 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
954 |
|
|
|
955 |
|
|
SetOutboundReadWindowReset;
|
956 |
|
|
assert (outboundWriteFrameFull = '0')
|
957 |
|
|
report "Unexpected writeFrameFull." severity error;
|
958 |
|
|
assert (outboundReadFrameEmpty = '1')
|
959 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
960 |
|
|
assert (outboundReadWindowEmpty = '1')
|
961 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
962 |
|
|
|
963 |
|
|
---------------------------------------------------------------------------
|
964 |
|
|
PrintS("-----------------------------------------------------------------");
|
965 |
|
|
PrintS("Step 3:");
|
966 |
|
|
PrintS("Action: Add maximum number of frames and test the window accesses.");
|
967 |
|
|
PrintS("Result: The buffer should be full and not accept more frames.");
|
968 |
|
|
---------------------------------------------------------------------------
|
969 |
|
|
PrintR("TG_RioPacketBuffer-TC2-Step3");
|
970 |
|
|
---------------------------------------------------------------------------
|
971 |
|
|
|
972 |
|
|
assert (outboundWriteFrameFull = '0')
|
973 |
|
|
report "Unexpected writeFrameFull." severity error;
|
974 |
|
|
assert (outboundReadFrameEmpty = '1')
|
975 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
976 |
|
|
assert (outboundReadWindowEmpty = '1')
|
977 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
978 |
|
|
|
979 |
|
|
---------------------------------------------------------------------------
|
980 |
|
|
-- Write 3*63 frames => maximum number of frames.
|
981 |
|
|
---------------------------------------------------------------------------
|
982 |
|
|
|
983 |
|
|
for i in 0 to 2 loop
|
984 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
985 |
|
|
assert (outboundWriteFrameFull = '0')
|
986 |
|
|
report "Unexpected writeFrameFull." severity error;
|
987 |
|
|
assert (outboundReadFrameEmpty = '1')
|
988 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
989 |
|
|
assert (outboundReadWindowEmpty = '1')
|
990 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
991 |
|
|
end loop;
|
992 |
|
|
|
993 |
|
|
for j in 1 to 62 loop
|
994 |
|
|
SetOutboundWriteFrame;
|
995 |
|
|
assert (outboundWriteFrameFull = '0')
|
996 |
|
|
report "Unexpected writeFrameFull." severity error;
|
997 |
|
|
assert (outboundReadFrameEmpty = '0')
|
998 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
999 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1000 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1001 |
|
|
|
1002 |
|
|
for i in 0 to 2 loop
|
1003 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(j+i, 32)));
|
1004 |
|
|
assert (outboundWriteFrameFull = '0')
|
1005 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1006 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1007 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1008 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1009 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1010 |
|
|
end loop;
|
1011 |
|
|
end loop;
|
1012 |
|
|
|
1013 |
|
|
SetOutboundWriteFrame;
|
1014 |
|
|
assert (outboundWriteFrameFull = '1')
|
1015 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1016 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1017 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1018 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1019 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1020 |
|
|
|
1021 |
|
|
---------------------------------------------------------------------------
|
1022 |
|
|
-- Read the whole window until it is empty.
|
1023 |
|
|
---------------------------------------------------------------------------
|
1024 |
|
|
|
1025 |
|
|
for j in 0 to 61 loop
|
1026 |
|
|
for i in 0 to 2 loop
|
1027 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(j+i, 32)));
|
1028 |
|
|
assert (outboundWriteFrameFull = '1')
|
1029 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1030 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1031 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1032 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1033 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1034 |
|
|
end loop;
|
1035 |
|
|
|
1036 |
|
|
SetOutboundReadContentEnd;
|
1037 |
|
|
assert (outboundWriteFrameFull = '1')
|
1038 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1039 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1040 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1041 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1042 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1043 |
|
|
|
1044 |
|
|
SetOutboundReadWindowNext;
|
1045 |
|
|
assert (outboundWriteFrameFull = '1')
|
1046 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1047 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1048 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1049 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1050 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1051 |
|
|
end loop;
|
1052 |
|
|
|
1053 |
|
|
for i in 0 to 2 loop
|
1054 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(62+i, 32)));
|
1055 |
|
|
assert (outboundWriteFrameFull = '1')
|
1056 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1057 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1058 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1059 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1060 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1061 |
|
|
end loop;
|
1062 |
|
|
|
1063 |
|
|
SetOutboundReadContentEnd;
|
1064 |
|
|
assert (outboundWriteFrameFull = '1')
|
1065 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1066 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1067 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1068 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1069 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1070 |
|
|
|
1071 |
|
|
SetOutboundReadWindowNext;
|
1072 |
|
|
assert (outboundWriteFrameFull = '1')
|
1073 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1074 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1075 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1076 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1077 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1078 |
|
|
|
1079 |
|
|
---------------------------------------------------------------------------
|
1080 |
|
|
-- Reset the window and remove all frames.
|
1081 |
|
|
---------------------------------------------------------------------------
|
1082 |
|
|
|
1083 |
|
|
SetOutboundReadWindowReset;
|
1084 |
|
|
assert (outboundWriteFrameFull = '1')
|
1085 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1086 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1087 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1088 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1089 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1090 |
|
|
|
1091 |
|
|
for j in 0 to 61 loop
|
1092 |
|
|
SetOutboundReadFrame;
|
1093 |
|
|
assert (outboundWriteFrameFull = '0')
|
1094 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1095 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1096 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1097 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1098 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1099 |
|
|
end loop;
|
1100 |
|
|
|
1101 |
|
|
SetOutboundReadWindowReset;
|
1102 |
|
|
assert (outboundWriteFrameFull = '0')
|
1103 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1104 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1105 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1106 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1107 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1108 |
|
|
|
1109 |
|
|
for i in 0 to 2 loop
|
1110 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(62+i, 32)));
|
1111 |
|
|
assert (outboundWriteFrameFull = '0')
|
1112 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1113 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1114 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1115 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1116 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1117 |
|
|
end loop;
|
1118 |
|
|
|
1119 |
|
|
SetOutboundReadContentEnd;
|
1120 |
|
|
assert (outboundWriteFrameFull = '0')
|
1121 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1122 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1123 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1124 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1125 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1126 |
|
|
|
1127 |
|
|
SetOutboundReadWindowNext;
|
1128 |
|
|
assert (outboundWriteFrameFull = '0')
|
1129 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1130 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1131 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1132 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1133 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1134 |
|
|
|
1135 |
|
|
SetOutboundReadFrame;
|
1136 |
|
|
assert (outboundWriteFrameFull = '0')
|
1137 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1138 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1139 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1140 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1141 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1142 |
|
|
|
1143 |
|
|
---------------------------------------------------------------------------
|
1144 |
|
|
PrintS("-----------------------------------------------------------------");
|
1145 |
|
|
PrintS("Step 4:");
|
1146 |
|
|
PrintS("Action: Add maximum number of words and test the window accesses.");
|
1147 |
|
|
PrintS("Result: The content memory should be full.");
|
1148 |
|
|
---------------------------------------------------------------------------
|
1149 |
|
|
PrintR("TG_RioPacketBuffer-TC2-Step4");
|
1150 |
|
|
---------------------------------------------------------------------------
|
1151 |
|
|
|
1152 |
|
|
assert (outboundWriteFrameFull = '0')
|
1153 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1154 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1155 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1156 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1157 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1158 |
|
|
|
1159 |
|
|
---------------------------------------------------------------------------
|
1160 |
|
|
-- Write 6*31+69=255 words and 7 frames => full content.
|
1161 |
|
|
---------------------------------------------------------------------------
|
1162 |
|
|
|
1163 |
|
|
for i in 0 to 30 loop
|
1164 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
1165 |
|
|
assert (outboundWriteFrameFull = '0')
|
1166 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1167 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1168 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1169 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1170 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1171 |
|
|
end loop;
|
1172 |
|
|
|
1173 |
|
|
for j in 1 to 5 loop
|
1174 |
|
|
SetOutboundWriteFrame;
|
1175 |
|
|
assert (outboundWriteFrameFull = '0')
|
1176 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1177 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1178 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1179 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1180 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1181 |
|
|
|
1182 |
|
|
for i in 0 to 30 loop
|
1183 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(j+i, 32)));
|
1184 |
|
|
assert (outboundWriteFrameFull = '0')
|
1185 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1186 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1187 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1188 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1189 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1190 |
|
|
end loop;
|
1191 |
|
|
end loop;
|
1192 |
|
|
|
1193 |
|
|
SetOutboundWriteFrame;
|
1194 |
|
|
assert (outboundWriteFrameFull = '0')
|
1195 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1196 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1197 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1198 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1199 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1200 |
|
|
|
1201 |
|
|
for i in 0 to 68 loop
|
1202 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(1024+i, 32)));
|
1203 |
|
|
assert (outboundWriteFrameFull = '0')
|
1204 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1205 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1206 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1207 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1208 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1209 |
|
|
end loop;
|
1210 |
|
|
|
1211 |
|
|
SetOutboundWriteFrame;
|
1212 |
|
|
assert (outboundWriteFrameFull = '1')
|
1213 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1214 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1215 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1216 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1217 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1218 |
|
|
|
1219 |
|
|
---------------------------------------------------------------------------
|
1220 |
|
|
-- Read the whole window until it is empty.
|
1221 |
|
|
---------------------------------------------------------------------------
|
1222 |
|
|
|
1223 |
|
|
for j in 0 to 5 loop
|
1224 |
|
|
for i in 0 to 30 loop
|
1225 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(j+i, 32)));
|
1226 |
|
|
assert (outboundWriteFrameFull = '1')
|
1227 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1228 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1229 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1230 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1231 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1232 |
|
|
end loop;
|
1233 |
|
|
|
1234 |
|
|
SetOutboundReadContentEnd;
|
1235 |
|
|
assert (outboundWriteFrameFull = '1')
|
1236 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1237 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1238 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1239 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1240 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1241 |
|
|
|
1242 |
|
|
SetOutboundReadWindowNext;
|
1243 |
|
|
assert (outboundWriteFrameFull = '1')
|
1244 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1245 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1246 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1247 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1248 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1249 |
|
|
end loop;
|
1250 |
|
|
|
1251 |
|
|
for i in 0 to 68 loop
|
1252 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1024+i, 32)));
|
1253 |
|
|
assert (outboundWriteFrameFull = '1')
|
1254 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1255 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1256 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1257 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1258 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1259 |
|
|
end loop;
|
1260 |
|
|
|
1261 |
|
|
SetOutboundReadContentEnd;
|
1262 |
|
|
assert (outboundWriteFrameFull = '1')
|
1263 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1264 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1265 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1266 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1267 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1268 |
|
|
|
1269 |
|
|
SetOutboundReadWindowNext;
|
1270 |
|
|
assert (outboundWriteFrameFull = '1')
|
1271 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1272 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1273 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1274 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1275 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1276 |
|
|
|
1277 |
|
|
---------------------------------------------------------------------------
|
1278 |
|
|
-- Reset the window and remove all frames.
|
1279 |
|
|
---------------------------------------------------------------------------
|
1280 |
|
|
|
1281 |
|
|
SetOutboundReadWindowReset;
|
1282 |
|
|
assert (outboundWriteFrameFull = '1')
|
1283 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1284 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1285 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1286 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1287 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1288 |
|
|
|
1289 |
|
|
for j in 0 to 1 loop
|
1290 |
|
|
SetOutboundReadFrame;
|
1291 |
|
|
assert (outboundWriteFrameFull = '1')
|
1292 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1293 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1294 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1295 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1296 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1297 |
|
|
end loop;
|
1298 |
|
|
|
1299 |
|
|
for j in 2 to 5 loop
|
1300 |
|
|
SetOutboundReadFrame;
|
1301 |
|
|
assert (outboundWriteFrameFull = '0')
|
1302 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1303 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1304 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1305 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1306 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1307 |
|
|
end loop;
|
1308 |
|
|
|
1309 |
|
|
SetOutboundReadWindowReset;
|
1310 |
|
|
assert (outboundWriteFrameFull = '0')
|
1311 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1312 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1313 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1314 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1315 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1316 |
|
|
|
1317 |
|
|
for i in 0 to 68 loop
|
1318 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1024+i, 32)));
|
1319 |
|
|
assert (outboundWriteFrameFull = '0')
|
1320 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1321 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1322 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1323 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1324 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1325 |
|
|
end loop;
|
1326 |
|
|
|
1327 |
|
|
SetOutboundReadContentEnd;
|
1328 |
|
|
assert (outboundWriteFrameFull = '0')
|
1329 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1330 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1331 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1332 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1333 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1334 |
|
|
|
1335 |
|
|
SetOutboundReadWindowNext;
|
1336 |
|
|
assert (outboundWriteFrameFull = '0')
|
1337 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1338 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1339 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1340 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1341 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1342 |
|
|
|
1343 |
|
|
SetOutboundReadFrame;
|
1344 |
|
|
assert (outboundWriteFrameFull = '0')
|
1345 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1346 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1347 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1348 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1349 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1350 |
|
|
|
1351 |
|
|
---------------------------------------------------------------------------
|
1352 |
|
|
PrintS("-----------------------------------------------------------------");
|
1353 |
|
|
PrintS("Step 5:");
|
1354 |
|
|
PrintS("Action: Add maximum number of words -1 and test the window accesses.");
|
1355 |
|
|
PrintS("Result: The content memory should not accept more frames.");
|
1356 |
|
|
---------------------------------------------------------------------------
|
1357 |
|
|
PrintR("TG_RioPacketBuffer-TC2-Step5");
|
1358 |
|
|
---------------------------------------------------------------------------
|
1359 |
|
|
|
1360 |
|
|
assert (outboundWriteFrameFull = '0')
|
1361 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1362 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1363 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1364 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1365 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1366 |
|
|
|
1367 |
|
|
---------------------------------------------------------------------------
|
1368 |
|
|
-- Write 11*17=187 (one full frame will not fit).
|
1369 |
|
|
---------------------------------------------------------------------------
|
1370 |
|
|
|
1371 |
|
|
for i in 0 to 16 loop
|
1372 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
1373 |
|
|
assert (outboundWriteFrameFull = '0')
|
1374 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1375 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1376 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1377 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1378 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1379 |
|
|
end loop;
|
1380 |
|
|
|
1381 |
|
|
for j in 1 to 10 loop
|
1382 |
|
|
SetOutboundWriteFrame;
|
1383 |
|
|
assert (outboundWriteFrameFull = '0')
|
1384 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1385 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1386 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1387 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1388 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1389 |
|
|
|
1390 |
|
|
for i in 0 to 16 loop
|
1391 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(j+i, 32)));
|
1392 |
|
|
assert (outboundWriteFrameFull = '0')
|
1393 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1394 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1395 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1396 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1397 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1398 |
|
|
end loop;
|
1399 |
|
|
end loop;
|
1400 |
|
|
|
1401 |
|
|
SetOutboundWriteFrame;
|
1402 |
|
|
assert (outboundWriteFrameFull = '1')
|
1403 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1404 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1405 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1406 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1407 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1408 |
|
|
|
1409 |
|
|
---------------------------------------------------------------------------
|
1410 |
|
|
-- Reset the window and remove all frames.
|
1411 |
|
|
---------------------------------------------------------------------------
|
1412 |
|
|
|
1413 |
|
|
SetOutboundReadWindowReset;
|
1414 |
|
|
assert (outboundWriteFrameFull = '1')
|
1415 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1416 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1417 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1418 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1419 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1420 |
|
|
|
1421 |
|
|
SetOutboundReadWindowNext;
|
1422 |
|
|
assert (outboundWriteFrameFull = '1')
|
1423 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1424 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1425 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1426 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1427 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1428 |
|
|
|
1429 |
|
|
SetOutboundReadFrame;
|
1430 |
|
|
assert (outboundWriteFrameFull = '0')
|
1431 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1432 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1433 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1434 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1435 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1436 |
|
|
|
1437 |
|
|
for j in 1 to 9 loop
|
1438 |
|
|
SetOutboundReadWindowNext;
|
1439 |
|
|
assert (outboundWriteFrameFull = '0')
|
1440 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1441 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1442 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1443 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1444 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1445 |
|
|
|
1446 |
|
|
SetOutboundReadFrame;
|
1447 |
|
|
assert (outboundWriteFrameFull = '0')
|
1448 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1449 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1450 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1451 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1452 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1453 |
|
|
end loop;
|
1454 |
|
|
|
1455 |
|
|
SetOutboundReadWindowNext;
|
1456 |
|
|
assert (outboundWriteFrameFull = '0')
|
1457 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1458 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1459 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1460 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1461 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1462 |
|
|
|
1463 |
|
|
SetOutboundReadFrame;
|
1464 |
|
|
assert (outboundWriteFrameFull = '0')
|
1465 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1466 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1467 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1468 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1469 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1470 |
|
|
|
1471 |
|
|
---------------------------------------------------------------------------
|
1472 |
|
|
PrintS("-----------------------------------------------------------------");
|
1473 |
|
|
PrintS("Step 6:");
|
1474 |
|
|
PrintS("Action: Add two frames and start reading the second, then remove");
|
1475 |
|
|
PrintS(" the first.");
|
1476 |
|
|
PrintS("Result: The readContentEnd flag should not be changed when frames");
|
1477 |
|
|
PrintS(" are removed.");
|
1478 |
|
|
---------------------------------------------------------------------------
|
1479 |
|
|
PrintR("TG_RioPacketBuffer-TC2-Step6");
|
1480 |
|
|
---------------------------------------------------------------------------
|
1481 |
|
|
|
1482 |
|
|
assert (outboundWriteFrameFull = '0')
|
1483 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1484 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1485 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1486 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1487 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1488 |
|
|
|
1489 |
|
|
---------------------------------------------------------------------------
|
1490 |
|
|
--
|
1491 |
|
|
---------------------------------------------------------------------------
|
1492 |
|
|
|
1493 |
|
|
for i in 0 to 3 loop
|
1494 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
1495 |
|
|
assert (outboundWriteFrameFull = '0')
|
1496 |
|
|
|
1497 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1498 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1499 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1500 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1501 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1502 |
|
|
end loop;
|
1503 |
|
|
|
1504 |
|
|
SetOutboundWriteFrame;
|
1505 |
|
|
assert (outboundWriteFrameFull = '0')
|
1506 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1507 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1508 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1509 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1510 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1511 |
|
|
|
1512 |
|
|
for i in 0 to 3 loop
|
1513 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(i+1, 32)));
|
1514 |
|
|
assert (outboundWriteFrameFull = '0')
|
1515 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1516 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1517 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1518 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1519 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1520 |
|
|
end loop;
|
1521 |
|
|
|
1522 |
|
|
SetOutboundWriteFrame;
|
1523 |
|
|
assert (outboundWriteFrameFull = '0')
|
1524 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1525 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1526 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1527 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1528 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1529 |
|
|
|
1530 |
|
|
---------------------------------------------------------------------------
|
1531 |
|
|
--
|
1532 |
|
|
---------------------------------------------------------------------------
|
1533 |
|
|
|
1534 |
|
|
for i in 0 to 3 loop
|
1535 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(i, 32)));
|
1536 |
|
|
assert (outboundWriteFrameFull = '0')
|
1537 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1538 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1539 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1540 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1541 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1542 |
|
|
end loop;
|
1543 |
|
|
|
1544 |
|
|
SetOutboundReadContentEnd;
|
1545 |
|
|
assert (outboundWriteFrameFull = '0')
|
1546 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1547 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1548 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1549 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1550 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1551 |
|
|
|
1552 |
|
|
SetOutboundReadWindowNext;
|
1553 |
|
|
assert (outboundWriteFrameFull = '0')
|
1554 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1555 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1556 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1557 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1558 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1559 |
|
|
|
1560 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1, 32)));
|
1561 |
|
|
assert (outboundWriteFrameFull = '0')
|
1562 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1563 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1564 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1565 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1566 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1567 |
|
|
|
1568 |
|
|
SetOutboundReadFrame;
|
1569 |
|
|
assert (outboundWriteFrameFull = '0')
|
1570 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1571 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1572 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1573 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1574 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1575 |
|
|
|
1576 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(2, 32)));
|
1577 |
|
|
assert (outboundWriteFrameFull = '0')
|
1578 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1579 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1580 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1581 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1582 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1583 |
|
|
|
1584 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(3, 32)));
|
1585 |
|
|
assert (outboundWriteFrameFull = '0')
|
1586 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1587 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1588 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1589 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1590 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1591 |
|
|
|
1592 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(4, 32)));
|
1593 |
|
|
assert (outboundWriteFrameFull = '0')
|
1594 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1595 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1596 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1597 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1598 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1599 |
|
|
|
1600 |
|
|
SetOutboundReadContentEnd;
|
1601 |
|
|
assert (outboundWriteFrameFull = '0')
|
1602 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1603 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1604 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1605 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1606 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1607 |
|
|
|
1608 |
|
|
SetOutboundReadWindowNext;
|
1609 |
|
|
assert (outboundWriteFrameFull = '0')
|
1610 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1611 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1612 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1613 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1614 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1615 |
|
|
|
1616 |
|
|
SetOutboundReadFrame;
|
1617 |
|
|
assert (outboundWriteFrameFull = '0')
|
1618 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1619 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1620 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1621 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1622 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1623 |
|
|
|
1624 |
|
|
---------------------------------------------------------------------------
|
1625 |
|
|
PrintS("-----------------------------------------------------------------");
|
1626 |
|
|
PrintS("TG_RioPacketBuffer");
|
1627 |
|
|
PrintS("-----------------------------------------------------------------");
|
1628 |
|
|
PrintS("TG_RioPacketBuffer-TC3");
|
1629 |
|
|
PrintS("Description: Test operation when restarting and aborting frames.");
|
1630 |
|
|
PrintS("Requirement: XXXXX");
|
1631 |
|
|
PrintS("-----------------------------------------------------------------");
|
1632 |
|
|
PrintS("Step 1:");
|
1633 |
|
|
PrintS("Action: Write one frame and abort it.");
|
1634 |
|
|
PrintS("Result: The aborted frame should be discarded.");
|
1635 |
|
|
---------------------------------------------------------------------------
|
1636 |
|
|
PrintR("TG_RioPacketBuffer-TC3-Step1");
|
1637 |
|
|
---------------------------------------------------------------------------
|
1638 |
|
|
|
1639 |
|
|
assert (outboundWriteFrameFull = '0')
|
1640 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1641 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1642 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1643 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1644 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1645 |
|
|
|
1646 |
|
|
for i in 0 to 3 loop
|
1647 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(i, 32)));
|
1648 |
|
|
assert (outboundWriteFrameFull = '0')
|
1649 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1650 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1651 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1652 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1653 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1654 |
|
|
end loop;
|
1655 |
|
|
|
1656 |
|
|
SetOutboundWriteFrameAbort;
|
1657 |
|
|
assert (outboundWriteFrameFull = '0')
|
1658 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1659 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1660 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1661 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1662 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1663 |
|
|
|
1664 |
|
|
---------------------------------------------------------------------------
|
1665 |
|
|
PrintS("-----------------------------------------------------------------");
|
1666 |
|
|
PrintS("Step 2:");
|
1667 |
|
|
PrintS("Action: Write one full frame then one more that is aborted.");
|
1668 |
|
|
PrintS("Result: The first frame should remain and the aborted should be ");
|
1669 |
|
|
PrintS(" discarded.");
|
1670 |
|
|
---------------------------------------------------------------------------
|
1671 |
|
|
PrintR("TG_RioPacketBuffer-TC3-Step2");
|
1672 |
|
|
---------------------------------------------------------------------------
|
1673 |
|
|
|
1674 |
|
|
for i in 0 to 3 loop
|
1675 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(1+i, 32)));
|
1676 |
|
|
assert (outboundWriteFrameFull = '0')
|
1677 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1678 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1679 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1680 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1681 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1682 |
|
|
end loop;
|
1683 |
|
|
|
1684 |
|
|
SetOutboundWriteFrame;
|
1685 |
|
|
assert (outboundWriteFrameFull = '0')
|
1686 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1687 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1688 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1689 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1690 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1691 |
|
|
|
1692 |
|
|
for i in 0 to 3 loop
|
1693 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(2+i, 32)));
|
1694 |
|
|
assert (outboundWriteFrameFull = '0')
|
1695 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1696 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1697 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1698 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1699 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1700 |
|
|
end loop;
|
1701 |
|
|
|
1702 |
|
|
SetOutboundWriteFrameAbort;
|
1703 |
|
|
assert (outboundWriteFrameFull = '0')
|
1704 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1705 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1706 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1707 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1708 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1709 |
|
|
|
1710 |
|
|
for i in 0 to 3 loop
|
1711 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(3+i, 32)));
|
1712 |
|
|
assert (outboundWriteFrameFull = '0')
|
1713 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1714 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1715 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1716 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1717 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1718 |
|
|
end loop;
|
1719 |
|
|
|
1720 |
|
|
SetOutboundWriteFrame;
|
1721 |
|
|
assert (outboundWriteFrameFull = '0')
|
1722 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1723 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1724 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1725 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1726 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1727 |
|
|
|
1728 |
|
|
for i in 0 to 3 loop
|
1729 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1+i, 32)));
|
1730 |
|
|
assert (outboundWriteFrameFull = '0')
|
1731 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1732 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1733 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1734 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1735 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1736 |
|
|
end loop;
|
1737 |
|
|
|
1738 |
|
|
SetOutboundReadContentEnd;
|
1739 |
|
|
assert (outboundWriteFrameFull = '0')
|
1740 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1741 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1742 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1743 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1744 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1745 |
|
|
|
1746 |
|
|
SetOutboundReadWindowNext;
|
1747 |
|
|
assert (outboundWriteFrameFull = '0')
|
1748 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1749 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1750 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1751 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1752 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1753 |
|
|
|
1754 |
|
|
SetOutboundReadFrame;
|
1755 |
|
|
assert (outboundWriteFrameFull = '0')
|
1756 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1757 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1758 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1759 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1760 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1761 |
|
|
|
1762 |
|
|
for i in 0 to 3 loop
|
1763 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(3+i, 32)));
|
1764 |
|
|
assert (outboundWriteFrameFull = '0')
|
1765 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1766 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1767 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1768 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1769 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1770 |
|
|
end loop;
|
1771 |
|
|
|
1772 |
|
|
SetOutboundReadContentEnd;
|
1773 |
|
|
assert (outboundWriteFrameFull = '0')
|
1774 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1775 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1776 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1777 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1778 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1779 |
|
|
|
1780 |
|
|
SetOutboundReadWindowNext;
|
1781 |
|
|
assert (outboundWriteFrameFull = '0')
|
1782 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1783 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1784 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1785 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1786 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1787 |
|
|
|
1788 |
|
|
SetOutboundReadFrame;
|
1789 |
|
|
assert (outboundWriteFrameFull = '0')
|
1790 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1791 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1792 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1793 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1794 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1795 |
|
|
|
1796 |
|
|
---------------------------------------------------------------------------
|
1797 |
|
|
PrintS("-----------------------------------------------------------------");
|
1798 |
|
|
PrintS("Step 3:");
|
1799 |
|
|
PrintS("Action: Write one full frame then read one that is restarted.");
|
1800 |
|
|
PrintS("Result: The content of the first frame should be read twice. ");
|
1801 |
|
|
---------------------------------------------------------------------------
|
1802 |
|
|
PrintR("TG_RioPacketBuffer-TC3-Step3");
|
1803 |
|
|
---------------------------------------------------------------------------
|
1804 |
|
|
|
1805 |
|
|
for i in 0 to 3 loop
|
1806 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(1+i, 32)));
|
1807 |
|
|
assert (outboundWriteFrameFull = '0')
|
1808 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1809 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1810 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1811 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1812 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1813 |
|
|
end loop;
|
1814 |
|
|
|
1815 |
|
|
SetOutboundWriteFrame;
|
1816 |
|
|
assert (outboundWriteFrameFull = '0')
|
1817 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1818 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1819 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1820 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1821 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1822 |
|
|
|
1823 |
|
|
for i in 0 to 3 loop
|
1824 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1+i, 32)));
|
1825 |
|
|
assert (outboundWriteFrameFull = '0')
|
1826 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1827 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1828 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1829 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1830 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1831 |
|
|
end loop;
|
1832 |
|
|
|
1833 |
|
|
SetOutboundReadContentEnd;
|
1834 |
|
|
assert (outboundWriteFrameFull = '0')
|
1835 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1836 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1837 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1838 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1839 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1840 |
|
|
|
1841 |
|
|
SetOutboundReadFrameRestart;
|
1842 |
|
|
assert (outboundWriteFrameFull = '0')
|
1843 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1844 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1845 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1846 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1847 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1848 |
|
|
|
1849 |
|
|
for i in 0 to 3 loop
|
1850 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1+i, 32)));
|
1851 |
|
|
assert (outboundWriteFrameFull = '0')
|
1852 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1853 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1854 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1855 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1856 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1857 |
|
|
end loop;
|
1858 |
|
|
|
1859 |
|
|
SetOutboundReadContentEnd;
|
1860 |
|
|
assert (outboundWriteFrameFull = '0')
|
1861 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1862 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1863 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1864 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1865 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1866 |
|
|
|
1867 |
|
|
SetOutboundReadWindowNext;
|
1868 |
|
|
assert (outboundWriteFrameFull = '0')
|
1869 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1870 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1871 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1872 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1873 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1874 |
|
|
|
1875 |
|
|
SetOutboundReadFrame;
|
1876 |
|
|
assert (outboundWriteFrameFull = '0')
|
1877 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1878 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1879 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1880 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1881 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1882 |
|
|
|
1883 |
|
|
---------------------------------------------------------------------------
|
1884 |
|
|
PrintS("-----------------------------------------------------------------");
|
1885 |
|
|
PrintS("TG_RioPacketBuffer");
|
1886 |
|
|
PrintS("-----------------------------------------------------------------");
|
1887 |
|
|
PrintS("TG_RioPacketBuffer-TC4");
|
1888 |
|
|
PrintS("Description: Test operation when partial frames are read.");
|
1889 |
|
|
PrintS("Requirement: XXXXX");
|
1890 |
|
|
PrintS("-----------------------------------------------------------------");
|
1891 |
|
|
PrintS("Step 1:");
|
1892 |
|
|
PrintS("Action: Write a one word frame and read it before it is completed.");
|
1893 |
|
|
PrintS("Result: Empty signals should reflect the status of the frame.");
|
1894 |
|
|
---------------------------------------------------------------------------
|
1895 |
|
|
PrintR("TG_RioPacketBuffer-TC4-Step1");
|
1896 |
|
|
---------------------------------------------------------------------------
|
1897 |
|
|
|
1898 |
|
|
assert (outboundWriteFrameFull = '0')
|
1899 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1900 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1901 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1902 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1903 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1904 |
|
|
assert (outboundReadContentEmpty = '1')
|
1905 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1906 |
|
|
|
1907 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(1, 32)));
|
1908 |
|
|
assert (outboundWriteFrameFull = '0')
|
1909 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1910 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1911 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1912 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1913 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1914 |
|
|
assert (outboundReadContentEmpty = '0')
|
1915 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1916 |
|
|
|
1917 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1, 32)));
|
1918 |
|
|
assert (outboundWriteFrameFull = '0')
|
1919 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1920 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1921 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1922 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1923 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1924 |
|
|
assert (outboundReadContentEmpty = '1')
|
1925 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1926 |
|
|
|
1927 |
|
|
SetOutboundWriteFrame;
|
1928 |
|
|
assert (outboundWriteFrameFull = '0')
|
1929 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1930 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1931 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1932 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1933 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1934 |
|
|
assert (outboundReadContentEmpty = '0')
|
1935 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1936 |
|
|
|
1937 |
|
|
SetOutboundReadContentEnd;
|
1938 |
|
|
assert (outboundWriteFrameFull = '0')
|
1939 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1940 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1941 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1942 |
|
|
assert (outboundReadWindowEmpty = '0')
|
1943 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1944 |
|
|
assert (outboundReadContentEmpty = '0')
|
1945 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1946 |
|
|
|
1947 |
|
|
SetOutboundReadWindowNext;
|
1948 |
|
|
assert (outboundWriteFrameFull = '0')
|
1949 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1950 |
|
|
assert (outboundReadFrameEmpty = '0')
|
1951 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1952 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1953 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1954 |
|
|
assert (outboundReadContentEmpty = '1')
|
1955 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1956 |
|
|
|
1957 |
|
|
SetOutboundReadFrame;
|
1958 |
|
|
assert (outboundWriteFrameFull = '0')
|
1959 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1960 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1961 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1962 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1963 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1964 |
|
|
assert (outboundReadContentEmpty = '1')
|
1965 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1966 |
|
|
|
1967 |
|
|
---------------------------------------------------------------------------
|
1968 |
|
|
PrintS("-----------------------------------------------------------------");
|
1969 |
|
|
PrintS("Step 2:");
|
1970 |
|
|
PrintS("Action: Write content to a frame and read it, then abort the frame.");
|
1971 |
|
|
PrintS("Result: The reader should be notified about the aborted frame. The");
|
1972 |
|
|
PrintS(" notification should be reset when the frame has been ");
|
1973 |
|
|
PrintS(" restarted.");
|
1974 |
|
|
---------------------------------------------------------------------------
|
1975 |
|
|
PrintR("TG_RioPacketBuffer-TC4-Step2");
|
1976 |
|
|
---------------------------------------------------------------------------
|
1977 |
|
|
|
1978 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(1, 32)));
|
1979 |
|
|
assert (outboundWriteFrameFull = '0')
|
1980 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1981 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1982 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1983 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1984 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1985 |
|
|
assert (outboundReadContentEmpty = '0')
|
1986 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1987 |
|
|
assert (outboundReadFrameAborted = '0')
|
1988 |
|
|
report "Unexpected readFrameAborted." severity error;
|
1989 |
|
|
|
1990 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1, 32)));
|
1991 |
|
|
assert (outboundWriteFrameFull = '0')
|
1992 |
|
|
report "Unexpected writeFrameFull." severity error;
|
1993 |
|
|
assert (outboundReadFrameEmpty = '1')
|
1994 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
1995 |
|
|
assert (outboundReadWindowEmpty = '1')
|
1996 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
1997 |
|
|
assert (outboundReadContentEmpty = '1')
|
1998 |
|
|
report "Unexpected readContentEmpty." severity error;
|
1999 |
|
|
assert (outboundReadFrameAborted = '0')
|
2000 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2001 |
|
|
|
2002 |
|
|
SetOutboundWriteFrameAbort;
|
2003 |
|
|
assert (outboundWriteFrameFull = '0')
|
2004 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2005 |
|
|
assert (outboundReadFrameEmpty = '1')
|
2006 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2007 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2008 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2009 |
|
|
assert (outboundReadContentEmpty = '0')
|
2010 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2011 |
|
|
assert (outboundReadFrameAborted = '1')
|
2012 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2013 |
|
|
|
2014 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(2, 32)));
|
2015 |
|
|
assert (outboundWriteFrameFull = '0')
|
2016 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2017 |
|
|
assert (outboundReadFrameEmpty = '1')
|
2018 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2019 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2020 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2021 |
|
|
assert (outboundReadContentEmpty = '1')
|
2022 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2023 |
|
|
assert (outboundReadFrameAborted = '1')
|
2024 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2025 |
|
|
|
2026 |
|
|
SetOutboundReadFrameRestart;
|
2027 |
|
|
assert (outboundWriteFrameFull = '0')
|
2028 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2029 |
|
|
assert (outboundReadFrameEmpty = '1')
|
2030 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2031 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2032 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2033 |
|
|
assert (outboundReadContentEmpty = '0')
|
2034 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2035 |
|
|
assert (outboundReadFrameAborted = '0')
|
2036 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2037 |
|
|
|
2038 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(2, 32)));
|
2039 |
|
|
assert (outboundWriteFrameFull = '0')
|
2040 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2041 |
|
|
assert (outboundReadFrameEmpty = '1')
|
2042 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2043 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2044 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2045 |
|
|
assert (outboundReadContentEmpty = '1')
|
2046 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2047 |
|
|
assert (outboundReadFrameAborted = '0')
|
2048 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2049 |
|
|
|
2050 |
|
|
SetOutboundWriteFrame;
|
2051 |
|
|
assert (outboundWriteFrameFull = '0')
|
2052 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2053 |
|
|
assert (outboundReadFrameEmpty = '0')
|
2054 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2055 |
|
|
assert (outboundReadWindowEmpty = '0')
|
2056 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2057 |
|
|
assert (outboundReadContentEmpty = '0')
|
2058 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2059 |
|
|
assert (outboundReadFrameAborted = '0')
|
2060 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2061 |
|
|
|
2062 |
|
|
SetOutboundReadContentEnd;
|
2063 |
|
|
assert (outboundWriteFrameFull = '0')
|
2064 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2065 |
|
|
assert (outboundReadFrameEmpty = '0')
|
2066 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2067 |
|
|
assert (outboundReadWindowEmpty = '0')
|
2068 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2069 |
|
|
assert (outboundReadContentEmpty = '0')
|
2070 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2071 |
|
|
assert (outboundReadFrameAborted = '0')
|
2072 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2073 |
|
|
|
2074 |
|
|
SetOutboundReadWindowNext;
|
2075 |
|
|
assert (outboundWriteFrameFull = '0')
|
2076 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2077 |
|
|
assert (outboundReadFrameEmpty = '0')
|
2078 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2079 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2080 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2081 |
|
|
assert (outboundReadContentEmpty = '1')
|
2082 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2083 |
|
|
assert (outboundReadFrameAborted = '0')
|
2084 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2085 |
|
|
|
2086 |
|
|
SetOutboundReadFrame;
|
2087 |
|
|
assert (outboundWriteFrameFull = '0')
|
2088 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2089 |
|
|
assert (outboundReadFrameEmpty = '1')
|
2090 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2091 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2092 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2093 |
|
|
assert (outboundReadContentEmpty = '1')
|
2094 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2095 |
|
|
assert (outboundReadFrameAborted = '0')
|
2096 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2097 |
|
|
|
2098 |
|
|
---------------------------------------------------------------------------
|
2099 |
|
|
PrintS("-----------------------------------------------------------------");
|
2100 |
|
|
PrintS("Step 3:");
|
2101 |
|
|
PrintS("Action: Write one complete frame then abort a second.");
|
2102 |
|
|
PrintS("Result: The reader should not notice the aborted frame. ");
|
2103 |
|
|
---------------------------------------------------------------------------
|
2104 |
|
|
PrintR("TG_RioPacketBuffer-TC4-Step3");
|
2105 |
|
|
---------------------------------------------------------------------------
|
2106 |
|
|
|
2107 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(1, 32)));
|
2108 |
|
|
assert (outboundWriteFrameFull = '0')
|
2109 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2110 |
|
|
assert (outboundReadFrameEmpty = '1')
|
2111 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2112 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2113 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2114 |
|
|
assert (outboundReadContentEmpty = '0')
|
2115 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2116 |
|
|
assert (outboundReadFrameAborted = '0')
|
2117 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2118 |
|
|
|
2119 |
|
|
SetOutboundReadContent(std_logic_vector(to_unsigned(1, 32)));
|
2120 |
|
|
assert (outboundWriteFrameFull = '0')
|
2121 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2122 |
|
|
assert (outboundReadFrameEmpty = '1')
|
2123 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2124 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2125 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2126 |
|
|
assert (outboundReadContentEmpty = '1')
|
2127 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2128 |
|
|
assert (outboundReadFrameAborted = '0')
|
2129 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2130 |
|
|
|
2131 |
|
|
SetOutboundWriteFrame;
|
2132 |
|
|
assert (outboundWriteFrameFull = '0')
|
2133 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2134 |
|
|
assert (outboundReadFrameEmpty = '0')
|
2135 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2136 |
|
|
assert (outboundReadWindowEmpty = '0')
|
2137 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2138 |
|
|
assert (outboundReadContentEmpty = '0')
|
2139 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2140 |
|
|
assert (outboundReadFrameAborted = '0')
|
2141 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2142 |
|
|
|
2143 |
|
|
SetOutboundWriteContent(std_logic_vector(to_unsigned(2, 32)));
|
2144 |
|
|
assert (outboundWriteFrameFull = '0')
|
2145 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2146 |
|
|
assert (outboundReadFrameEmpty = '0')
|
2147 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2148 |
|
|
assert (outboundReadWindowEmpty = '0')
|
2149 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2150 |
|
|
assert (outboundReadContentEmpty = '0')
|
2151 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2152 |
|
|
assert (outboundReadFrameAborted = '0')
|
2153 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2154 |
|
|
|
2155 |
|
|
SetOutboundWriteFrameAbort;
|
2156 |
|
|
assert (outboundWriteFrameFull = '0')
|
2157 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2158 |
|
|
assert (outboundReadFrameEmpty = '0')
|
2159 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2160 |
|
|
assert (outboundReadWindowEmpty = '0')
|
2161 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2162 |
|
|
assert (outboundReadContentEmpty = '0')
|
2163 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2164 |
|
|
assert (outboundReadFrameAborted = '0')
|
2165 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2166 |
|
|
|
2167 |
|
|
SetOutboundReadContentEnd;
|
2168 |
|
|
assert (outboundWriteFrameFull = '0')
|
2169 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2170 |
|
|
assert (outboundReadFrameEmpty = '0')
|
2171 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2172 |
|
|
assert (outboundReadWindowEmpty = '0')
|
2173 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2174 |
|
|
assert (outboundReadContentEmpty = '0')
|
2175 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2176 |
|
|
assert (outboundReadFrameAborted = '0')
|
2177 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2178 |
|
|
|
2179 |
|
|
SetOutboundReadWindowNext;
|
2180 |
|
|
assert (outboundWriteFrameFull = '0')
|
2181 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2182 |
|
|
assert (outboundReadFrameEmpty = '0')
|
2183 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2184 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2185 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2186 |
|
|
assert (outboundReadContentEmpty = '1')
|
2187 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2188 |
|
|
assert (outboundReadFrameAborted = '0')
|
2189 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2190 |
|
|
|
2191 |
|
|
SetOutboundReadFrame;
|
2192 |
|
|
assert (outboundWriteFrameFull = '0')
|
2193 |
|
|
report "Unexpected writeFrameFull." severity error;
|
2194 |
|
|
assert (outboundReadFrameEmpty = '1')
|
2195 |
|
|
report "Unexpected readFrameEmpty." severity error;
|
2196 |
|
|
assert (outboundReadWindowEmpty = '1')
|
2197 |
|
|
report "Unexpected readWindowEmpty." severity error;
|
2198 |
|
|
assert (outboundReadContentEmpty = '1')
|
2199 |
|
|
report "Unexpected readContentEmpty." severity error;
|
2200 |
|
|
assert (outboundReadFrameAborted = '0')
|
2201 |
|
|
report "Unexpected readFrameAborted." severity error;
|
2202 |
|
|
|
2203 |
|
|
---------------------------------------------------------------------------
|
2204 |
|
|
-- Test completed.
|
2205 |
|
|
---------------------------------------------------------------------------
|
2206 |
|
|
|
2207 |
|
|
TestEnd;
|
2208 |
|
|
end process;
|
2209 |
|
|
|
2210 |
|
|
-----------------------------------------------------------------------------
|
2211 |
|
|
-- Instantiate the testobject.
|
2212 |
|
|
-----------------------------------------------------------------------------
|
2213 |
|
|
|
2214 |
|
|
TestPacketBuffer: RioPacketBufferWindow
|
2215 |
|
|
port map(
|
2216 |
|
|
clk=>clk, areset_n=>areset_n,
|
2217 |
|
|
inboundWriteFrameFull_o=>inboundWriteFrameFull,
|
2218 |
|
|
inboundWriteFrame_i=>inboundWriteFrame,
|
2219 |
|
|
inboundWriteFrameAbort_i=>inboundWriteFrameAbort,
|
2220 |
|
|
inboundWriteContent_i=>inboundWriteContent,
|
2221 |
|
|
inboundWriteContentData_i=>inboundWriteContentData,
|
2222 |
|
|
inboundReadFrameEmpty_o=>inboundReadFrameEmpty,
|
2223 |
|
|
inboundReadFrame_i=>inboundReadFrame,
|
2224 |
|
|
inboundReadFrameRestart_i=>inboundReadFrameRestart,
|
2225 |
|
|
inboundReadFrameAborted_o=>inboundReadFrameAborted,
|
2226 |
|
|
inboundReadContentEmpty_o=>inboundReadContentEmpty,
|
2227 |
|
|
inboundReadContent_i=>inboundReadContent,
|
2228 |
|
|
inboundReadContentEnd_o=>inboundReadContentEnd,
|
2229 |
|
|
inboundReadContentData_o=>inboundReadContentData,
|
2230 |
|
|
outboundWriteFrameFull_o=>outboundWriteFrameFull,
|
2231 |
|
|
outboundWriteFrame_i=>outboundWriteFrame,
|
2232 |
|
|
outboundWriteFrameAbort_i=>outboundWriteFrameAbort,
|
2233 |
|
|
outboundWriteContent_i=>outboundWriteContent,
|
2234 |
|
|
outboundWriteContentData_i=>outboundWriteContentData,
|
2235 |
|
|
outboundReadFrameEmpty_o=>outboundReadFrameEmpty,
|
2236 |
|
|
outboundReadFrame_i=>outboundReadFrame,
|
2237 |
|
|
outboundReadFrameRestart_i=>outboundReadFrameRestart,
|
2238 |
|
|
outboundReadFrameAborted_o=>outboundReadFrameAborted,
|
2239 |
|
|
outboundReadWindowEmpty_o=>outboundReadWindowEmpty,
|
2240 |
|
|
outboundReadWindowReset_i=>outboundReadWindowReset,
|
2241 |
|
|
outboundReadWindowNext_i=>outboundReadWindowNext,
|
2242 |
|
|
outboundReadContentEmpty_o=>outboundReadContentEmpty,
|
2243 |
|
|
outboundReadContent_i=>outboundReadContent,
|
2244 |
|
|
outboundReadContentEnd_o=>outboundReadContentEnd,
|
2245 |
|
|
outboundReadContentData_o=>outboundReadContentData);
|
2246 |
|
|
|
2247 |
|
|
end architecture;
|