Jump to content
Sign in to follow this  

Advanced OVM 2 UVM Migration using Refactoring Scripts in DVT

Recommended Posts

One of the new nice features in DVT is the capability to use refactoring scripts. A refactoring script is a set of code transformations and annotations which you can apply on your source code. For instance, such a script can define all the changes required to migrate between OVM and UVM libraries, or between library versions.

Example code transformations:

  • rename method 'boo.foo()' to 'moo()'
  • rename class 'foo' to 'boo'
  • rename macro 'WIDTH' to 'BUS_WIDTH'

Example code annotations:

  • comment all places where I use class 'foo' with 'FIXME: unsupported class'
  • comment all places where I use field 'foo.moo' with 'FIXME: use the get_ API'
  • comment all places where I use method 'foo.moo() with 'FIXME: method signature changed'

A refactoring script is defined using XML. You can take a look at the OVM2.1.1 to UVM1.0EA Migration Script which AMIQ contributed to UVM World.

For more details about refactoring scripts in DVT see the DVT Refactoring Scripts Documentation.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this