Static Method

In reply to TV:

  1. A typedef is not required in this case because pss_env_config is known to be a type when it appears in the variable declaration t. The class pss_env_config in the line above takes care of that. The only time a typedef is absolutely required is when the compiler encounters a never before seen identifier. That happens when you have a pair of cyclic definitions: class A needs a handle to class B, and class B needs a handle to class A. You can only define one class first, the other will need a typedef. The other place you will see typedefs used is then the scripts used to compile code are lax in their compilation order. You will see a lot of that in the UVM.
    If you are getting a syntax error from the compilation of the pss_env_config.svh file, then show the error and let your vendor know they have a bug.
  2. The key word in section 8.10 is members. “A static method has no access to non-static members (class properties or methods)” It does have access to everything else visible within its scope. The functions uvm_report_enable() and uvm_report_fatal() are both defined in the package uvm_pkg, they are not member class methods. So they are visible and accessible to the static method pss_env_config::get_config. Had the class pss_env_config been extended from uvm_component (which is extended from uvm_report_object), then there would be a legitimate syntax error. That is because uvm_report_object does have class member methods named uvm_report_enable and uvm_report_fatal. Those non-static class methods names would be found first, hiding the functions defined at the top-level of the package.