When compiling `uvm_info and `uvm_fatal, "Number of actuals and formals does not match in function call"

Hi, I’m running compilation (with questa) and am running into an issue.

Whenever in the code I’m compiling there is a uvm_info or uvm_fatal call, I get the following failure:

“Number of actuals and formals does not match in function call”

Examples of code that triggers this failure:

`uvm_info("some_base_test", "run_phase(): displaying objections", UVM_INFO)

assert(fhandle_dat) `uvm_info("some_tb", $sformatf("opening file %s", filename), UVM_INFO)
else                       `uvm_fatal("some_tb", $sformatf("cannot open file %s", filename))

Scratching my head…as far as i can tell, the arguments to the macros are valid. Can anybody see what I might be doing wrong here?

Thanks,
Stephen

In reply to silverace99work:

The last argument to `uvm_info needs to be one of the verbosity enumerations or a decimal value. Typically this would be UVM_LOW, UVM_HIGH, etc. UVM_INFO is not a valid option here.

In reply to jcraft:

Hi jcraft, I see. Now I did go and change the last argument to UVM_LOW or UVM_NONE, yet the error message persists. I looked up `uvm_info to confirm that there are indeed 3 arguments and that i’m not crazy… any other possible causes for this?

I dont think the error message and line number matches. Can you post more code and show the actual Error message?

In reply to silverace99work:

`uvm_info needs three arguments which are ID, message & verbosity. ID & message are of string data type & verbosity is an enumerated data type that takes values like UVM_NONE =0, UVM_LOW =100, UVM_MEDIUM =200, UVM_HIGH=300, UVM_FULL=400. Based on the importance of the message i.e., whether the message used is for debugging or its a report message, different verbosity will be given to the info messages. For debugging messages higher value of verbosity should be given & for reporting messages to lower values should be given so that we can filter the debugging messages when it’s not required

Whereas the other reporting macros with severity error, warning & fatal takes only two arguments ID and message which are of the string data type. The verbosity for these severities(error, warning & fatal) is by default UVM_NONE as these messages should not be filtered out.


`uvm_info("ID","message", int verbosity) 
`uvm_warning("ID","message")
`uvm_error("ID","message")
`uvm_fatal("ID","message")

In your code, you might be passing three arguments for warning, error, or fatal message. Kindly check the code once again.

Regards,
Shanthi

I am also facing this kind of issue with questa. Even thought the `uvm_ calls looks perfectly fine.

In reply to divya0476:

Which kind of issue are you facing? Please elaborate.

Hi chr_sue,

I am compiling a file that was working fine with vcs simulator. When I am trying with Questa, I am getting “Number of actuals and formals does not match in function call” error for all 'uvm_error, uvm_fatal calls. Ex: uvm_error (“FILE_OPEN”, “Unable to open AA file for reading”)
`uvm_fatal(“INITIALIZE, " values has not been found”)

I have uvm 1.2 pkg, while compiling it says importing pkg uvm_pkg uvm-1.1d Built-in

Any help would be really helpful.
Thanks.

In reply to divya0476:

Waht I see in my professional life is different simulators are tolerating illegal UVM/SV constructs from time to time.
This line of code

`uvm_error ("FILE_OPEN", "Unable to open AA file for reading")

is correct.
Here

`uvm_fatal("INITIALIZE, " values has not been found")

an " is missing after INITIALIZE.
Your error will be prior to these lines of code.

Hi,
From the error message which says when compiling uvm_info and uvm_fatal … so are you/somebody redefining these macros with more or less parameters by any chance??

In reply to chr_sue:

No the " exist in the code. I have misplaced it while posting here. Sorry

In reply to Subrahmanyam:

I am definitely not redefining, how do I find out that someone is doing this or not?

In reply to divya0476:

In reply to chr_sue:
No the " exist in the code. I have misplaced it while posting here. Sorry

I was assuming this. Again, your problem will be caused by an erro prior t the uvm_reporting.
I’d include directly befor the reprting macro any stupid error in your code. See what happens.