In reply to Tudor Timi:
Hi Tudor,
Thank you for you help.
I modified the include directives in my testcase.sv and made sure include "coverage.sv" is before include “scoreboard.sv”. This indeed helped. Now the syntax error at new() is gone. But instead a syntax error appear:
Error-[SE] Syntax error
Following verilog source has syntax error :
“scoreboard.sv”, 42: token is ‘.’
cov.collect_coverage(pkt_from_drv);
^
This happens no matter cov object is created inside the constructor of scoreboard or outside.
Seems the problem is still with cov object? What could be the problem…?