Need help with SV resolution function

Hi

new here …
I need help with resolution function.
Only tried to implement the example given in the IEEE SV 2012 spec section 6.6.7

I wrote the following small code:

// user-defined data type T
 typedef struct {
    real field1 ;
    bit field2  ;
 } T ;

 // user-defined resolution function Tsum
 function automatic T Tsum (input T driver[]);
    Tsum.field1 = 0.0 ;
    foreach (driver[i])
**Tsum.field1 += driver[i].field1;
** endfunction



 module drv (output T drv_out) ;

 endmodule


 module top ();
    nettype T wT                     ; // an unresolved nettype wT whose data type is T
    nettype T wTsum with Tsum ; // 

    wT            no_rf   ;
 //   wire_with_rf  with_rf ;

    drv drv1 (
        .drv_out(no_rf)
        );

   // drv drv2 (
   //     .drv_out(no_rf)
   //     );

/*
    drv drv3 (
        .drv_out(with_rf)
        );

    drv drv4 (
        .drv_out(with_rf)
        );
*/



// user-defined data type T
 typedef struct {
    real field1 ;
    bit field2  ;
 } T ;

 // user-defined resolution function Tsum
 function automatic T Tsum (input T driver[]);
    Tsum.field1 = 0.0 ;
    foreach (driver[i])
       Tsum.field1 += driver[i].field1;
 endfunction



 module drv (output T drv_out) ;

    wire stam;
     

 endmodule

and I get the following ERROR:

which ncverilog
/nfs/iil/eda/tools/cadence/incisive/14.10.013/linux_2.6.16_x86-64/tools/bin/ncverilog
[176]icsl2618:/<6>Mixed_signals/SV/DFE_TB> ncverilog resolution_function_try.sv -sv -sysv +access+rwc +gui
ncverilog: 14.10-s013: (c) Copyright 1995-2014 Cadence Design Systems, Inc.
ncverilog: *N,SNPREC: The existing contents of the environment SPECMAN_PRE_COMMANDS will only be passed on to the simulation phase (conf gen -default_generator=IntelliGen;#ifndef CDN_UVC_USING_INTELLIGEN {define CDN_UVC_USING_INTELLIGEN;}).
file: resolution_function_try.sv
nettype T wTsum with Tsum ; //
|
ncvlog: *E,SVRFINV (resolution_function_try.sv,23|28): function or class method does not conform to resolution function requirements.
Tsum.field1 += driver[i].field1;
|
ncvlog: *E,SVRFST (resolution_function_try.sv,11|17): static variable not allowed in resolution function.
Tsum.field1 += driver[i].field1;
|
ncvlog: *E,SVRFST (resolution_function_try.sv,11|37): static variable not allowed in resolution function.
module worklib.top:sv
errors: 3, warnings: 0
ncverilog: *E,VLGERR: An error occurred during parsing. Review the log file for errors with the code *E and fix those identified problems to proceed. Exiting with code (status 1).

Can someone help ?

In reply to gperry:

BTW

line 11: Tsum.field1 += driver[i].field1

line 23: nettype T wTsum with Tsum ;

I am using cadence ncverilog
cadence/incisive/14.10.013/linux_2.6.16_x86-64/tools/bin/ncverilog

Most tools do not support what is currently in the 1800-2012 in the area of nettypes and resolution functions. Please contact your tool vendor.

Dave

In reply to dave_59:

ok. thanks. I will check this …