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

Subversion Repositories rio

[/] [rio/] [branches/] [2.0.0-development/] [bench/] [vhdl/] [TestRioWbBridge.vhd] - Blame information for rev 51

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 42 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 test code to verify a RioWbBridge implementation.
10
-- 
11
-- To Do:
12 47 magro732
-- - Add testcases to NWRITE to cover all possible access lengths, not just the
13
--   maximum as presently.
14 42 magro732
-- 
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
-------------------------------------------------------------------------------
47
-- TestRioWbBridge.
48
-------------------------------------------------------------------------------
49
 
50
library ieee;
51
use ieee.std_logic_1164.all;
52
use ieee.numeric_std.all;
53
use ieee.math_real.all;
54
library std;
55
use std.textio.all;
56
use work.rio_common.all;
57
use work.TestPortPackage.all;
58
 
59
 
60
-------------------------------------------------------------------------------
61
-- Entity for TestRioWbBridge.
62
-------------------------------------------------------------------------------
63
entity TestRioWbBridge is
64
end entity;
65
 
66
 
67
-------------------------------------------------------------------------------
68
-- Architecture for TestRioWbBridge.
69
-------------------------------------------------------------------------------
70
architecture TestRioWbBridgeImpl of TestRioWbBridge is
71
 
72
  component RioWbBridge is
73
    generic(
74
      EXTENDED_ADDRESS : natural range 0 to 2 := 0;
75
      DEVICE_IDENTITY : std_logic_vector(15 downto 0);
76
      DEVICE_VENDOR_IDENTITY : std_logic_vector(15 downto 0);
77
      DEVICE_REV : std_logic_vector(31 downto 0);
78
      ASSY_IDENTITY : std_logic_vector(15 downto 0);
79
      ASSY_VENDOR_IDENTITY : std_logic_vector(15 downto 0);
80
      ASSY_REV : std_logic_vector(15 downto 0));
81
    port(
82
      clk : in std_logic;
83
      areset_n : in std_logic;
84 44 magro732
      enable : in std_logic;
85 42 magro732
 
86
      readFrameEmpty_i : in std_logic;
87
      readFrame_o : out std_logic;
88
      readContent_o : out std_logic;
89
      readContentEnd_i : in std_logic;
90
      readContentData_i : in std_logic_vector(31 downto 0);
91
      writeFrameFull_i : in std_logic;
92
      writeFrame_o : out std_logic;
93
      writeFrameAbort_o : out std_logic;
94
      writeContent_o : out std_logic;
95
      writeContentData_o : out std_logic_vector(31 downto 0);
96
 
97
      cyc_o : out std_logic;
98
      stb_o : out std_logic;
99
      we_o : out std_logic;
100
      adr_o : out std_logic_vector(16*EXTENDED_ADDRESS+30 downto 0);
101
      sel_o : out std_logic_vector(7 downto 0);
102
      dat_o : out std_logic_vector(63 downto 0);
103
      dat_i : in std_logic_vector(63 downto 0);
104
      err_i : in std_logic;
105
      ack_i : in std_logic);
106
  end component;
107
 
108
  -----------------------------------------------------------------------------
109
  -- 
110
  -----------------------------------------------------------------------------
111
 
112
  signal clk : std_logic;
113
  signal areset_n : std_logic;
114
  signal enable : std_logic;
115
 
116
  signal writeFrameFull : std_logic;
117
  signal writeFrame : std_logic;
118
  signal writeFrameAbort : std_logic;
119
  signal writeContent : std_logic;
120
  signal writeContentData : std_logic_vector(31 downto 0);
121
 
122
  signal readFrameEmpty : std_logic;
123
  signal readFrame : std_logic;
124
  signal readFrameRestart : std_logic;
125
  signal readFrameAborted : std_logic;
126
  signal readContentEmpty : std_logic;
127
  signal readContent : std_logic;
128
  signal readContentEnd : std_logic;
129
  signal readContentData : std_logic_vector(31 downto 0);
130
 
131
  signal wbCyc : std_logic;
132
  signal wbStb : std_logic;
133
  signal wbWe : std_logic;
134
  signal wbAdr : std_logic_vector(30 downto 0);
135
  signal wbSel : std_logic_vector(7 downto 0);
136
  signal wbDatWrite : std_logic_vector(63 downto 0);
137
  signal wbDatRead : std_logic_vector(63 downto 0);
138
  signal wbAck : std_logic;
139
  signal wbErr : std_logic;
140
 
141
  signal outboundEmpty : std_logic;
