i am using the reporting macros shown here:
https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.1c/html/files/macros/uvm_message_defines-svh.html
but when i use them i get an error:
Number of actuals and formals does not match in function call.
However the non-macro version of these macros works.
For example
This works:
uvm_report_fatal(get_type_name(), “Cast of rhs object failed”);
but not this:
`uvm_fatal(get_type_name(), “Cast of rhs object failed”)
it gives the error:
** Error: uvm_csv_seq_item.sv(55): Number of actuals and formals does not match in function call.
i have included the header files:
import uvm_pkg::*;
`include “uvm_macros.svh”
In reply to mreister:
Could you please post some code around the `uvm_fatal macro.
The error could be caused by the code around.
In reply to chr_sue:
ifndef NAME_OF_SEQ_ITEM_SV
define NAME_OF_SEQ_ITEM_SV
import uvm_pkg::*;
`include “uvm_macros.svh”
class uvm_csv_packet_item extends uvm_sequence_item;
/*-------------------------------------------------------------------------------
-- UVM Factory register
-------------------------------------------------------------------------------*/
// Provide implementations of virtual methods such as get_type_name and create
`uvm_object_utils(uvm_csv_packet_item)
/*-------------------------------------------------------------------------------
-- UVM Transaction Variables
-------------------------------------------------------------------------------*/
logic[63:0] data;
logic valid;
/*-------------------------------------------------------------------------------
-- Functions external definitions
-------------------------------------------------------------------------------*/
extern function new(string name = "");
extern function void do_copy(uvm_object rhs);
extern function bit do_compare(uvm_object rhs, uvm_comparer comparer);
extern function void do_print(uvm_printer printer);
extern function void do_record(uvm_recorder recorder);
extern function void do_pack(uvm_packer packer);
extern function void do_unpack(uvm_packer packer);
extern function string convert2string();
endclass : uvm_csv_packet_item
/*-------------------------------------------------------------------------------
-- Constructor
-------------------------------------------------------------------------------*/
function uvm_csv_packet_item::new(string name = "");
super.new(name);
endfunction : new
/*-------------------------------------------------------------------------------------------------------------------------
-- do_copy(uvm_object rhs)
-- The purpose of the do_copy method is to provide a means of making a deep copy* of a data object. The do_copy
-- method is either used on its own or via the uvm_objects clone() method which allows independent duplicates of a data
-- object to be created.
--------------------------------------------------------------------------------------------------------------------------*/
function void uvm_csv_packet_item::do_copy(uvm_object rhs);
uvm_csv_packet_item rhs_;
if (!$cast(rhs_, rhs))
//uvm_report_fatal(get_type_name(), "Cast of rhs object failed");
`uvm_fatal(get_type_name(), "Cast of rhs object failed")
super.do_copy(rhs);
data = rhs_.data;
valid = rhs_.valid;
endfunction : do_copy
In reply to mreister:
look like it fixed it…
The problems was that i was passing the “+incdir+$UVM_HOME/src” when compiling my packages…
I left this off and now the errors went away…
In reply to mreister:
To be honest this is definitely not the reason the error message disappeared.
Then it would show something like " do not know this command".
The error message you were showing appears when your are implementing a `uvm_info with only 2 arguments.
In reply to chr_sue:
Christoph, yes it definitely is the reason. If the uvm_macros.svh file is from a newer version than the uvm_pkg you import, this is exactly the error you get.
UVM 1.2 added more arguments to uvm_report_fatal/error/warning/info. The UVM 1.2 macros supply more arguments to the report methods, which don’t exist in versions before 1.2