Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Macro handling?

rinsewin
2011-10-27
2013-01-16
  • rinsewin
    rinsewin
    2011-10-27

    Hi,

    I've been trying to use SVEditor with the Synopsys vmm.sv library.  It looks like a null exception of some sort gets issued while parsing the library, be it when specified as a file in a project or as a library, or source collection etc.

    Essentially I have a piece of code that does:
      `vmm_verbose (_log, "hello there");

    SVEditor states that the `vmm_verbose macro is undefined.  I've tried a number of different work arounds:
       1) I created a project.f file list and +define+ defined dummy versions of the vmm log macros there.
       2) I created a placeholder version of vmm.sv and added dummy `defines for the macros in there.
       3) I added dummy versions of the macros as "global defines" in the project properties.

    Any which way I try to get these macros into the tool results in a parse error stating that the macros are not defined.  The only way I've found to get around this is to put copies of the dummy macro definitions into the top of each file.

    Are globe;/inter file macros unsupported by SVEditor?  If they are how does one get them to stick in the parser? 

    Is there a way to tell SVEditor to ignore macros, e.g. if you see this text just ignore it or assume this should be substituted?

    I saw that you have done some testing of the tool against vmm, so maybe I'm driving the tool incorrectly?  I wonder if ovm/uvm macro handling has been build into the tool parser explicitly?

    Thanks for your time!  I wrote a vera parser as a plugin to netbeans a while back that some what worked, and moved onto a System Verilog version that I later put on ice…. hence I appreciate the complexities associated with parsing this huge language and its idiosyncrasies.

    Carl C.

     
  • Hi Carl,
        First off, which version of SVEditor are you using?
        I've found the best way to handle VMM testbench code is to create an argument file for SVEditor, since VMM tends to be more macro-based than class/package based. For example, here is the argument file used for the Ethernet example:

    // This include path is for VMM_HOME ; +incdir+${VMM_HOME} could be used instead
    +incdir+../../..
    test_frame.sv
    test_mac.sv
    test_mii.sv
    top.sv

        Hope this helps.

    Regards,
    Matthew