142
  signal outboundWrite : std_logic;
143
  signal outboundMessage : TestPortMessagePacketBuffer;
144
  signal outboundAck : std_logic;
145
 
146
  signal inboundEmpty : std_logic;
147
  signal inboundWrite : std_logic;
148
  signal inboundMessage : TestPortMessagePacketBuffer;
149
  signal inboundAck : std_logic;
150
 
151
  signal wbMessageEmpty : std_logic;
152
  signal wbMessageWrite : std_logic;
153
  signal wbMessage : TestPortMessageWishbone;
154
  signal wbMessageAck : std_logic;
155
 
156
begin
157
 
158
  -----------------------------------------------------------------------------
159
  -- Clock generation.
160
  -----------------------------------------------------------------------------
161
  ClockGenerator: process
162
  begin
163
    clk <= '0';
164
    wait for 20 ns;
165
    clk <= '1';
166
    wait for 20 ns;
167
  end process;
168
 
169
 
170
  -----------------------------------------------------------------------------
171
  -- Serial port emulator.
172
  -----------------------------------------------------------------------------
173
  TestDriver: process
174
 
175
    -----------------------------------------------------------------------------
176
    -- Procedures to handle outbound and inbound packets.
177
    -----------------------------------------------------------------------------
178
    procedure OutboundFrame(constant frame : in RioFrame) is
179
    begin
180
      TestPortPacketBufferWrite(outboundWrite, outboundMessage, outboundAck,
181
                                frame, false);
182
    end procedure;
183
 
184
    procedure InboundFrame(constant frame : in RioFrame) is
185
    begin
186
      TestPortPacketBufferWrite(inboundWrite, inboundMessage, inboundAck,
187
                                frame, false);
188
    end procedure;
189
 
190
    ---------------------------------------------------------------------------
191
    -- Procedure to handle wishbone accesses.
192
    ---------------------------------------------------------------------------
193
    procedure SetSlaveAccess(constant writeAccess : in boolean;
194 47 magro732
                             constant addressIn : in std_logic_vector(30 downto 0);
195 42 magro732
                             constant byteSelect : in std_logic_vector(7 downto 0);
196 47 magro732
                             constant length : in natural range 1 to 32;
197
                             constant dataIn : in DoublewordArray(0 to 31);
198 44 magro732
                             constant latency : natural := 1) is
199 47 magro732
      variable address : std_logic_vector(ADDRESS_WIDTH_MAX-1 downto 0);
200 42 magro732
    begin
201 47 magro732
      address := x"00000000" & '0' & addressIn;
202
      for i in 0 to length-1 loop
203
        if (i = (length-1)) then
204
          TestPortWishboneWrite(wbMessageWrite, wbMessage, wbMessageAck,
205
                                writeAccess, address, byteSelect, dataIn(i), false, latency);
206
        else
207
          TestPortWishboneWrite(wbMessageWrite, wbMessage, wbMessageAck,
208
                                writeAccess, address, byteSelect, dataIn(i), true, latency);
209
          address := std_logic_vector(unsigned(address)+1);
210
        end if;
211
      end loop;
212 42 magro732
    end procedure;
213 44 magro732
 
214
    ---------------------------------------------------------------------------
215
    -- 
216
    ---------------------------------------------------------------------------
217
    function getReadSize(constant rdsize : in std_logic_vector(3 downto 0);
218
                         constant wdptr : in std_logic) return natural is
219
    begin
220
      case rdsize is
221
        when "0000" | "0001" | "0010" | "0011" =>
222
          return 1;
223
        when "0100" | "0110" =>
224
          return 1;
225
        when "0101" =>
226
          return 1;
227
        when "1000" =>
228
          return 1;
229
        when "0111" =>
230
          return 1;
231
        when "1001" =>
232
          return 1;
233
        when "1010" =>
234
          return 1;
235
        when "1011" =>
236
          if (wdptr = '0') then
237
            return 1;
238
          else
239
            return 2;
240
          end if;
241
        when "1100" =>
242
          if (wdptr = '0') then
243
            return 4;
244
          else
245
            return 8;
246
          end if;
247
        when "1101" =>
248
          if (wdptr = '0') then
249
            return 12;
250
          else
251
            return 16;
252
          end if;
253
        when "1110" =>
254
          if (wdptr = '0') then
255
            return 20;
256
          else
257
            return 24;
258
          end if;
259
        when "1111" =>
260
          if (wdptr = '0') then
261
            return 28;
262
          else
