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] - Rev 50

Compare with Previous | Blame | View Log

// --------------------------------------------------------------------
class s_riffa_rp_rx_api extends uvm_sequence #(riffa_sequence_item);
  `uvm_object_utils(s_riffa_rp_rx_api)

  // --------------------------------------------------------------------
  riffa_sequence_item item;
  int dwidth;
  // mailbox #(riffa_sequence_item) q;

  // --------------------------------------------------------------------
  uvm_sequencer_base o_seqr;
  uvm_sequence_base o_parent;

  function void init(uvm_sequencer_base o_seqr, uvm_sequence_base o_parent, int dwidth);
    this.o_seqr   = o_seqr;
    this.o_parent = o_parent;
    this.dwidth   = dwidth;
  endfunction : init

  // --------------------------------------------------------------------
  task display(bit [31:0] len, bit [30:0] off, bit last=1);
    item = riffa_sequence_item::type_id::create("riffa_sequence_item");
    item.tr = RIFFA_TX_PAYLOAD;
    this.start(o_seqr, o_parent);

    foreach(item.data[i])
      $display("##### %d | 0x%h", i, item.data[i]);
  endtask

  // --------------------------------------------------------------------
  task get(bit [31:0] len, bit [30:0] off, bit last=1);
    item = riffa_sequence_item::type_id::create("riffa_sequence_item");
    item.tr = RIFFA_TX_PAYLOAD;
    this.start(o_seqr, o_parent);
  endtask

  // --------------------------------------------------------------------
  task body();
    start_item(item);
    finish_item(item);
  endtask

  // --------------------------------------------------------------------
  function new(string name = "s_riffa_rp_rx_api");
    super.new(name);
    // q = new;
  endfunction

// --------------------------------------------------------------------
endclass

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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