In reply to tfitz:
Hi,
Actually I have to implement phase jumping. Thats why hung up in it only.
I have written following to set_domain .
class my_driver extends uvm_driver;
uvm_domain driver_domain;
uvm_domain get_driver_domain;
string driver_domain_name; // string to display domain assigned
uvm_domain driver_domains[string]; // to display all available domains of my_driver
endclass : my_driver
function void my_driver:: build_phase( uvm_phase phase );
super.build_phase( phase );
ap = new(“ap”, this);
uvm_report_info(get_full_name()," my_driver:: build_phase()",UVM_NONE);
driver_domain = new(“uvm_domain_driver”);
//define_domain(driver_domain);
this.set_domain(driver_domain,1);
driver_domain_name = phase.get_domain_name();
get_driver_domain = get_domain();
uvm_domain:: get_domains(driver_domains);
$display(“driver is in domain: %s” ,driver_domain_name);
endfunction : build_phase
class my_monitor extends uvm_monitor;
uvm_domain monitor_domain;
uvm_domain get_monitor_domain;
string monitor_domain_name; // string to display domain assigned
uvm_domain monitor_domains[string]; // to display all available domains of my_monitor
endclass : my_monitor
function void my_monitor:: build_phase( uvm_phase phase );
super.build_phase( phase );
ap = new(“ap”, this);
uvm_report_info(get_full_name()," my_monitor:: build_phase()",UVM_NONE);
monitor_domain = new(“uvm_domain_monitor”);
//define_domain(monitor_domain);
this.set_domain(monitor_domain,1);
monitor_domain_name = phase.get_domain_name();
get_monitor_domain = get_domain();
uvm_domain:: get_domains(monitor_domains);
$display(“monitor is in domain: %s” ,monitor_domain_name);
endfunction : build_phase
When I am creating a new object of uvm_domain as driver_domain then, then number of domains available to phase are increased by 1.But, set_domain command is not setting the domain to the assigned domain_type.
After using get_domain_name , I am getting the default domain value for that phase.
As per my understanding, set_domain() itself calls define_domain().
Do, I need to edit define_domain() ??
Also I am trying to unsynchronise both these domains using :
monitor_domain.unsync(.target(monitor_domains[driver_domain]));
Is it correct???
Where and how should I write this line to unsynchronise.