Jump to content

Conditional compiling based on UVM Revsions


Recommended Posts

If you migrate from UVM 1.1 to 1.1a, what is the proper technique for conditionally compiling code differently?

It seems that the "Whole version identifiers" are the same for both. Should 1.1a have this instead?

// Whole version identifiers that can be used in `ifdefs and `ifndefs
// to do conditional compilation
`define UVM_VERSION_1_1
`define UVM_MAJOR_VERSION_1_1
`define UVM_MAJOR_REV_1
`define UVM_MINOR_REV_1[B]a[/B]

Both 1.1 and 1.1a define UVM_FIX_REV, so `ifdef/ifndef cannot be used on it.

Thanks,

Brian

Link to comment
Share on other sites

What compile-time difference are your trying to resolve??

1.1a is a bug-fix version so it should be backward-compatible -- at least compilation-wise.

c_randomized and is_randomized were removed from uvm_sequence_base. Manipulating these fix some constraint failures when trying to randomize individual fields within a sequence.

Link to comment
Share on other sites

Those are not documented and thus should not have been used, despite the fact that they were not named "m_*".

However, it does make sense to have these macros should these situations (which should be minimized by not accessing anything that is not documented) arise.

See http://www.eda.org/svdb/view.php?id=4004

Edited by janick
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...