Hi Saraswati,
Please make sure that whatever you are using in file3 of file1, it should be defined in file1 before `include “file3.sv”.
Example :
file2.sv :
/////////////////////////START FILE 2////////////////////////////////////////
class child extends base;
function display_child();
$display(“Inside display_child\n”);
endfunction
endclass
/////////////////////////END FILE 2 ///////////////////////////////////////
file1.sv :
/////////////////////////START FILE 1////////////////////////////////////////
class base;
int a;
function display_Base();
$display(“Inside display_Base\n”);
endfunction
endclass
`include “file2.sv” //**file2.sv should be included after file1’s content.If it would have included before class base definition,then it will give error.
**
/////////////////////////END FILE 1///////////////////////////////////////