263
            return 32;
264
          end if;
265
        when others =>
266
          return 0;
267
      end case;
268
    end function;
269 42 magro732
 
270 44 magro732
    function getReadMask(constant rdsize : in std_logic_vector(3 downto 0);
271
                         constant wdptr : in std_logic) return std_logic_vector is
272
    begin
273
      case rdsize is
274
        when "0000" =>
275
          if (wdptr = '0') then
276
            return "10000000";
277
          else
278
            return "00001000";
279
          end if;
280
        when "0001" =>
281
          if (wdptr = '0') then
282
            return "01000000";
283
          else
284
            return "00000100";
285
          end if;
286
        when "0010" =>
287
          if (wdptr = '0') then
288
            return "00100000";
289
          else
290
            return "00000010";
291
          end if;
292
        when "0011" =>
293
          if (wdptr = '0') then
294
            return "00010000";
295
          else
296
            return "00000001";
297
          end if;
298
        when "0100" =>
299
          if (wdptr = '0') then
300
            return "11000000";
301
          else
302
            return "00001100";
303
          end if;
304
        when "0110" =>
305
          if (wdptr = '0') then
306
            return "00110000";
307
          else
308
            return "00000011";
309
          end if;
310
        when "0101" =>
311
          if (wdptr = '0') then
312
            return "11100000";
313
          else
314
            return "00000111";
315
          end if;
316
        when "1000" =>
317
          if (wdptr = '0') then
318
            return "11110000";
319
          else
320
            return "00001111";
321
          end if;
322
        when "0111" =>
323
          if (wdptr = '0') then
324
            return "11111000";
325
          else
326
            return "00011111";
327
          end if;
328
        when "1001" =>
329
          if (wdptr = '0') then
330
            return "11111100";
331
          else
332
            return "00111111";
333
          end if;
334
        when "1010" =>
335
          if (wdptr = '0') then
336
            return "11111110";
337
          else
338
            return "01111111";
339
          end if;
340
        when others =>
341
          return "11111111";
342
      end case;
343
    end function;
344 42 magro732
 
345
    ---------------------------------------------------------------------------
346 45 magro732
    -- Local variables.
347 42 magro732
    ---------------------------------------------------------------------------
348
    variable seed1 : positive := 1;
349
    variable seed2: positive := 1;
350
 
351 44 magro732
    variable rdsize : std_logic_vector(3 downto 0);
352 45 magro732
    variable wrsize : std_logic_vector(3 downto 0);
353 44 magro732
    variable wdptr : std_logic;
354 45 magro732
    variable maintData : DoubleWordArray(0 to 7);
355 42 magro732
    variable ioData : DoubleWordArray(0 to 31);
356
    variable frame : RioFrame;
357
 
358
  begin
359
    areset_n <= '0';
360 44 magro732
    enable <= '1';
361 42 magro732
 
362 44 magro732
    inboundWrite <= '0';
363
    outboundWrite <= '0';
364
    wbMessageWrite <= '0';
365
 
366 42 magro732
    writeFrameFull <= '0';
367
 
368
    wait until clk'event and clk = '1';
369
    wait until clk'event and clk = '1';
370
    areset_n <= '1';
371
    wait until clk'event and clk = '1';
372
    wait until clk'event and clk = '1';
373
 
374
    ---------------------------------------------------------------------------
375 51 magro732
    TestSpec("-----------------------------------------------------------------");
376
    TestSpec("TG_RioWbBridge");
377
    TestSpec("-----------------------------------------------------------------");
378
    TestSpec("TG_RioWbBridge-TC1");
379
    TestSpec("Description: Test maintenance requests.");
380
    TestSpec("Requirement: XXXXX");
381
    TestSpec("-----------------------------------------------------------------");
382
    TestSpec("Step 1:");
383
    TestSpec("Action: Send maintenance read request for one word on even offset.");
384
    TestSpec("Result: Check the accesses on the external configuration port.");
385
    TestSpec("-----------------------------------------------------------------");
386 42 magro732
    ---------------------------------------------------------------------------
387 51 magro732
    TestCaseStart("TG_RioWbBridge-TC1-Step1");
388 42 magro732
    ---------------------------------------------------------------------------
389 45 magro732
 
