OpenCores
URL https://opencores.org/ocsvn/rio/rio/trunk

Subversion Repositories rio

[/] [rio/] [trunk/] [bench/] [vhdl/] [TestRioPcsUart.vhd] - Blame information for rev 25

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 20 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
-- This file contains a testbench for RioPcsUart.
10
-- 
11
-- To Do:
12
-- -
13
-- 
14
-- Author(s): 
15
-- - Magnus Rosenius, magro732@opencores.org 
16
-- 
17
-------------------------------------------------------------------------------
18
-- 
19
-- Copyright (C) 2013 Authors and OPENCORES.ORG 
20
-- 
21
-- This source file may be used and distributed without 
22
-- restriction provided that this copyright statement is not 
23
-- removed from the file and that any derivative work contains 
24
-- the original copyright notice and the associated disclaimer. 
25
-- 
26
-- This source file is free software; you can redistribute it 
27
-- and/or modify it under the terms of the GNU Lesser General 
28
-- Public License as published by the Free Software Foundation; 
29
-- either version 2.1 of the License, or (at your option) any 
30
-- later version. 
31
-- 
32
-- This source is distributed in the hope that it will be 
33
-- useful, but WITHOUT ANY WARRANTY; without even the implied 
34
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
35
-- PURPOSE. See the GNU Lesser General Public License for more 
36
-- details. 
37
-- 
38
-- You should have received a copy of the GNU Lesser General 
39
-- Public License along with this source; if not, download it 
40
-- from http://www.opencores.org/lgpl.shtml 
41
-- 
42
-------------------------------------------------------------------------------
43
 
44
-------------------------------------------------------------------------------
45
-- TestRioPcsUart.
46
-------------------------------------------------------------------------------
47
 
48
library ieee;
49
use ieee.std_logic_1164.all;
50
use ieee.numeric_std.all;
51
library std;
52
use std.textio.all;
53
use work.rio_common.all;
54
 
55
 
56
-------------------------------------------------------------------------------
57
-- Entity for TestRioPcsUart.
58
-------------------------------------------------------------------------------
59
entity TestRioPcsUart is
60
end entity;
61
 
62
 
63
-------------------------------------------------------------------------------
64
-- Architecture for TestUart.
65
-------------------------------------------------------------------------------
66
architecture TestRioPcsUartImpl of TestRioPcsUart is
67
 
68
  component RioFifo1 is
69
    generic(
70
      WIDTH : natural);
71
    port(
72
      clk : in std_logic;
73
      areset_n : in std_logic;
74
 
75
      empty_o : out std_logic;
76
      read_i : in std_logic;
77
      data_o : out std_logic_vector(WIDTH-1 downto 0);
78
 
79
      full_o : out std_logic;
80
      write_i : in std_logic;
81
      data_i : in std_logic_vector(WIDTH-1 downto 0));
82
  end component;
83
 
84
  component RioSymbolConverter is
85
    port(
86
      clk : in std_logic;
87
      areset_n : in std_logic;
88
 
89
      portInitialized_o : out std_logic;
90
      outboundSymbolEmpty_i : in std_logic;
91
      outboundSymbolRead_o : out std_logic;
92
      outboundSymbol_i : in std_logic_vector(33 downto 0);
93
      inboundSymbolFull_i : in std_logic;
94
      inboundSymbolWrite_o : out std_logic;
95
      inboundSymbol_o : out std_logic_vector(33 downto 0);
96
 
97
      uartEmpty_i : in std_logic;
98
      uartRead_o : out std_logic;
99
      uartData_i : in std_logic_vector(7 downto 0);
100
      uartFull_i : in std_logic;
101
      uartWrite_o : out std_logic;
102
      uartData_o : out std_logic_vector(7 downto 0));
103
  end component;
104
 
105
  signal clk : std_logic;
106
  signal areset_n : std_logic;
107
 
108
  signal portInitialized : std_logic;
109
 
110
  signal outboundSymbolEmpty : std_logic;
111
  signal outboundSymbolRead : std_logic;
112
  signal outboundSymbolReadData : std_logic_vector(33 downto 0);
