Compilation & package

In reply to dave_59:

Hi dave,

According to you “case 1” should not work. But why the following code works. In following codes, tb_pkg have tb_components(env extended from uvm_env, agents extended from uvm_agent…) and uvm_pkg is not imported inside tb_pkg.
Even i simulated the “case 1” in incisive and i did not get any error, it is working fine.

file: tb_top.sv

`include "uvm_macros.svh"
 import uvm_pkg::*;

`include "../tb_pkg.sv"  //have TB Components extended from uvm_components  
 import tb_pkg::*

Module tb_top;
..
..
endmodule