task ovm_root::run_test(string test_name="");
bit testname_plusarg;
string msg;
testname_plusarg = 0;
I found the fisrt time it will invoke run_test and sencond time top.run_test will invoke ovm_root::run_test.
What’s the difference between those two run_test?
Thank you!
task run_test is a global task that can be called without an object handle. It is really just a convenience function that calls the run_test task on the root singleton object.
task ovm_root::run_test is the member function of the ovm_root singleton object. In version 1.1, there is now a single, global “manager” object with the type ovm_root and the handle name ovm_top. You now use this handle to do things like stop the run task, find components, etc. Many 1.0 ovm_component functions were moved to ovm_root, and should be called through ovm_top.
There is no difference between them. The global function just gets the handle to ovm_top and calls the member function. You can use either one.
Hi Kurts,
then global run_test and ovm_root:: run_test is different task right?
Here is my undertanding,please correct me:
global run_test() is defined out side any class body,so it’s global.
global run_test creat a ovm_root object named ovm_top,then ovm_top call the run_test task which is defined for ovm_root::run_test.
right?
Thank you very much!