113
  signal outboundSymbolFull : std_logic;
114
  signal outboundSymbolWrite : std_logic;
115
  signal outboundSymbolWriteData : std_logic_vector(33 downto 0);
116
 
117
  signal inboundSymbolFull : std_logic;
118
  signal inboundSymbolWrite : std_logic;
119
  signal inboundSymbolWriteData : std_logic_vector(33 downto 0);
120
 
121
  signal uartInboundEmpty : std_logic;
122
  signal uartInboundRead : std_logic;
123
  signal uartInboundReadData : std_logic_vector(7 downto 0);
124
  signal uartInboundFull : std_logic;
125
  signal uartInboundWrite : std_logic;
126
  signal uartInboundWriteData : std_logic_vector(7 downto 0);
127
 
128
  signal uartOutboundFull : std_logic;
129
  signal uartOutboundWrite : std_logic;
130
  signal uartOutboundWriteData : std_logic_vector(7 downto 0);
131
 
132
begin
133
 
134
  -----------------------------------------------------------------------------
135
  -- Clock generation.
136
  -----------------------------------------------------------------------------
137
  ClockGenerator: process
138
  begin
139
    clk <= '0';
140
    wait for 20 ns;
141
    clk <= '1';
142
    wait for 20 ns;
143
  end process;
144
 
145
 
146
  -----------------------------------------------------------------------------
147
  -- Serial protocol test driver.
148
  -----------------------------------------------------------------------------
149
  TestDriver: process
150
 
151
    ---------------------------------------------------------------------------
152
    -- Procedure to read a symbol.
153
    ---------------------------------------------------------------------------
154
    procedure ReadSymbol(
155
      constant symbolType : in std_logic_vector(1 downto 0);
156
      constant symbolContent : in std_logic_vector(31 downto 0) := x"00000000") is
157
    begin
158
      inboundSymbolFull <= '0';
159
      wait until inboundSymbolWrite = '1' and clk'event and clk = '1';
160
      inboundSymbolFull <= '1';
161
 
162
      assert symbolType = inboundSymbolWriteData(33 downto 32)
163
        report "Missmatching symbol type:expected=" &
164
        integer'image(to_integer(unsigned(symbolType))) &
165
        " got=" &
166
        integer'image(to_integer(unsigned(outboundSymbolWriteData(33 downto 32))))
167
        severity error;
168
 
169 25 magro732
      if (symbolType = SYMBOL_CONTROL) then
170 20 magro732
        assert symbolContent(31 downto 8) = inboundSymbolWriteData(31 downto 8)
171
          report "Missmatching symbol content:expected=" &
172
          integer'image(to_integer(unsigned(symbolContent(31 downto 8)))) &
173
          " got=" &
174
          integer'image(to_integer(unsigned(inboundSymbolWriteData(31 downto 8))))
175
          severity error;
176
      elsif (symbolType = SYMBOL_DATA) then
177
        assert symbolContent(31 downto 0) = inboundSymbolWriteData(31 downto 0)
178
          report "Missmatching symbol content:expected=" &
179
          integer'image(to_integer(unsigned(symbolContent(31 downto 0)))) &
180
          " got=" &
181
          integer'image(to_integer(unsigned(inboundSymbolWriteData(31 downto 0))))
182
          severity error;
183
      end if;
184
    end procedure;
185
 
186
    ---------------------------------------------------------------------------
187
    -- Procedure to write a symbol.
188
    ---------------------------------------------------------------------------
189
    procedure WriteSymbol(
190
      constant symbolType : in std_logic_vector(1 downto 0);
191
      constant symbolContent : in std_logic_vector(31 downto 0) := x"00000000") is
192
    begin
193
      wait until outboundSymbolFull = '0' and clk'event and clk = '1';
194
      outboundSymbolWrite <= '1';
195
      outboundSymbolWriteData <= symbolType & symbolContent;
196
      wait until clk'event and clk = '1';
197
      outboundSymbolWrite <= '0';
198
    end procedure;
199
 
200
    ---------------------------------------------------------------------------
201
    -- Procedure to read an octet.
