Does type_id::create() end up eventually call the class's new function?

In reply to chrisspear:

In reply to vk7715:
There are several issues here.

  • The only way to construct an object in SystemVerilog is by calling new(). Just add a $display statement in the constructor to see when it is called.
  • A ‘null object access error’ means you are using an uninitialized handle. Either step through the code with a debugger or print the value of the handles before line 5 with %p:
$display("config_h=%p", config_h);
  • The last line of the build_phase() won’t compile. ‘abc’ is a class name, not a handle.

Hi Chris, thank you for your reply.
I also would like to know the answer to another question I had in the comments, does calling type_id::create end up calling the “new” constructor of that class?

Example, does abc::type_id::create(“abc_handle”); call “new” function in class abc?