PDA

View Full Version : How to stop the simulation



chihchiehhuang
01-23-2008, 11:29 PM
Guys,
Beside calling the function global_stop_request() to stop the simulaction in ovm_test. Is there any way to stop the simulation like eRM raise/drop objection in OVM ?
Regards,
Justin

goyalnilay
01-29-2008, 04:20 AM
global_stop_request() with 'enable_stop_interrupt' bit appears to be the best way to stop simulation gracefully in OVM.

The use of enable_stop_interrupt bit is just like the objection mechanism in eRM.
You can set this bit to 0 to raise an objection and set this bit to 1 to drop objection.
global_stop_request() can call the the stop task in the components only when this bit is set in that particular component.

One of the not-so-good ways to stop simulation is calling $finish when u require to end the simulation... :rolleyes:

Thanks,
Nilay Goyal
eInfochips Ltd.
www.einfochips.com

bromleyj
02-18-2008, 10:32 AM
goyalnilay said:


global_stop_request() with 'enable_stop_interrupt' bit
appears to be the best way to stop simulation gracefully in OVM.
The use of enable_stop_interrupt bit is just like the objection
mechanism in eRM.


I don't think it's "just like"; if you don't set "enable_stop_interrupt" then
the global_stop_request mechanism has no effect whatever on that object.

I've just finished prototyping an objection package in SV that attempts to
mimic the simplest features of eRM objections. It has one built-in (static)
objection object called "STOP_TEST" that's used by default, and static
methods ovm_objection::raise_objection and drop_objection. As in eRM,
when the STOP_TEST objection's count falls to zero, the test is stopped
by calling global_stop_request(). You can add your own new objections
if you wish - just derive a class from ovm_objection and override its
new() and complete() methods (see comments in the file).

This is really, really simple right now - pre-alpha! - but you're welcome to
try it. Just import the package and call the raise/drop methods; nothing
else is needed.

Jonathan Bromley
Doulos

arunnarraj
10-23-2008, 10:14 PM
goyalnilay said:


I don't think it's "just like"; if you don't set "enable_stop_interrupt" then
the global_stop_request mechanism has no effect whatever on that object.

I've just finished prototyping an objection package in SV that attempts to
mimic the simplest features of eRM objections. It has one built-in (static)
objection object called "STOP_TEST" that's used by default, and static
methods ovm_objection::raise_objection and drop_objection. As in eRM,
when the STOP_TEST objection's count falls to zero, the test is stopped
by calling global_stop_request(). You can add your own new objections
if you wish - just derive a class from ovm_objection and override its
new() and complete() methods (see comments in the file).

This is really, really simple right now - pre-alpha! - but you're welcome to
try it. Just import the package and call the raise/drop methods; nothing
else is needed.

Jonathan Bromley
Doulos

hi jonathan can u please explain with one example that how to use raise objection and drop objection to gracefully terminate the simulation

ggorman
11-12-2008, 10:44 AM
The current objection checking doesn't work correctly, but it might be that Jonathan's proposal will take care of it. Where the current method falls short is that global_stop_request() immediately calls all object's stop() task that have enable_stop_interrupt set. If a driver, for instance, objects at that time, simulation will continue until it returns from stop() as expected -- as a result of driving that transaction, the scoreboard would now like to object; but it's too late -- global_sop_request() has already gotten its answer that it doesn't object and won't call its stop() task again.

Jonathan, does your proposal overcome this shortcoming? I'll give it a try now as well.

George