202
    ---------------------------------------------------------------------------
203
    procedure ReadOctet(
204
      constant octet : in std_logic_vector(7 downto 0) := x"00") is
205
    begin
206
      uartOutboundFull <= '0';
207
      wait until uartOutboundWrite = '1' and clk'event and clk = '1';
208
      uartOutboundFull <= '1';
209
 
210
      assert uartOutboundWriteData = octet
211
        report "Missmatching octet content:expected=" &
212
        integer'image(to_integer(unsigned(octet))) &
213
        " got=" &
214
        integer'image(to_integer(unsigned(uartOutboundWriteData)))
215
        severity error;
216
    end procedure;
217
 
218
    ---------------------------------------------------------------------------
219
    -- Procedure to send a symbol.
220
    ---------------------------------------------------------------------------
221
    procedure WriteOctet(
222
      constant octet : in std_logic_vector(7 downto 0) := x"00") is
223
    begin
224
      wait until uartInboundFull = '0' and clk'event and clk = '1';
225
      uartInboundWrite <= '1';
226
      uartInboundWriteData <= octet;
227
      wait until clk'event and clk = '1';
228
      uartInboundWrite <= '0';
229
    end procedure;
230
 
231
    ---------------------------------------------------------------------------
232
    -- Process variables.
233
    ---------------------------------------------------------------------------
234
 
235
  begin
236
    ---------------------------------------------------------------------------
237
    -- Test case initialization.
238
    ---------------------------------------------------------------------------
239
 
240
    uartOutboundFull <= '1';
241
    uartInboundWrite <= '0';
242
 
243
    inboundSymbolFull <= '1';
244
    outboundSymbolWrite <= '0';
245
 
246
    -- Generate a startup reset pulse.
247
    areset_n <= '0';
248
    wait until clk'event and clk = '1';
249
    wait until clk'event and clk = '1';
250
    areset_n <= '1';
251
    wait until clk'event and clk = '1';
252
    wait until clk'event and clk = '1';
253
 
254
    ---------------------------------------------------------------------------
255
    PrintS("-----------------------------------------------------------------");
256
    PrintS("TG_RioPcsUart");
257
    PrintS("-----------------------------------------------------------------");
258
    PrintS("TG_RioPcsUart-TC1");
259
    PrintS("Description: Check initial silence time.");
260
    PrintS("Requirement: XXXXX");
261
    PrintS("-----------------------------------------------------------------");
262
    PrintS("Step 1:");
263
    PrintS("Action: .");
264
    PrintS("Result: .");
265
    ---------------------------------------------------------------------------
266
    PrintR("TG_RioPcsUart-TC1-Step1");
267
    ---------------------------------------------------------------------------
268
 
269
    WriteSymbol(SYMBOL_IDLE);
270
 
271
    uartOutboundFull <= '0';
272
    for i in 0 to 4095 loop
273
      wait until clk'event and clk = '1';
274
      assert uartOutboundWrite = '0' report "Sending during silence time."
275
        severity error;
276
    end loop;
277
 
278
    ReadOctet(x"7e");
279
 
280
    ---------------------------------------------------------------------------
281
    PrintS("-----------------------------------------------------------------");
282
    PrintS("TG_RioPcsUart-TC2");
283
    PrintS("Description: Check outbound symbol generation.");
284
    PrintS("Requirement: XXXXX");
285
    PrintS("-----------------------------------------------------------------");
286
    PrintS("Step 1:");
287
    PrintS("Action: .");
288
    PrintS("Result: .");
289
    ---------------------------------------------------------------------------
290
    PrintR("TG_RioPcsUart-TC2-Step1");
291
    ---------------------------------------------------------------------------
292
 
293
    WriteSymbol(SYMBOL_IDLE);
294
    ReadOctet(x"7e");
295
    WriteSymbol(SYMBOL_IDLE);
296
    ReadOctet(x"7e");
297
    WriteSymbol(SYMBOL_IDLE);
298
    ReadOctet(x"7e");
299
 
300
    ---------------------------------------------------------------------------
301
    PrintS("Step 2:");
