Jump to content

global_stop_request() does not work in UVM?


Recommended Posts

Does the global_stop_request() command still work in UVM?

I know the preferred mechanism to stop tests is to raise and drop objections.

In the test1 raise/drop objection example below, the test runs for 100ns and prints two messages.

In the test2 global_stop_request() example below, the test runs for 0ns and only prints the time-0 message.

class test1 extends uvm_test;

`uvm_component_utils(test1)

function new (string name="test1", uvm_component parent);

super.new(name, parent);

endfunction

task run_phase(uvm_phase phase);

phase.raise_objection(this);

`uvm_info("test1", "test1 started ...", UVM_MEDIUM)

#100ns;

`uvm_info("test1", "test1 ran 100ns ...", UVM_MEDIUM)

phase.drop_objection(this);

endtask

endclass

class test2 extends uvm_test;

`uvm_component_utils(test2)

function new (string name="test2", uvm_component parent);

super.new(name, parent);

endfunction

task run_phase(uvm_phase phase);

`uvm_info("test2", "test2 started ...", UVM_MEDIUM)

#100ns;

`uvm_info("test2", "test2 ran 100ns ...", UVM_MEDIUM)

global_stop_request();

endtask

endclass

Regards - Cliff Cummings

www.sunburst-design.com

Link to comment
Share on other sites

Hi, Dave -

Why yes I did write a paper on this topic, but the paper was released before UVM was released, so the paper addressed OVM run-time semantics.

Thanks for the plusarg switch. I did not know that this switch existed. I will give this a try.

Thanks-much for the reply. I'm not sure where I would have found documentation on this command line switch.

Regards - Cliff

Link to comment
Share on other sites

Hi cliffc,

In UVM GOLDEN Reference Guide, Page 63, it is mentioned that "UVM provides an "objection" mechanism for this purpose. Other methods of stopping simulation, which were used in OVM and UVM-EA, such as calling global_stop_request, are deprecated in UVM.

So in order to make it compatible to OVM, you should use the switch posted by dave_59, I think.

Regards,

Hi, Dave -

Why yes I did write a paper on this topic, but the paper was released before UVM was released, so the paper addressed OVM run-time semantics.

Thanks for the plusarg switch. I did not know that this switch existed. I will give this a try.

Thanks-much for the reply. I'm not sure where I would have found documentation on this command line switch.

Regards - Cliff

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...