Analysis Ports

This section defines the port, export, and imp classes used for transaction analysis.

Contents
Analysis PortsThis section defines the port, export, and imp classes used for transaction analysis.
uvm_analysis_portBroadcasts a value to all subscribers implementing a uvm_analysis_imp.
uvm_analysis_impReceives all transactions broadcasted by a uvm_analysis_port.
uvm_analysis_exportExports a lower-level uvm_analysis_imp to its parent.

uvm_analysis_port

Broadcasts a value to all subscribers implementing a uvm_analysis_imp.

class mon extends uvm_component;
  uvm_analysis_port#(trans) ap;

  function new(string name = "sb", uvm_component parent = null);
     super.new(name, parent);
     ap = new("ap", this);
  endfunction

  task run_phase(uvm_phase phase);
      trans t;
      ...
      ap.write(t);
      ...
  endfunction
endclass
Summary
uvm_analysis_port
Broadcasts a value to all subscribers implementing a uvm_analysis_imp.
Class Hierarchy
uvm_port_base#(uvm_tlm_if_base#(T,T))
uvm_analysis_port
Class Declaration
class uvm_analysis_port # (
    type  T  =  int
) extends uvm_port_base # (uvm_tlm_if_base #(T,T))
Methods
writeSend specified value to all connected interface

write

function void write ( input  t )

Send specified value to all connected interface

uvm_analysis_imp

Receives all transactions broadcasted by a uvm_analysis_port.  It serves as the termination point of an analysis port/export/imp connection.  The component attached to the imp class--called a subscriber-- implements the analysis interface.

Will invoke the write(T) method in the parent component.  The implementation of the write(T) method must not modify the value passed to it.

class sb extends uvm_component;
  uvm_analysis_imp#(trans, sb) ap;

  function new(string name = "sb", uvm_component parent = null);
     super.new(name, parent);
     ap = new("ap", this);
  endfunction

  function void write(trans t);
      ...
  endfunction
endclass
Summary
uvm_analysis_imp
Receives all transactions broadcasted by a uvm_analysis_port.
Class Hierarchy
uvm_port_base#(uvm_tlm_if_base#(T,T))
uvm_analysis_imp
Class Declaration
class uvm_analysis_imp #(
    type  T  =  int,
    type  IMP  =  int
) extends uvm_port_base #(uvm_tlm_if_base #(T,T))

uvm_analysis_export

Exports a lower-level uvm_analysis_imp to its parent.

Summary
uvm_analysis_export
Exports a lower-level uvm_analysis_imp to its parent.
Class Hierarchy
uvm_port_base#(uvm_tlm_if_base#(T,T))
uvm_analysis_export
Class Declaration
class uvm_analysis_export #(
    type  T  =  int
) extends uvm_port_base #(uvm_tlm_if_base #(T,T))
Methods
newInstantiate the export.

new

function new ( string  name,   
uvm_component  parent  =  null )

Instantiate the export.

class uvm_analysis_port # (
    type  T  =  int
) extends uvm_port_base # (uvm_tlm_if_base #(T,T))
Broadcasts a value to all subscribers implementing a uvm_analysis_imp.
class uvm_analysis_imp #(
    type  T  =  int,
    type  IMP  =  int
) extends uvm_port_base #(uvm_tlm_if_base #(T,T))
Receives all transactions broadcasted by a uvm_analysis_port.
class uvm_analysis_export #(
    type  T  =  int
) extends uvm_port_base #(uvm_tlm_if_base #(T,T))
Exports a lower-level uvm_analysis_imp to its parent.
function void write ( input  t )
Send specified value to all connected interface
function new ( string  name,   
uvm_component  parent  =  null )
Instantiate the export.