What is uvm_top. and in which file it is defined?

uvm_top is simply the top-level component of your UVM hierarchy. It isn’t really defined anywhere and you shouldn’t need it. Just note that every uvm_component is named “uvm_top.”. It’s useful for passing things into the config_db from the top-level module, or if you need to refer to a component by name and you can’t get a relative name for some reason.