What's the meaning of min and max arg in new of port?

Deall all,

class ovm_blocking_put_port #( type T = int )
  extends ovm_port_base #( tlm_if_base #(T,T) );
  
  function new( string name , ovm_component parent ,
  int min_size = 1 , int max_size = 1 );

What’s the purpose of min_size and max_size?could provide the application for it?
Thank you!

Dear all,
Does OVM provide a explaination for those arguments?
Thank you!

Hi Ahan,

You use these constructor arguments if you want to be able to connect a port to multiple interfaces or if an export provides multiple interfaces. Here “interface” is the term used by the TLM community to describe a class that defines a set of “interface methods” (inherited as pure virtual functions from a virtual (abstract) interface base class) that can be called via a port - it has nothing to do with the SystemVerilog interface construct.

This is sometimes used in transaction-level bus models, e.g. where you want to connect multiple slaves to a single slave port on the bus -changing the default values of min_size and max_size specifies the minimum and maximum number of slaves that could be connected to the port.

Setting max_size to -1 means you can connect an unlimited number of interfaces.

The purpose of the min_size and max_size arguments is mentioned on page 148 of the OVM reference manual.

Regards,
Dave