Compilation Issue from define in package

Bharath,
Few notes:

  1. Your Questa version is old, see if you can move to 10.2 or later. There -mfcu (read below) is default.
  2. I assume you compile common_pkg.sv before the ui_*.sv file
  3. Now, yes Dave is correct (as usual), `define-s don’t get scoped, so no real value in adding them inside package.
  4. Now in old versions Questa needed a -mfcu flag to carry the `defines across files. Read your manual or better yet “read #1 above” :-)

So you may be able to get going with -mfcu added to vlog command.

Ajeetha, CVC