302
    PrintS("Action: .");
303
    PrintS("Result: .");
304
    ---------------------------------------------------------------------------
305
    PrintR("TG_RioPcsUart-TC2-Step2");
306
    ---------------------------------------------------------------------------
307
 
308 25 magro732
    WriteSymbol(SYMBOL_CONTROL, x"123456" & "XXXXXXXX");
309 20 magro732
    ReadOctet(x"12");
310
    ReadOctet(x"34");
311
    ReadOctet(x"56");
312
    ReadOctet(x"7e");
313
 
314
    ---------------------------------------------------------------------------
315
    PrintS("Step 3:");
316
    PrintS("Action: .");
317
    PrintS("Result: .");
318
    ---------------------------------------------------------------------------
319
    PrintR("TG_RioPcsUart-TC2-Step3");
320
    ---------------------------------------------------------------------------
321
 
322 25 magro732
    WriteSymbol(SYMBOL_CONTROL, x"7d7d7d" & "XXXXXXXX");
323 20 magro732
    ReadOctet(x"7d");
324
    ReadOctet(x"5d");
325
    ReadOctet(x"7d");
326
    ReadOctet(x"5d");
327
    ReadOctet(x"7d");
328
    ReadOctet(x"5d");
329
    ReadOctet(x"7e");
330
 
331
    ---------------------------------------------------------------------------
332
    PrintS("Step 4:");
333
    PrintS("Action: .");
334
    PrintS("Result: .");
335
    ---------------------------------------------------------------------------
336
    PrintR("TG_RioPcsUart-TC2-Step4");
337
    ---------------------------------------------------------------------------
338
 
339 25 magro732
    WriteSymbol(SYMBOL_CONTROL, x"7e7e7e" & "XXXXXXXX");
340 20 magro732
    ReadOctet(x"7d");
341
    ReadOctet(x"5e");
342
    ReadOctet(x"7d");
343
    ReadOctet(x"5e");
344
    ReadOctet(x"7d");
345
    ReadOctet(x"5e");
346
    ReadOctet(x"7e");
347
 
348
    ---------------------------------------------------------------------------
349
    PrintS("Step 5:");
350
    PrintS("Action: .");
351
    PrintS("Result: .");
352
    ---------------------------------------------------------------------------
353
    PrintR("TG_RioPcsUart-TC2-Step5");
354
    ---------------------------------------------------------------------------
355
 
356 25 magro732
    WriteSymbol(SYMBOL_CONTROL, x"7d7f7e" & "XXXXXXXX");
357 20 magro732
    ReadOctet(x"7d");
358
    ReadOctet(x"5d");
359
    ReadOctet(x"7f");
360
    ReadOctet(x"7d");
361
    ReadOctet(x"5e");
362
    ReadOctet(x"7e");
363
 
364
    ---------------------------------------------------------------------------
365
    PrintS("Step 6:");
366
    PrintS("Action: .");
367
    PrintS("Result: .");
368
    ---------------------------------------------------------------------------
369
    PrintR("TG_RioPcsUart-TC2-Step6");
370
    ---------------------------------------------------------------------------
371
 
372
    WriteSymbol(SYMBOL_DATA, x"12345678");
373
    ReadOctet(x"12");
374
    ReadOctet(x"34");
375
    ReadOctet(x"56");
376
    ReadOctet(x"78");
377
 
378
    ---------------------------------------------------------------------------
379
    PrintS("Step 7:");
380
    PrintS("Action: .");
381
    PrintS("Result: .");
382
    ---------------------------------------------------------------------------
383
    PrintR("TG_RioPcsUart-TC2-Step7");
384
    ---------------------------------------------------------------------------
385
 
386
    WriteSymbol(SYMBOL_DATA, x"7d7d7d7d");
387
    ReadOctet(x"7d");
388
    ReadOctet(x"5d");
389
    ReadOctet(x"7d");
390
    ReadOctet(x"5d");
391
    ReadOctet(x"7d");
392
    ReadOctet(x"5d");
393
    ReadOctet(x"7d");
394
    ReadOctet(x"5d");
395
 
