twk1156 Posted August 6, 2014 Report Posted August 6, 2014 Hello, I have an initialization sequence which should be started first. Only upon the completion of this sequence, other test sequence can be started. For test developer, they don't have to know this sequence. they don't have to start this sequence in their test, how can I make this initialization sequence start first and transparent to test developer? Thanks. Regards, Wenkai Quote
dave_59 Posted August 6, 2014 Report Posted August 6, 2014 Have a test base class for the test developer to extend. The first line of their test's run_phase should call super.run_phase() which is in your base class. That should start the initialization sequence. Quote
twk1156 Posted August 6, 2014 Author Report Posted August 6, 2014 Thank you very much, Dave. This is similar to run sequences in sequential way and it enforce a requirement for test developer. Is there any other way that test developer doesn't have to know and start the initialization sequence? Thanks. BR, Wenkai Quote
uwes Posted August 6, 2014 Report Posted August 6, 2014 hi, there are various ways to implement that. the actual way would depend upon you actual requirements. >This is similar to run sequences in sequential way and it enforce a requirement for test developer well, you either have to express that dependency or ordering in some way (for instance by invoking super.body()) OR you have to establish a convention to follow (such as to put the init sequence into pre_configure_phase and all user sequences into a phase afterwards) /uwe Quote
mastrick Posted August 6, 2014 Report Posted August 6, 2014 If you are using run-time phasing, you simply need to have your environment start the init sequence in some phase before main (perhaps the configure phase), holding the objection until that sequence completes, and then tell test developers that they must run their sequences in main phase (which is the intent of main phase). twk1156 1 Quote
twk1156 Posted August 6, 2014 Author Report Posted August 6, 2014 If you are using run-time phasing, you simply need to have your environment start the init sequence in some phase before main (perhaps the configure phase), holding the objection until that sequence completes, and then tell test developers that they must run their sequences in main phase (which is the intent of main phase). But the driver is running mainly in main phase, so run init sequence in the phase before main phase may not work. I have not tried that yet. Wenkai Quote
dave_59 Posted August 6, 2014 Report Posted August 6, 2014 You should only be using the run phase in your driver. But regardless of which solution you choose, the test developer needs to be informed of the requirements you want to place on your testbench architecture. There is no getting around that. There are linting tools that can check for the proper calls to super.method() and you could also put in run time checks to make sure no other sequences have been started before your required sequence has finished. Quote
twk1156 Posted August 6, 2014 Author Report Posted August 6, 2014 You should only be using the run phase in your driver. But regardless of which solution you choose, the test developer needs to be informed of the requirements you want to place on your testbench architecture. There is no getting around that. There are linting tools that can check for the proper calls to super.method() and you could also put in run time checks to make sure no other sequences have been started before your required sequence has finished. Thank you dave. So I guess I can run driver in run_phase, init sequence in a phase before main phase, ask developer to run user phase in main phase. This sounds working. Regards, Wenkai Quote
dave_59 Posted August 6, 2014 Report Posted August 6, 2014 I would rather you not use anything other than run_phase() and instead use standard OOP practice of overriding the run_phase. twk1156 1 Quote
twk1156 Posted August 7, 2014 Author Report Posted August 7, 2014 I would rather you not use anything other than run_phase() and instead use standard OOP practice of overriding the run_phase. Sure, thank you for the suggestion. Dave. Wenkai Quote
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.