TLM Implementation Port Declaration Macros

The TLM implemenation declaration macros provide a way for an implementer to provide multiple implemenation ports of the same implementation interface.  When an implementation port is defined using the built-in set of imps, there must be exactly one implementation of the interface.

For example, if a component needs to provide a put implemenation then it would have an implementation port defined like:

class mycomp extends ovm_component;
  ovm_put_imp#(data_type, mycomp) put_imp;
  ...
  virtual task put (data_type t);
    ...
  endtask
endclass

There are times, however, when you need more than one implementation for for an interface.  This set of declarations allow you to easily create a new implemenation class to allow for multiple implementations.  Although the new implemenation class is a different class, it can be bound to the same types of exports and ports as the original class.  Extending the put example above, lets say that mycomp needs to provide two put implementation ports.  In that case, you would do something like:

//Define two new put interfaces which are compatible with ovm_put_ports
//and ovm_put_exports.

`ovm_put_imp_decl(_1)
`ovm_put_imp_decl(_2)

class my_put_imp#(type T=int) extends ovm_component;
   ovm_put_imp_1#(T) put_imp1;
   ovm_put_imp_2#(T) put_imp2;
   ...
   function void put_1 (input T t);
     //puts comming into put_imp1
     ...
   endfunction
   function void put_2(input T t);
     //puts comming into put_imp2
     ...
   endfunction
endclass

The important thing to note is that each `ovm_<interface>_imp_decl creates a new class of type ovm_<interface>_imp<suffix>, where suffix is the input argument to the macro.  For this reason, you will typically want to put these macros in a seperate package to avoid collisions and to allow sharing of the definitions.

Summary
TLM Implementation Port Declaration Macros
The TLM implemenation declaration macros provide a way for an implementer to provide multiple implemenation ports of the same implementation interface.
Macros
`ovm_blocking_put_imp_declDefine the class ovm_blocking_put_impSFX for providing blocking put implementations.
`ovm_nonblocking_put_imp_declDefine the class ovm_nonblocking_put_impSFX for providing non-blocking put implementations.
`ovm_put_imp_declDefine the class ovm_put_impSFX for providing both blocking and non-blocking put implementations.
`ovm_blocking_get_imp_declDefine the class ovm_blocking_get_impSFX for providing blocking get implementations.
`ovm_nonblocking_get_imp_declDefine the class ovm_nonblocking_get_impSFX for providing non-blocking get implementations.
`ovm_get_imp_declDefine the class ovm_get_impSFX for providing both blocking and non-blocking get implementations.
`ovm_blocking_peek_imp_declDefine the class ovm_blocking_peek_impSFX for providing blocking peek implementations.
`ovm_nonblocking_peek_imp_declDefine the class ovm_nonblocking_peek_impSFX for providing non-blocking peek implementations.
`ovm_peek_imp_declDefine the class ovm_peek_impSFX for providing both blocking and non-blocking peek implementations.
`ovm_blocking_get_peek_imp_declDefine the class ovm_blocking_get_peek_impSFX for providing the blocking get_peek implemenation.
`ovm_nonblocking_get_peek_imp_declDefine the class ovm_nonblocking_get_peek_impSFX for providing non-blocking get_peek implemenation.
`ovm_get_peek_imp_declDefine the class ovm_get_peek_impSFX for providing both blocking and non-blocking get_peek implementations.
`ovm_blocking_master_imp_declDefine the class ovm_blocking_master_impSFX for providing the blocking master implemenation.
`ovm_nonblocking_master_imp_declDefine the class ovm_nonblocking_master_impSFX for providing the non-blocking master implemenation.
`ovm_master_imp_declDefine the class ovm_master_impSFX for providing both blocking and non-blocking master implementations.
`ovm_blocking_slave_imp_declDefine the class ovm_blocking_slave_impSFX for providing the blocking slave implemenation.
`ovm_nonblocking_slave_imp_declDefine the class ovm_nonblocking_slave_impSFX for providing the non-blocking slave implemenation.
`ovm_slave_imp_declDefine the class ovm_slave_impSFX for providing both blocking and non-blocking slave implementations.
`ovm_blocking_transport_imp_declDefine the class ovm_blocking_transport_impSFX for providing the blocking transport implemenation.
`ovm_nonblocking_transport_imp_declDefine the class ovm_nonblocking_transport_impSFX for providing the non-blocking transport implemenation.
`ovm_transport_imp_declDefine the class ovm_transport_impSFX for providing both blocking and non-blocking transport implementations.
`ovm_analysis_imp_declDefine the class ovm_analysis_impSFX for providing an analysis implementation.

`ovm_blocking_put_imp_decl