396
    ---------------------------------------------------------------------------
397
    PrintS("Step 8:");
398
    PrintS("Action: .");
399
    PrintS("Result: .");
400
    ---------------------------------------------------------------------------
401
    PrintR("TG_RioPcsUart-TC2-Step8");
402
    ---------------------------------------------------------------------------
403
 
404
    WriteSymbol(SYMBOL_DATA, x"7e7e7e7e");
405
    ReadOctet(x"7d");
406
    ReadOctet(x"5e");
407
    ReadOctet(x"7d");
408
    ReadOctet(x"5e");
409
    ReadOctet(x"7d");
410
    ReadOctet(x"5e");
411
    ReadOctet(x"7d");
412
    ReadOctet(x"5e");
413
 
414
    ---------------------------------------------------------------------------
415
    PrintS("Step 9:");
416
    PrintS("Action: .");
417
    PrintS("Result: .");
418
    ---------------------------------------------------------------------------
419
    PrintR("TG_RioPcsUart-TC2-Step9");
420
    ---------------------------------------------------------------------------
421
 
422
    WriteSymbol(SYMBOL_DATA, x"7d7f7e7f");
423
    ReadOctet(x"7d");
424
    ReadOctet(x"5d");
425
    ReadOctet(x"7f");
426
    ReadOctet(x"7d");
427
    ReadOctet(x"5e");
428
    ReadOctet(x"7f");
429
 
430
    ---------------------------------------------------------------------------
431
    PrintS("Step 10:");
432
    PrintS("Action: .");
433
    PrintS("Result: .");
434
    ---------------------------------------------------------------------------
435
    PrintR("TG_RioPcsUart-TC2-Step10");
436
    ---------------------------------------------------------------------------
437
 
438
    WriteSymbol(SYMBOL_IDLE);
439
    ReadOctet(x"7e");
440 25 magro732
    WriteSymbol(SYMBOL_CONTROL, x"123456" & "XXXXXXXX");
441 20 magro732
    ReadOctet(x"12");
442
    ReadOctet(x"34");
443
    ReadOctet(x"56");
444
    ReadOctet(x"7e");
445
    WriteSymbol(SYMBOL_DATA, x"789abcde");
446
    ReadOctet(x"78");
447
    ReadOctet(x"9a");
448
    ReadOctet(x"bc");
449
    ReadOctet(x"de");
450 25 magro732
    WriteSymbol(SYMBOL_CONTROL, x"123456" & "XXXXXXXX");
451 20 magro732
    ReadOctet(x"12");
452
    ReadOctet(x"34");
453
    ReadOctet(x"56");
454
    ReadOctet(x"7e");
455
    WriteSymbol(SYMBOL_DATA, x"789abcde");
456
    ReadOctet(x"78");
457
    ReadOctet(x"9a");
458
    ReadOctet(x"bc");
459
    ReadOctet(x"de");
460
    WriteSymbol(SYMBOL_DATA, x"789abcde");
461
    ReadOctet(x"78");
462
    ReadOctet(x"9a");
463
    ReadOctet(x"bc");
464
    ReadOctet(x"de");
465
 
466
    ---------------------------------------------------------------------------
467
    PrintS("-----------------------------------------------------------------");
468
    PrintS("TG_RioPcsUart-TC3");
469
    PrintS("Description: Check inbound symbol generation.");
470
    PrintS("Requirement: XXXXX");
471
    PrintS("-----------------------------------------------------------------");
472
    PrintS("Step 1:");
473
    PrintS("Action: .");
474
    PrintS("Result: .");
475
    ---------------------------------------------------------------------------
476
    PrintR("TG_RioPcsUart-TC3-Step1");
477
    ---------------------------------------------------------------------------
478
 
479
    WriteOctet(x"7e");
480
    WriteOctet(x"7e");
481
    ReadSymbol(SYMBOL_IDLE);
482
 
483
    ---------------------------------------------------------------------------
484
    PrintS("Step :");
485
    PrintS("Action: .");
486
    PrintS("Result: .");
487
    ---------------------------------------------------------------------------
488
    PrintR("TG_RioPcsUart-TC3-Step");
