Hi all,
I have written a small code snippet. what i expect from it is just to run with out having any errors.
It is simulating fine when i have used the macro which is commented in the code.
But it is showing error when iam running it by placing the typedef statement.
module top;
`include "ovm.svh"
class scoreboard extends ovm_component;
// `ovm_component_utils(scoreboard)
typedef ovm_component_registry #(scoreboard, "scoreboard") type_id;
function void new(input string name = "scoreboard",
input ovm_component parent = null);
super.new(name, parent);
endfunction
endclass : scoreboard
scoreboard scb;
initial begin
//scb = new();
scb = scoreboard::type_id::create("scoreboard", this);
end
endmodule
-------------------------------------------------------------------------------------------
Error:
------------------------------------------------------------------------------------------
typedef class scoreboard;
The class specified in the typedef is never declared.
-------------------------------------------------------------------------------------------
How this can be solved?
Thank you in advance,
mpurna.