# How to get type name on systemVerilog

**URL:** <https://verificationacademy.com/forums/t/how-to-get-type-name-on-systemverilog/41865>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, system-verilog-interface-generate\
**Created:** [June 23, 2023, 3:00pm UTC](https://verificationacademy.com/forums/t/how-to-get-type-name-on-systemverilog/41865 "2023-06-23T15:00:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![HoussamSABOUR](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/h/d6d6ee/32.png) [@HoussamSABOUR](https://verificationacademy.com/forums/u/HoussamSABOUR)\
**Post date:** [June 26, 2023, 9:58am UTC](https://verificationacademy.com/forums/t/how-to-get-type-name-on-systemverilog/41865/4 "2023-06-26T09:58:29Z")

</div>

```verilog
module top_tb ; 
  import "DPI-C" context task get_if_name(string scope);
  
  initial begin 
    get_if_name ( "top_tb.master_interface") ; 
    get_if_name ( "top_tb.slave_interface") ; 
  end 
endmodule

```

When I try this, i have thios fatal error :  
_Null foreign function pointer encountered when calling ‘get\_if\_name’_ **\_\_**

what is the solution in this case ?  
Thanks in adavance

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-get-type-name-on-systemverilog/41865)._
