Error while trying to accessing methods of non immediate base class using type parameter

Hi,

I am trying to access non immediate base class methods using type parameter without using the super keyword. But, I’m getting fatal error mentioned below.

Code:

class A;
function int count(int num_);
    count = num_+10;
endfunction: count
endclass: A

class B extends A;
localparam type parent = A;
function int count (int num_);
	count = num_+20;
endfunction: count
endclass: B

class C extends B;
localparam type parent = B;
function int count (int num_);
	count = parent::parent::count(num_);//This is giving fatal error
	//count = A::count(num_);//This works fine
endfunction: count
endclass: C

In top module, I’m calling c_obj.count(5) and getting below error.
Error: Fatal error in Function top_sv_unit/A::count at top.sv when c_obj.count is executed.

If I replace “parent::parent::count” with “A::count” in the count function of class C, there is no fatal error.

Can someone explain why parent::parent::count doesn’t work while directly specifying A::count works?

thank you

You may have run into a tool specific issue. This Siemens sponsored public forum is not for discussing tool specific issues. Please contact your tool vendor for support.