krb Posted March 14, 2011 Report Share Posted March 14, 2011 Hi, I use the uvm_max_quit_count to stop the simulation as needed. This works well except that the check, report, etc phases are not being executed. Is there a way to stop the run_phase, say from a scoreboard component ? I am using UVM1.0ea. Many thanks, krb Quote Link to comment Share on other sites More sharing options...
janick Posted March 15, 2011 Report Share Posted March 15, 2011 The quit count is to abort the simulation after a certain number of errors have been reached. It is to prevent wasting simulation time on runs that are already known to have failed, thus there is no point in running the subsequent phases. You should be using the run_phase objection, with the scoreboard beign the lone dissenter. Once the scoreboard drops its objection to the run_phase, it will terminate. Quote Link to comment Share on other sites More sharing options...
krb Posted March 15, 2011 Author Report Share Posted March 15, 2011 Hi Janick, Many thanks for the suggestion. Will give it a go. krb Quote Link to comment Share on other sites More sharing options...
janick Posted March 15, 2011 Report Share Posted March 15, 2011 I just noticed that you are using UVM-EA... you can achieve the same thing by calling global_stop_request() from your scoreboard BUT this is not a use model that will continue to work once you move to UVM-1.0 Quote Link to comment Share on other sites More sharing options...
krb Posted March 17, 2011 Author Report Share Posted March 17, 2011 Hi Janick, I would prefer to keep my code UVM 1 compatible. I was going through documentation for UVM regarding run_phase objections. I couldn't find any. Can you please elaborate on this suggestion. My aim is to run a reporting function in the scoreboard component(s) at the end of test, so I know how well/bad the test went. Thanks Quote Link to comment Share on other sites More sharing options...
janick Posted March 17, 2011 Report Share Posted March 17, 2011 There is not such thing as "UVM 1". Maybe you meant "UVM-EA"? If that is the case, remember that this was a preview release and NOT an Accelera standard. You *really* ought to migrate to UVM 1.0 If you want a scoreboard reporting function at the end of the test, that is what the check_phase() and report_phase() methods are for. I understand that these are not run if you get max_quit_count -- that's because the test is already known to be a failure, so it is aborted. If you've already issues X number of errors, you already know the test is a failure. Why do you need to run the scoreboard reporting function? And reviewing your earlier message, I don't really get the "I use the uvm_max_quit_count to stop the simulation as needed" bit. You either need to end the simulation normally (which is done by dropping objections) or it is ended abnormally (because of a FATAL or a max # of errors). The former will run your report function, the latter won't because something is known to be broken. Quote Link to comment Share on other sites More sharing options...
krb Posted March 18, 2011 Author Report Share Posted March 18, 2011 I meant UVM 1.0, sorry for the confusion. Yes, we will migrate to UVM 1.0 pretty soon. >>If you've already issues X number of errors, you already know the test is a failure. Why do you need to run the scoreboard reporting function? To see how many failures were there and few other stats. Having them at the end of the log file is really handy for post processing. >>And reviewing your earlier message, I don't really get the "I use the uvm_max_quit_count to stop the simulation as needed" bit. You either need to end the simulation normally (which is done by dropping objections) or it is ended abnormally (because of a FATAL or a max # of errors). The former will run your report function, the latter won't because something is known to be broken. I was hoping to stop the run_phase when the uvm_max_quit_count is reached (after which I wanted to run the report phase). I couldn't find any documentation for stopping the run_phase by using objections. Can you point me to some please. Quote Link to comment Share on other sites More sharing options...
janick Posted March 18, 2011 Report Share Posted March 18, 2011 Then call your scoreboard summary method in the pre_abort() method: class sb extends uvm_component; ... function void do_report(); ... endfunction function void pre_abort(); do_report(); endfunction function void report_phase(uvm_phase phase); super.report_phase(phase); do_report(); endfunction endclass As for help on objections and the end-of-phase mechanism, the committee did not have time to complete the Phasing section of the User Guide. In the meantime, you can check the UVM Tutorial that was presented at DVCon last month and the examples in the $UVM_HOME/examples/simple/phases and $UVM_HOME/examples/integrated/codec directories. Quote Link to comment Share on other sites More sharing options...
krb Posted March 23, 2011 Author Report Share Posted March 23, 2011 Hi Janick, Thanks for the advice. I understood the pre_abort usage. But I didn't understand the usage of report_phase. I did a quick search of report_phase in uvm1.0 reference doc, and found that report_ph should be used and report_phase should not be called directly. Another question, regarding uvm1.0ea and uvm1.0. Is the uvm1.0ea report function being replaced in uvm1.0 ? Many thanks, krb Quote Link to comment Share on other sites More sharing options...
janick Posted March 23, 2011 Report Share Posted March 23, 2011 The code above is correct. It is "report_phase()", not "report_ph()". Yes, do not call it directly: hence the "do_report()" method. Yes, "report()" (and "build()" and "run()" and "connect()" and ...) is being replaced with "report_phase()" (and "build_phase()" and (run_phase()" and ...). 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.