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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [PCIe/] [sim/] [src/] [riffa_agent_class_pkg.sv] - Diff between revs 32 and 35

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 32 Rev 35
Line 38... Line 38...
  class riffa_agent_class #(N);
  class riffa_agent_class #(N);
 
 
    riffa_transaction_class #(N) tr_h;
    riffa_transaction_class #(N) tr_h;
    rp_tx_bfm_class #(N) tx_h;
    rp_tx_bfm_class #(N) tx_h;
    rp_rx_bfm_class #(N) rx_h;
    rp_rx_bfm_class #(N) rx_h;
    mailbox #(riffa_transaction_class #(N)) q;
    // mailbox #(riffa_transaction_class #(N)) tx_q, rx_q;
 
    mailbox #(riffa_transaction_class #(N)) tx_q;
 
 
 
 
    // --------------------------------------------------------------------
    // --------------------------------------------------------------------
    //
    //
    task queue_tx(riffa_transaction_class #(N) tr_h);
    task queue_tx(riffa_transaction_class #(N) tr_h);
      tx_h.put(tr_h);
      tx_h.put(tr_h);
      q.put(tr_h);
      tx_q.put(tr_h);
    endtask: queue_tx
    endtask: queue_tx
 
 
 
 
    // --------------------------------------------------------------------
    // --------------------------------------------------------------------
    //
    //
 
    task queue_tx_constant(int len, int off, bit last, logic [(8*N)-1:0] value);
 
      tr_h = new(len, off, last);
 
      tr_h.constant(len, off, last, value);
 
      tx_h.put(tr_h);
 
      tx_q.put(tr_h);
 
    endtask: queue_tx_constant
 
 
 
 
 
    // --------------------------------------------------------------------
 
    //
 
    task queue_tx_counting(int len, int off, bit last);
 
      tr_h = new(len, off, last);
 
      tr_h.counting(len, off, last);
 
      tx_h.put(tr_h);
 
      tx_q.put(tr_h);
 
    endtask: queue_tx_counting
 
 
 
 
 
    // --------------------------------------------------------------------
 
    //
    task queue_tx_random(int len, int off, bit last);
    task queue_tx_random(int len, int off, bit last);
      tr_h = new(len, off, last);
      tr_h = new(len, off, last);
      tr_h.random(len, off, last);
      tr_h.random(len, off, last);
      tx_h.put(tr_h);
      tx_h.put(tr_h);
      q.put(tr_h);
      tx_q.put(tr_h);
    endtask: queue_tx_random
    endtask: queue_tx_random
 
 
 
 
    // --------------------------------------------------------------------
    // --------------------------------------------------------------------
    //
    //
    task queue_rx(int len, int off, bit last);
    task queue_rx(int len, int off, bit last);
      tr_h = new(len, off, last);
      tr_h = new(len, off, last);
      rx_h.put(tr_h);
      rx_h.put(tr_h);
 
      // rx_q.put(tr_h);
    endtask: queue_rx
    endtask: queue_rx
 
 
 
 
    // --------------------------------------------------------------------
    // --------------------------------------------------------------------
    //
    //
Line 86... Line 108...
    //--------------------------------------------------------------------
    //--------------------------------------------------------------------
    //
    //
    function new(virtual riffa_chnl_if #(.N(N)) chnl_bus);
    function new(virtual riffa_chnl_if #(.N(N)) chnl_bus);
      tx_h = new(chnl_bus);
      tx_h = new(chnl_bus);
      rx_h = new(chnl_bus);
      rx_h = new(chnl_bus);
      this.q = new;
      this.tx_q = new;
 
      // this.rx_q = new;
    endfunction: new
    endfunction: new
 
 
 
 
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  //
  //

powered by: WebSVN 2.1.0

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