489
    ---------------------------------------------------------------------------
490
 
491
    WriteOctet(x"12");
492
    WriteOctet(x"7e");
493
    ReadSymbol(SYMBOL_IDLE);
494
 
495
    ---------------------------------------------------------------------------
496
    PrintS("Step :");
497
    PrintS("Action: .");
498
    PrintS("Result: .");
499
    ---------------------------------------------------------------------------
500
    PrintR("TG_RioPcsUart-TC3-Step");
501
    ---------------------------------------------------------------------------
502
 
503
    WriteOctet(x"34");
504
    WriteOctet(x"56");
505
    WriteOctet(x"7e");
506
    ReadSymbol(SYMBOL_IDLE);
507
 
508
    ---------------------------------------------------------------------------
509
    PrintS("Step :");
510
    PrintS("Action: .");
511
    PrintS("Result: .");
512
    ---------------------------------------------------------------------------
513
    PrintR("TG_RioPcsUart-TC3-Step");
514
    ---------------------------------------------------------------------------
515
 
516
    WriteOctet(x"78");
517
    WriteOctet(x"9a");
518
    WriteOctet(x"bc");
519
    WriteOctet(x"7e");
520 25 magro732
    ReadSymbol(SYMBOL_CONTROL, x"789abc" & "XXXXXXXX");
521 20 magro732
 
522
    ---------------------------------------------------------------------------
523
    PrintS("Step :");
524
    PrintS("Action: .");
525
    PrintS("Result: .");
526
    ---------------------------------------------------------------------------
527
    PrintR("TG_RioPcsUart-TC3-Step");
528
    ---------------------------------------------------------------------------
529
 
530
    WriteOctet(x"7d");
531
    WriteOctet(x"5d");
532
    WriteOctet(x"7d");
533
    WriteOctet(x"5d");
534
    WriteOctet(x"7d");
535
    WriteOctet(x"5d");
536
    WriteOctet(x"7e");
537 25 magro732
    ReadSymbol(SYMBOL_CONTROL, x"7d7d7d" & "XXXXXXXX");
538 20 magro732
 
539
    ---------------------------------------------------------------------------
540
    PrintS("Step :");
541
    PrintS("Action: .");
542
    PrintS("Result: .");
543
    ---------------------------------------------------------------------------
544
    PrintR("TG_RioPcsUart-TC3-Step");
545
    ---------------------------------------------------------------------------
546
 
547
    WriteOctet(x"7d");
548
    WriteOctet(x"5e");
549
    WriteOctet(x"7d");
550
    WriteOctet(x"5e");
551
    WriteOctet(x"7d");
552
    WriteOctet(x"5e");
553
    WriteOctet(x"7e");
554 25 magro732
    ReadSymbol(SYMBOL_CONTROL, x"7e7e7e" & "XXXXXXXX");
555 20 magro732
 
556
    ---------------------------------------------------------------------------
557
    PrintS("Step :");
558
    PrintS("Action: .");
559
    PrintS("Result: .");
560
    ---------------------------------------------------------------------------
561
    PrintR("TG_RioPcsUart-TC3-Step");
562
    ---------------------------------------------------------------------------
563
 
564
    WriteOctet(x"f1");
565
    WriteOctet(x"11");
566
    WriteOctet(x"22");
567
    WriteOctet(x"33");
568
    ReadSymbol(SYMBOL_DATA, x"f1112233");
569
 
570
    ---------------------------------------------------------------------------
571
    PrintS("Step :");
572
    PrintS("Action: .");
573
    PrintS("Result: .");
574
    ---------------------------------------------------------------------------
575
    PrintR("TG_RioPcsUart-TC3-Step");
576
    ---------------------------------------------------------------------------
577
 
578
    WriteOctet(x"7e");
579
    ReadSymbol(SYMBOL_IDLE);
580
 
581
    ---------------------------------------------------------------------------
582
    PrintS("Step :");
583
    PrintS("Action: .");
584
    PrintS("Result: .");
585
    ---------------------------------------------------------------------------
586
    PrintR("TG_RioPcsUart-TC3-Step");
