manjubshetty Posted October 5, 2012 Report Share Posted October 5, 2012 Hey, I have a requirement where sequence needs to kill itself, if some condition is satisfied. I am using "disable" to do it. In the body of the sequence, I have something like this: body() begin: name do something; if(condition) disable name; do something else; end It works but is there a better way to do this in UVM/OVM? Thanks and Regards, Manju Shetty Quote Link to comment Share on other sites More sharing options...
uwes Posted October 5, 2012 Report Share Posted October 5, 2012 hi, i would avoid using thread/process like commands on an executing sequence like fork/join/kill/suspend/disable. the reason for this is that inside the sequencer/sequence/driver there are handshakes and other processes working. forcefully ending parts of the engine may cause hangs, lockups etc. you may have a look at the mantis collection showing some issues. if you really want a sequence to stop you should be using the official api "seq.kill()" or as hook "do_kill()" /uwe Quote Link to comment Share on other sites More sharing options...
mastrick Posted October 5, 2012 Report Share Posted October 5, 2012 Manju, Perhaps there is more to your code, but could you just call return where you have the disable? I believe seq.kill() will mean that post_body() will not execute and you may want that to drop objections, etc. Mark Quote Link to comment Share on other sites More sharing options...
manjubshetty Posted October 30, 2012 Author Report Share Posted October 30, 2012 Uwes and Mark, Thank you. Uwes approach works for my sequences. With Mark's approach i get compile error: The 'return' statement cannot span parallel block boundary [systemVerilog]. Mark has a valid point, though. If we are using kill(), arent we missing post_body()? Regards, Manju Shetty 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.