Home > Community > Blogs > Functional Verification > new ovm e testflow features introduce increased automation
 
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more conveniennt.

Register | Membership benefits
Get email delivery of the Functional Verification blog (individual posts).
 

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

New OVM-e Testflow Features Introduce Increased Automation

Comments(0)Filed under: Functional Verification, Testbench simulation, Verification methodology , OVM, eRM, OVMWorld, Open Verification Methodology, e, Specman, OVM e, Aspect Oriented Programming, when sub-typing, OVM-e, Kaberi

Hi All,

With the release of the OVM-e library, there are now many new features available for users to take full advantage of.  I would like to discuss one new feature that, when introduced into a users environment, allows for much greater automation and control over a given simulation run.

The e language has had built-in test phases for close to a decade now.  Users of e will be very familiar with the following phase methods, executed in order, every time a simulation is run:

  • init()
  • generate()
  • run()
  • extract()
  • check()
  • finalize()

Every struct and unit within the e language contains the above built-in methods (and actually quite a few more) that users can extend appropriately to introduce functionality specific to that particular phase.  For example, the run() methods are typically extended to start any data generation/extraction methods that will drive/sample RTL signals.  The check() methods can be extended to verify that a scoreboard is empty at the end of a simulation and, if not, print out all remaining items to assist with debugging.  Whenever a simulation is run, the above methods for every struct and unit in the verification environment are called in the correct sequence and all user-specific functionality is automatically executed..

Our customers have found the above methods incredibly useful however, they have also found that, during the simulation run phase, there are a number of common tasks that are usually performed once we start interacting with the DUT.  More than that, some of these tasks require synchronization among several components of the verification environment. For example - the BFM wants something to start right after reset ended, but the information of reset status is part of the monitor logic. The new Testflow feature of OVM-e builds upon the above methods and introduces an expanded run phase that allows users to tap into a number of additional built-in methods to perform such common tasks as hard/soft resets, initializing the DUT, driving/receiving data and flushing the DUT at the end of a test. 

Below are the new phases that are included in the expanded run phase through the new Testflow feature:

  • ENV_SETUP
  • HARD_RESET
  • RESET
  • INIT_DUT
  • INIT_LINK
  • MAIN_TEST
  • FINISH_TEST
  • POST_TEST

To access the new Testflow features, one only has to include a new macro within any unit they would like to participate in the testflow. For example:

<'

extend my_env_u {tf_testflow_unit;};

'>

Once we do this, we now have access to a wide array of new methods to tap into the newly introduced phases.  Users can extend any of the new phase methods to add functionality in the same way that they could with the previously existing phase methods and added functionality will be executed at the appropriate phase execution time. 

The new phase methods introduced are:

tf_env_setup() @tf_phase_clock is empty;

tf_hard_reset() @tf_phase_clock is empty;

tf_reset() @tf_phase_clock is empty;

tf_init_dut() @tf_phase_clock is empty;

tf_init_link() @tf_phase_clock is empty;

tf_main_test() @tf_phase_clock is empty;

tf_finish_test() @tf_phase_clock is empty;

tf_post_test() @tf_phase_clock is empty;

When performing system verification, the synchronization becomes even more complicated.  For example, the upper level of the system may start its initialization only after the lower part is done with its link phases. For supporting such synchronization, the new Testflow feature allow users to specify multiple domains within an environment, associate any given unit with a particular domain, declare dependencies between domains, rerun a simulation from any particular phase, specify timeout counters for every phase and also to declare custom phases and specify where they reside within the overall testflow.

Testflow also introduces some very powerful sequence control that allows users to declare whether a particular sequence participates in the testflow, and which particular phase that sequence will automatically be launched in.  For example, by declaring a sequence as follows:

<'

sequence my_sequence_seq using

     testflow = TRUE,

     item = my_transaction_s;

‘>

one can now tap into 8 new automatically created subtypes  of that sequence (one for each phase), to trigger specific sequences to launch at the appropriate phase in the simulation.  For those unfamiliar, subtypes are one of the many Aspect Oriented Programming (AOP) features of the e language (for more see Kaberi's recent post).  For example, the below sequence would automatically be called once the simulation has reached the POST_TEST phase of the simulation run.

<'

// Sequence to wait a programmable number of drain cycles

// to allow transactions to flush from the DUT.  At the end

// of the simulation

extend MAIN POST_TEST my_sequence_seq {

     drain_time : uint;

     keep soft drain_time == 10;

     post_body() @sys.any is also {

          if prevent_test_done {

              wait [drain_time]*cycle @driver.clock;

              driver.drop_objection(TEST_DONE);

          }; -- if

     }; -- post_body()

}; -- extend

‘>

To debug all of this new functionality, there are a number of new features available that allow for tracking progress through the various phases, querying domain information and more. 

There are simply too many new testflow features to mention in this short blog post however, if you wanted additional information or wanted to test drive the new testflow features, they can be found on the OVMWorld website at http://www.ovmworld.org/ or are also available in all 8.2+ releases of Specman Elite.

Happy Verifying! 

Corey Goss

Senior Technical Leader

Solutions Deployment

Cadence Design Systems, Inc.

Comments(0)

Leave a Comment


Name
E-mail (will not be published)
Comment
 I have read and agree to the Terms of use and Community Guidelines.
Community Guidelines
The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.