uvm_rookie Posted August 12, 2011 Report Share Posted August 12, 2011 What is the proper way to specify objection inside a sequence ? Do I need to add objection code in both regular sequences and virtual sequences ? Method 1 : virtual task pre_body(); uvm_test_done.raise_objection(this); endtask : pre_body virtual task post_body(); uvm_test_done.drop_objection(this); endtask : post_body Method 2: virtual task pre_body; if (starting_phase != null) starting_phase.raise_objection(this, "Starting seq"); endtask: pre_body virtual task post_body; if ((get_parent_sequence() == null) && (starting_phase != null)) starting_phase.drop_objection(this, "Ending seq"); endtask: post_body Quote Link to comment Share on other sites More sharing options...
uwes Posted August 16, 2011 Report Share Posted August 16, 2011 hi, >What is the proper way to specify objection inside a sequence ? the typical way would be: virtual task pre_body; if (starting_phase != null) starting_phase.raise_objection(this, "Starting seq"); endtask: pre_body virtual task post_body; if (starting_phase != null) starting_phase.drop_objection(this, "stoping seq"); endtask but finally its upto the user to specify the time ranges which are protected from phase progression. >Do I need to add objection code in both regular sequences and virtual sequences ? you always need to raise an objection if you want the phasing system to wait until your behaviour is finished.this is the same for all like sequences, virtual sequences, initial blocks, running tasks, etc... >your code: - method1 will not really work with the new phasing (because its not objecting the end of a phase) - method2/post_body >if ((get_parent_sequence() == null) && (starting_phase != null)) it seems strange that you have a different expression in the drop which might lead to a different drop number than raise and therefore errors out. /uwe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.