Define the class ovm_blocking_put_impSFX for providing blocking put implementations.  SFX is the suffix for the new class type.

`ovm_nonblocking_put_imp_decl

Define the class ovm_nonblocking_put_impSFX for providing non-blocking put implementations.  SFX is the suffix for the new class type.

`ovm_put_imp_decl

Define the class ovm_put_impSFX for providing both blocking and non-blocking put implementations.  SFX is the suffix for the new class type.

`ovm_blocking_get_imp_decl

Define the class ovm_blocking_get_impSFX for providing blocking get implementations.  SFX is the suffix for the new class type.

`ovm_nonblocking_get_imp_decl

Define the class ovm_nonblocking_get_impSFX for providing non-blocking get implementations.  SFX is the suffix for the new class type.

`ovm_get_imp_decl

Define the class ovm_get_impSFX for providing both blocking and non-blocking get implementations.  SFX is the suffix for the new class type.

`ovm_blocking_peek_imp_decl

Define the class ovm_blocking_peek_impSFX for providing blocking peek implementations.  SFX is the suffix for the new class type.

`ovm_nonblocking_peek_imp_decl

Define the class ovm_nonblocking_peek_impSFX for providing non-blocking peek implementations.  SFX is the suffix for the new class type.

`ovm_peek_imp_decl

Define the class ovm_peek_impSFX for providing both blocking and non-blocking peek implementations.  SFX is the suffix for the new class type.

`ovm_blocking_get_peek_imp_decl

Define the class ovm_blocking_get_peek_impSFX for providing the blocking get_peek implemenation.

`ovm_nonblocking_get_peek_imp_decl

Define the class ovm_nonblocking_get_peek_impSFX for providing non-blocking get_peek implemenation.

`ovm_get_peek_imp_decl

Define the class ovm_get_peek_impSFX for providing both blocking and non-blocking get_peek implementations.  SFX is the suffix for the new class type.

`ovm_blocking_master_imp_decl

Define the class ovm_blocking_master_impSFX for providing the blocking master implemenation.

`ovm_nonblocking_master_imp_decl

Define the class ovm_nonblocking_master_impSFX for providing the non-blocking master implemenation.

`ovm_master_imp_decl

Define the class ovm_master_impSFX for providing both blocking and non-blocking master implementations.  SFX is the suffix for the new class type.

`ovm_blocking_slave_imp_decl

Define the class ovm_blocking_slave_impSFX for providing the blocking slave implemenation.

`ovm_nonblocking_slave_imp_decl

Define the class ovm_nonblocking_slave_impSFX for providing the non-blocking slave implemenation.

`ovm_slave_imp_decl

Define the class ovm_slave_impSFX for providing both blocking and non-blocking slave implementations.  SFX is the suffix for the new class type.

`ovm_blocking_transport_imp_decl

Define the class ovm_blocking_transport_impSFX for providing the blocking transport implemenation.

`ovm_nonblocking_transport_imp_decl

Define the class ovm_nonblocking_transport_impSFX for providing the non-blocking transport implemenation.

`ovm_transport_imp_decl

Define the class ovm_transport_impSFX for providing both blocking and non-blocking transport implementations.  SFX is the suffix for the new class type.

`ovm_analysis_imp_decl

Define the class ovm_analysis_impSFX for providing an analysis implementation.  SFX is the suffix for the new class type.  The analysis implemenation is the write function.  The `ovm_analysis_imp_decl allows for a scoreboard (or other analysis component) to support input from many places.  For example:

`ovm_analysis_imp_decl(_ingress)
`ovm_analysis_imp_port(_egress)

class myscoreboard extends ovm_component;
  ovm_analysis_imp_ingress#(mydata, myscoreboard) ingress;
  ovm_analysis_imp_egress#(mydata, myscoreboard) egress;
  mydata ingress_list[$];
  ...

  function new(string name, ovm_component parent);
    super.new(name,parent);
    ingress = new("ingress", this);
    egress = new("egress", this);
  endfunction

  function void write_ingress(mydata t);
    ingress_list.push_back(t);
  endfunction

  function void write_egress(mydata t);
    find_match_in_ingress_list(t);
  endfunction

  function void find_match_in_ingress_list(mydata t);
    //implement scoreboarding for this particular dut
    ...
  endfunction
endclass