cliffc Posted February 12, 2013 Report Share Posted February 12, 2013 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 Quote Link to comment Share on other sites More sharing options...
dave_59 Posted February 12, 2013 Report Share Posted February 12, 2013 Hi Cliff, Didn't you write a paper on this? If you use stop_request() and/or global_stop_request(), then you will need to use the plusarg +UVM_USE_OVM_RUN_SEMANTIC, otherwise your testbench will end prematurely without awaiting your stop_request(). Quote Link to comment Share on other sites More sharing options...
cliffc Posted February 13, 2013 Author Report Share Posted February 13, 2013 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 Quote Link to comment Share on other sites More sharing options...
smallnokia Posted February 13, 2013 Report Share Posted February 13, 2013 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 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.