#310 UVM macros



I am working on a project with ~200 files, and from some reason UVM macro's are not recognized.
In some of the files, there is even an import of UVM package and the macros still unrecognized- unless I am manually adding for each file an include line for "uvm_macros.svh" (or to a file that includes uvm_macros).
My f file contains the following lines (among others..):

I also can see this f file at each file include hirarchy, so the f file is properly declared in the project.


  • Matthew Ballance

    Hi Tomer,
    By default, SVEditor uses the 'single-file compilation unit' (SFCU) mode defined by the LRM to process SystemVerilog files. In SFCU mode, each root file specified in the argument file is independent in terms of macros and included files (ie the pre-processor state is clean at the beginning of each root file).
    SFCU mode is default for two reasons:
    From a methodology viewpoint, it is easier to track include and macro dependencies when there are no implicit dependencies on what has been defined previous to active root file
    From a tool standpoint, incremental re-parse is more efficient and reliable when each root file can be treated independently.

    From a UVM perspective, SFCU mode requires you to include uvm_macros.svh in each package file that includes classes that reference UVM macros.

    You can enable multi-file compilation unit mode if you're working with code that you can't easily change to fit the requirements of SFCU mode. With MFCU mode enabled, your argument file would look like this:


    Hope this helps!

    Best Regards,

  • Tomer

    Tomer - 2014-01-27

    Hi Matthew,
    First- thanks for the quick and informative reply.
    I tried the above, but it still didn't help. Moreover, after adding -mfcu to my f file I can't see any error (even obvious ones I created) in the problem view.
    I think my project does fit SFCU, but it uses "import uvm_pkg::*;" to include all UVM objects. As much as I understand it suppose to include macros as well. Am I right? Does the editor supports this?

  • Matthew Ballance

    • status: open --> closed
  • Matthew Ballance

    Closing, since this appears to be out-of-date. Please reopen if this is still an active issue.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks