Menu

#505 'object_call_method is always flagged as en error

v1.0_(example)
open
nobody
None
5
2017-09-05
2017-08-28
No

Hi all,

Everytime the 'object_call_method is used, it is flagged as an error by the parser. I don't see any reason behind this.
The error message is:

Multiple markers at this line
- ${workspace_loc}pathtofile.sv:115 Expecting keyword "endfunction" ; received "null"
- ${workspace_loc}pathtofile.sv:115 Expecting keyword "endclass" ; received "null"
- ${workspace_loc}pathtofile.sv:115 Expecting operator ";" ; received "null"
- 1 changed line

PS, I can F3 the 'object_call_method, and all the used arugments

I don't know if this is a bug or I misconfigured smthg

thanks for your help.
Safouan

1 Attachments

Discussion

  • Matthew Ballance

    Hi Safouan,
    One reason for the discrepancy might be that SVEditor, by default, uses single-file compilation unit mode when parsing files. What this means is that each top-level file is treated independently with respect to the pre-processor. So, for example:
    file1_pkg.sv
    include "my_macros.svh" package file1_pkg; class my_class1;my_macro() // OK, since file1_pkg includes my_macros.svh
    endclass
    endpackage

    file2_pkg.sv
    package file2_pkg;
      class my_class2;
        `my_macro() // Error, since file2_pkg.sv doesn't include my_macros.svh
      endclass
    endpackage
    

    Synopsys VCS uses multi-file compilation unit mode by default, so if both file1_pkg.sv and file2_pkg.sv are specified on the commandline, then `my_macro will be visible in file2_pkg.sv
    Mentor Questa and Cadence NCSim (to the best of my knowledge) use single-file compilation unit mode by default.
    SVEditor's "Open Declaration" action does a global search, which could explain why you're able to open the macro declaration .

    If this is your issue, you have two options:
    - Ensure each top-level file includes the files that declare required macros
    - Add the -mfcu switch to your SVEditor filelist file. This will cause SVEditor to process files in multi-file compilation unit mode.
    
    Hope this helps, and please let me know if this helps to resolve the issue.
    

    Best Regards,
    Matthew

     
    • Safouan Ben Jha

      Safouan Ben Jha - 2017-09-12

      Hi Mathew,

      Well, unfortunately none of the suggested solutions worked for me. I have checked that each top level includes the macro, and also tried the mfcu, but in vain.
      What I also find strange, is that I have another macro, declared in the same macro file but it does not cause any problems when called from the same file where " object_call_method" is causing an error!
      Still cannot figure out why...

      Best regards,
      Safouan

       

Log in to post a comment.