390
    InboundFrame(RioFrameCreate(ackId=>"00000", vc=>'0', crf=>'0', prio=>"00",
391
                                tt=>"01", ftype=>FTYPE_MAINTENANCE_CLASS,
392
                                sourceId=>x"dead", destId=>x"beef",
393
                                payload=>RioMaintenance(transaction=>"0000",
394
                                                        size=>"1000",
395
                                                        tid=>x"aa",
396
                                                        hopCount=>x"ff",
397
                                                        configOffset=>"000000000000000000000",
398
                                                        wdptr=>'0',
399
                                                        dataLength=>0,
400
                                                        data=>maintData)));
401
 
402
    maintData(0) := x"deadbeef00000000";
403
    OutboundFrame(RioFrameCreate(ackId=>"00000", vc=>'0', crf=>'0', prio=>"00",
404
                                 tt=>"01", ftype=>FTYPE_MAINTENANCE_CLASS,
405
                                 sourceId=>x"beef", destId=>x"dead",
406
                                 payload=>RioMaintenance(transaction=>"0010",
407
                                                         size=>"0000",
408
                                                         tid=>x"aa",
409
                                                         hopCount=>x"ff",
410
                                                         configOffset=>"000000000000000000000",
411
                                                         wdptr=>'0',
412
                                                         dataLength=>1,
413
                                                         data=>maintData)));
414 42 magro732
 
415 45 magro732
    TestWait(inboundEmpty, '1', "inbound frame");
416
    TestWait(outboundEmpty, '1', "outbound frame");
417
 
418 44 magro732
    ---------------------------------------------------------------------------
419 51 magro732
    TestSpec("-----------------------------------------------------------------");
420
    TestSpec("TG_RioWbBridge-TC2");
421
    TestSpec("Description: Test request class packets.");
422
    TestSpec("Requirement: XXXXX");
423
    TestSpec("-----------------------------------------------------------------");
424
    TestSpec("Step 1:");
425
    TestSpec("Action: Send request class NREAD packets for all sizes.");
426
    TestSpec("Result: The Wishbone access should match the inbound packet.");
427
    TestSpec("-----------------------------------------------------------------");
428 44 magro732
    ---------------------------------------------------------------------------
429 51 magro732
    TestCaseStart("TG_RioWbBridge-TC2-Step1");
430 44 magro732
    ---------------------------------------------------------------------------
431 45 magro732
    -- REMARK: Change the address and tid also...
432 44 magro732
    for i in 0 to 15 loop
433
      for j in 0 to 1 loop
434
        rdsize := std_logic_vector(to_unsigned(i, 4));
435
        if (j = 0) then
436
          wdptr := '0';
437
        else
438 47 magro732
          wdptr := '1';
439 44 magro732
        end if;
440
 
441 51 magro732
        CreateRandomPayload(ioData, seed1, seed2);
442 42 magro732
 
443 44 magro732
        InboundFrame(RioFrameCreate(ackId=>"00000", vc=>'0', crf=>'0', prio=>"00",
444
                                    tt=>"01", ftype=>FTYPE_REQUEST_CLASS,
445
                                    sourceId=>x"dead", destId=>x"beef",
446
                                    payload=>RioNread(rdsize=>rdsize,
447 42 magro732
                                                      tid=>x"aa",
448 44 magro732
                                                      address=>"00000000000000000000000000000",
449
                                                      wdptr=>wdptr,
450
                                                      xamsbs=>"00")));
451 42 magro732
 
452 44 magro732
        OutboundFrame(RioFrameCreate(ackId=>"00000", vc=>'0', crf=>'0', prio=>"00",
453
                                     tt=>"01", ftype=>FTYPE_RESPONSE_CLASS,
454
                                     sourceId=>x"beef", destId=>x"dead",
455
                                     payload=>RioResponse(status=>"0000",
456
                                                          tid=>x"aa",
457
                                                          dataLength=>getReadSize(rdsize, wdptr),
458
                                                          data=>ioData)));
459 42 magro732
 
460 44 magro732
        SetSlaveAccess(false, "0000000000000000000000000000000",
461
                       getReadMask(rdsize, wdptr),
462
                       getReadSize(rdsize, wdptr),
463
                       ioData);
464
 
465
        TestWait(inboundEmpty, '1', "inbound frame");
466
        TestWait(outboundEmpty, '1', "outbound frame");
467
        TestWait(wbMessageEmpty, '1', "wishbone access");
468
      end loop;
469
    end loop;
470 42 magro732
 
471
    ---------------------------------------------------------------------------
472 51 magro732
    TestSpec("-----------------------------------------------------------------");
473
    TestSpec("TG_RioWbBridge-TC3");
474
    TestSpec("Description: Test write class packets.");
475
    TestSpec("Requirement: XXXXX");
