Sign in to follow this  
Followers 0
SeanChou

How to create different phase domain?

4 posts in this topic

Hi, UVM Exports,

 

I am writing a test to put 2 uvm_env A and B together and hope to separate them in different domains. I hope to give each environment his own run_phases time line. how could I do this? thanks! hope you could provide some hints or several lines of code for my reference. thanks a lot!

Share this post


Link to post
Share on other sites

Hi Sean,

We don't recommend the use of multiple scheduling domains. Instead, you could have a virtual sequence in each env. These two env-virtual-sequences would function effectively as independent "run_phase time lines." These two sequences could also be coordinated via a virtual sequence in your test, if necessary.

Perhaps if you could explain why you think you need multiple different domains, we might be able to get you where you need to be in the most efficient way.

-Tom

Share this post


Link to post
Share on other sites

yes, I agree with you that the on-the-fly reset idea could be implemented by only sequence without any phase jump. However, my situation now is the 2 existing environments already implemented the on-the-fly reset by using phase jump from main_phase to pre_reset_phase(). 

 

In integrated environment, The phase jump on-the-fly reset seems still works veritcally, Besides the 2 interfaces are reseted in same time (i guess because they works in the phase in default), for the purpose the separte them temporally. I try to separate them into different domains.

 

Still thanks for your suggestion, could you let me know the reason and we may not to implment on-the-fly reset by phase jump in the future.

Share this post


Link to post
Share on other sites

It is very easy to assign one of your interfaces into a different domain that is completely independent from the original domain (the only points of synchronization will be the beginning and end of the run_phase).  Simply create a new domain and use uvm_component::set_domain() to associate it with the component.

   uvm_domain new_domain = new ;

   root_of_interface.set_domain(new_domain); // default is to apply this to all lower levels of hierarchy

 

If you do not want these two domains to be completely independent, but instead act as if they were in the same domain with the exception that one can jump back to pre_reset without the other, then you need to synchronize the domains.

    domain1.sync(domain2) ;

 

We find the phase jump to be more convenient than the virtual sequence because the virtual sequence has to be implemented by the testbench integrator taking into account each component, while the phase behavior can be specified by the component implementor and used as-is by the testbench integrator.  With either approach, the components must respond appropriately to a midsim reset.  We recommend the components have a monitor of the reset signal and clear all status appropriately based on that.  Any sequences that should be stopped must be taken care of.  Sequence behavior is the biggest gotcha of the current phase jumping as it terminates abruptly any sequences started from a phase task or via default_sequence in the config_db.  If you already have midsim reset working ok with one domain, you are probably OK there.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0