Jump to content

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...