587
    ---------------------------------------------------------------------------
588
 
589
    WriteOctet(x"7d");
590
    WriteOctet(x"5d");
591
    WriteOctet(x"7d");
592
    WriteOctet(x"5d");
593
    WriteOctet(x"7d");
594
    WriteOctet(x"5d");
595
    WriteOctet(x"7d");
596
    WriteOctet(x"5d");
597
    ReadSymbol(SYMBOL_DATA, x"7d7d7d7d");
598
 
599
    ---------------------------------------------------------------------------
600
    PrintS("Step :");
601
    PrintS("Action: .");
602
    PrintS("Result: .");
603
    ---------------------------------------------------------------------------
604
    PrintR("TG_RioPcsUart-TC3-Step");
605
    ---------------------------------------------------------------------------
606
 
607
    WriteOctet(x"7d");
608
    WriteOctet(x"5e");
609
    WriteOctet(x"7d");
610
    WriteOctet(x"5e");
611
    WriteOctet(x"7d");
612
    WriteOctet(x"5e");
613
    WriteOctet(x"7d");
614
    WriteOctet(x"5e");
615
    ReadSymbol(SYMBOL_DATA, x"7e7e7e7e");
616
 
617
    ---------------------------------------------------------------------------
618
    PrintS("Step :");
619
    PrintS("Action: .");
620
    PrintS("Result: .");
621
    ---------------------------------------------------------------------------
622
    PrintR("TG_RioPcsUart-TC3-Step");
623
    ---------------------------------------------------------------------------
624
 
625
    WriteOctet(x"44");
626
    WriteOctet(x"55");
627
    WriteOctet(x"66");
628
    WriteOctet(x"77");
629
    ReadSymbol(SYMBOL_DATA, x"44556677");
630
    WriteOctet(x"88");
631
    WriteOctet(x"99");
632
    WriteOctet(x"aa");
633
    WriteOctet(x"bb");
634
    ReadSymbol(SYMBOL_DATA, x"8899aabb");
635
 
636
    ---------------------------------------------------------------------------
637
    -- Test completed.
638
    ---------------------------------------------------------------------------
639
 
640
    TestEnd;
641
  end process;
642
 
643
 
644
  -----------------------------------------------------------------------------
645
  -- 
646
  -----------------------------------------------------------------------------
647
 
648
  OutboundSymbolFifo: RioFifo1
649
    generic map(WIDTH=>34)
650
    port map(
651
      clk=>clk, areset_n=>areset_n,
652
      empty_o=>outboundSymbolEmpty, read_i=>outboundSymbolRead, data_o=>outboundSymbolReadData,
653
      full_o=>outboundSymbolFull, write_i=>outboundSymbolWrite, data_i=>outboundSymbolWriteData);
654
 
655
  InboundOctetFifo: RioFifo1
656
    generic map(WIDTH=>8)
657
    port map(
658
      clk=>clk, areset_n=>areset_n,
659
      empty_o=>uartInboundEmpty, read_i=>uartInboundRead, data_o=>uartInboundReadData,
660
      full_o=>uartInboundFull, write_i=>uartInboundWrite, data_i=>uartInboundWriteData);
661
 
662
  TestSymbolConverter: RioSymbolConverter
663
    port map(
664
      clk=>clk, areset_n=>areset_n,
665
      portInitialized_o=>portInitialized,
666
      outboundSymbolEmpty_i=>outboundSymbolEmpty,
667
      outboundSymbolRead_o=>outboundSymbolRead, outboundSymbol_i=>outboundSymbolReadData,
668
      inboundSymbolFull_i=>inboundSymbolFull,
669
      inboundSymbolWrite_o=>inboundSymbolWrite, inboundSymbol_o=>inboundSymbolWriteData,
670
      uartEmpty_i=>uartInboundEmpty, uartRead_o=>uartInboundRead, uartData_i=>uartInboundReadData,
671
      uartFull_i=>uartOutboundFull, uartWrite_o=>uartOutboundWrite, uartData_o=>uartOutboundWriteData);
672
 
673
end architecture;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.