476
    TestSpec("-----------------------------------------------------------------");
477
    TestSpec("Step 1:");
478
    TestSpec("Action: Send write class NWRITER packets for all sizes.");
479
    TestSpec("Result: The Wishbone access should match the inbound packet and a ");
480
    TestSpec("        response should be sent.");
481
    TestSpec("-----------------------------------------------------------------");
482 45 magro732
    ---------------------------------------------------------------------------
483 51 magro732
    TestCaseStart("TG_RioWbBridge-TC3-Step1");
484 45 magro732
    ---------------------------------------------------------------------------
485
    -- REMARK: Change the address and tid also...
486 47 magro732
    -- REMARK: Not really all sizes, add sizes in between the fixed as well.
487 45 magro732
    for i in 0 to 15 loop
488
      for j in 0 to 1 loop
489
        wrsize := std_logic_vector(to_unsigned(i, 4));
490
        if (j = 0) then
491
          wdptr := '0';
492
        else
493 47 magro732
          wdptr := '1';
494 45 magro732
        end if;
495
 
496
        CreateRandomPayload(ioData, seed1, seed2);
497
 
498
        InboundFrame(RioFrameCreate(ackId=>"00000", vc=>'0', crf=>'0', prio=>"00",
499
                                    tt=>"01", ftype=>FTYPE_WRITE_CLASS,
500
                                    sourceId=>x"dead", destId=>x"beef",
501
                                    payload=>RioNwriteR(wrsize=>wrsize,
502
                                                        tid=>x"aa",
503
                                                        address=>"00000000000000000000000000000",
504
                                                        wdptr=>wdptr,
505
                                                        xamsbs=>"00",
506
                                                        dataLength=>getReadSize(wrsize, wdptr),
507
                                                        data=>ioData)));
508
 
509
        OutboundFrame(RioFrameCreate(ackId=>"00000", vc=>'0', crf=>'0', prio=>"00",
510
                                     tt=>"01", ftype=>FTYPE_RESPONSE_CLASS,
511
                                     sourceId=>x"beef", destId=>x"dead",
512
                                     payload=>RioResponse(status=>"0000",
513
                                                          tid=>x"aa",
514
                                                          dataLength=>0,
515
                                                          data=>ioData)));
516
 
517
        SetSlaveAccess(true, "0000000000000000000000000000000",
518
                       getReadMask(wrsize, wdptr),
519
                       getReadSize(wrsize, wdptr),
520
                       ioData);
521
 
522
        TestWait(inboundEmpty, '1', "inbound frame");
523
        TestWait(outboundEmpty, '1', "outbound frame");
524
        TestWait(wbMessageEmpty, '1', "wishbone access");
525
      end loop;
526
    end loop;
527
 
528
    ---------------------------------------------------------------------------
529 51 magro732
    TestSpec("-----------------------------------------------------------------");
530
    TestSpec("Step 2:");
531
    TestSpec("Action: Send write class NWRITE packets for all sizes.");
532
    TestSpec("Result: The Wishbone access should match the inbound packet.");
533
    TestSpec("-----------------------------------------------------------------");
534 45 magro732
    ---------------------------------------------------------------------------
535 51 magro732
    TestCaseStart("TG_RioWbBridge-TC3-Step2");
536 45 magro732
    ---------------------------------------------------------------------------
537
    -- REMARK: Change the address and tid also...
538
    for i in 0 to 15 loop
539
      for j in 0 to 1 loop
540
        wrsize := std_logic_vector(to_unsigned(i, 4));
541
        if (j = 0) then
542
          wdptr := '0';
543
        else
544
          wdptr:= '1';
545
        end if;
546
 
547
        CreateRandomPayload(ioData, seed1, seed2);
548
 
549
        InboundFrame(RioFrameCreate(ackId=>"00000", vc=>'0', crf=>'0', prio=>"00",
550
                                    tt=>"01", ftype=>FTYPE_WRITE_CLASS,
551
                                    sourceId=>x"dead", destId=>x"beef",
552
                                    payload=>RioNwrite(wrsize=>wrsize,
553
                                                       address=>"00000000000000000000000000000",
554
                                                       wdptr=>wdptr,
555
                                                       xamsbs=>"00",
556
                                                       dataLength=>getReadSize(wrsize, wdptr),
557
                                                       data=>ioData)));
558
 
559
        SetSlaveAccess(true, "0000000000000000000000000000000",
560
                       getReadMask(wrsize, wdptr),
561
                       getReadSize(wrsize, wdptr),
562
                       ioData);
