F
fpg
Guest
I just discovered the convenience of `__LINE__ and `__FILE__, something
ANSI-C progarmmers have known about for a long time.
`define DEBUG_STAMP `__FILE__,":",`__LINE__
module x;
const int y = 32;
begin : main_block
$display( `DEBUG_STAMP," error encountered here!" );
$display( `DEBUG_STAMP," second error encountered here!" );
end : main_block
endmodule : x
....
/lsi/snspc/proj/mytest.sv:41 error encountered here!
/lsi/snspc/proj/mytest.sv:42 second error encountered here!
Sadly, my simple module didn't compile in Cadence IUS 6.20-s003 --
perhaps I did not issue the proper command-line switches...
If I remove the offending `DEBUG_STAMP definition and references to,
it simulates ok. (I ran a test file with both "ncverilog +sv"and the
newer preferred "irun myfile.sv")
Amusing that the FPGA-class simulators (Modelsim/PE, Aldec Active-HDL 7.3)
handled it just fine. (Of course, neither of these simulators support
the class/endclass testbench-constructs all that well, or at all.)
ANSI-C progarmmers have known about for a long time.
`define DEBUG_STAMP `__FILE__,":",`__LINE__
module x;
const int y = 32;
begin : main_block
$display( `DEBUG_STAMP," error encountered here!" );
$display( `DEBUG_STAMP," second error encountered here!" );
end : main_block
endmodule : x
....
/lsi/snspc/proj/mytest.sv:41 error encountered here!
/lsi/snspc/proj/mytest.sv:42 second error encountered here!
Sadly, my simple module didn't compile in Cadence IUS 6.20-s003 --
perhaps I did not issue the proper command-line switches...
If I remove the offending `DEBUG_STAMP definition and references to,
it simulates ok. (I ran a test file with both "ncverilog +sv"and the
newer preferred "irun myfile.sv")
Amusing that the FPGA-class simulators (Modelsim/PE, Aldec Active-HDL 7.3)
handled it just fine. (Of course, neither of these simulators support
the class/endclass testbench-constructs all that well, or at all.)