In reply to chr_sue:
In reply to verif_learner:
See here the source code:
virtual class uvm_monitor extends uvm_component;
// Function: new
//
// Creates and initializes an instance of this class using the normal
// constructor arguments for <uvm_component>: ~name~ is the name of the
// instance, and ~parent~ is the handle to the hierarchical parent, if any.
function new (string name, uvm_component parent);
super.new(name, parent);
endfunction
const static string type_name = "uvm_monitor";
virtual function string get_type_name ();
return type_name;
endfunction
endclass
Don’t consider this as a limitation. In reality it gives you all the freedom you need.
what freedom are you talking about?
Can you tell me how I can create 2 instances of the same user defined monitor class. Both these monitors should send different transaction types on its analysis port, apart from using factory method?
I can do what I stating above in case of driver, as I can pass 2 different transaction type class to the 2 instances. Of course, driver will connect to sequencer and not to scoreboard but that’s not the important part here.