563
 
564
        TestWait(inboundEmpty, '1', "inbound frame");
565
        TestWait(outboundEmpty, '1', "outbound frame");
566
        TestWait(wbMessageEmpty, '1', "wishbone access");
567
      end loop;
568
    end loop;
569
 
570
    ---------------------------------------------------------------------------
571 42 magro732
    -- Test completed.
572
    ---------------------------------------------------------------------------
573
 
574
    TestEnd;
575
  end process;
576
 
577
  -----------------------------------------------------------------------------
578
  -- Instantiate the test object.
579
  -----------------------------------------------------------------------------
580
  TestObject: RioWbBridge
581
    generic map(
582 44 magro732
      EXTENDED_ADDRESS=>0,
583
      DEVICE_IDENTITY=>x"dead",
584
      DEVICE_VENDOR_IDENTITY=>x"beef",
585
      DEVICE_REV=>x"c0debabe",
586
      ASSY_IDENTITY=>x"1111",
587
      ASSY_VENDOR_IDENTITY=>x"2222",
588
      ASSY_REV=>x"3333")
589 42 magro732
    port map(
590
      clk=>clk,
591 44 magro732
      areset_n=>areset_n,
592
      enable=>enable,
593 42 magro732
      readFrameEmpty_i=>readFrameEmpty,
594
      readFrame_o=>readFrame,
595
      readContent_o=>readContent,
596
      readContentEnd_i=>readContentEnd,
597
      readContentData_i=>readContentData,
598
      writeFrameFull_i=>writeFrameFull,
599
      writeFrame_o=>writeFrame,
600
      writeFrameAbort_o=>writeFrameAbort,
601
      writeContent_o=>writeContent,
602
      writeContentData_o=>writeContentData,
603
      cyc_o=>wbCyc,
604
      stb_o=>wbStb,
605
      we_o=>wbWe,
606
      adr_o=>wbAdr,
607
      sel_o=>wbSel,
608
      dat_o=>wbDatWrite,
609
      dat_i=>wbDatRead,
610
      err_i=>wbErr,
611
      ack_i=>wbAck);
612
 
613
  -----------------------------------------------------------------------------
614
  -- Instantiate the test ports.
615
  -----------------------------------------------------------------------------
616
 
617
  TestPortPacketBufferInst: TestPortPacketBuffer
618 47 magro732
    generic map(READ_CONTENT_END_DATA_VALID=>false)
619 42 magro732
    port map(
620
      clk=>clk, areset_n=>areset_n,
621 44 magro732
      readEmpty_o=>inboundEmpty,
622
      readWrite_i=>inboundWrite,
623
      readMessage_i=>inboundMessage,
624
      readAck_o=>inboundAck,
625
      writeEmpty_o=>outboundEmpty,
626
      writeWrite_i=>outboundWrite,
627
      writeMessage_i=>outboundMessage,
628
      writeAck_o=>outboundAck,
629 42 magro732
      readFrameEmpty_o=>readFrameEmpty,
630
      readFrame_i=>readFrame,
631 44 magro732
      readFrameRestart_i=>'0',
632
      readFrameAborted_o=>readFrameAborted,
633
      readWindowEmpty_o=>open,
634
      readWindowReset_i=>'0',
635
      readWindowNext_i=>readFrame,
636 42 magro732
      readContentEmpty_o=>readContentEmpty,
637
      readContent_i=>readContent,
638
      readContentEnd_o=>readContentEnd,
639
      readContentData_o=>readContentData,
640
      writeFrame_i=>writeFrame,
641
      writeFrameAbort_i=>writeFrameAbort,
642
      writeContent_i=>writeContent,
643
      writeContentData_i=>writeContentData);
644
 
645
  TestPortWishboneInst: TestPortWishbone
646
    port map(
647
      clk=>clk,
648
      areset_n=>areset_n,
649
      messageEmpty_o=>wbMessageEmpty,
650
      messageWrite_i=>wbMessageWrite,
651
      message_i=>wbMessage,
652
      messageAck_o=>wbMessageAck,
653
      cyc_i=>wbCyc,
654
      stb_i=>wbStb,
655
      we_i=>wbWe,
656
      adr_i=>wbAdr,
657
      sel_i=>wbSel,
658
      dat_i=>wbDatWrite,
659
      dat_o=>wbDatRead,
660
      err_o=>wbErr,
661
      ack_o=>wbAck);
662
 
663
end architecture;

powered by: WebSVN 2.1.0

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