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

Subversion Repositories rio

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

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

powered by: WebSVN 2.1.0

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