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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [PCIe/] [sim/] [src/] [RIFFA/] [s_riffa_rp_rx_api.svh] - Blame information for rev 50

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 50 qaztronic
// --------------------------------------------------------------------
2
class s_riffa_rp_rx_api extends uvm_sequence #(riffa_sequence_item);
3
  `uvm_object_utils(s_riffa_rp_rx_api)
4
 
5
  // --------------------------------------------------------------------
6
  riffa_sequence_item item;
7
  int dwidth;
8
  // mailbox #(riffa_sequence_item) q;
9
 
10
  // --------------------------------------------------------------------
11
  uvm_sequencer_base o_seqr;
12
  uvm_sequence_base o_parent;
13
 
14
  function void init(uvm_sequencer_base o_seqr, uvm_sequence_base o_parent, int dwidth);
15
    this.o_seqr   = o_seqr;
16
    this.o_parent = o_parent;
17
    this.dwidth   = dwidth;
18
  endfunction : init
19
 
20
  // --------------------------------------------------------------------
21
  task display(bit [31:0] len, bit [30:0] off, bit last=1);
22
    item = riffa_sequence_item::type_id::create("riffa_sequence_item");
23
    item.tr = RIFFA_TX_PAYLOAD;
24
    this.start(o_seqr, o_parent);
25
 
26
    foreach(item.data[i])
27
      $display("##### %d | 0x%h", i, item.data[i]);
28
  endtask
29
 
30
  // --------------------------------------------------------------------
31
  task get(bit [31:0] len, bit [30:0] off, bit last=1);
32
    item = riffa_sequence_item::type_id::create("riffa_sequence_item");
33
    item.tr = RIFFA_TX_PAYLOAD;
34
    this.start(o_seqr, o_parent);
35
  endtask
36
 
37
  // --------------------------------------------------------------------
38
  task body();
39
    start_item(item);
40
    finish_item(item);
41
  endtask
42
 
43
  // --------------------------------------------------------------------
44
  function new(string name = "s_riffa_rp_rx_api");
45
    super.new(name);
46
    // q = new;
47
  endfunction
48
 
49
// --------------------------------------------------------------------
50
endclass

powered by: WebSVN 2.1.0

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