Section 10.2

LRM-40

Change to Syntax 10-1 (change in red):

 

task_body_declaration ::=

  [ interface_identifier . ] task_identifier ;

  { tf_item_declaration task_item_declaration }

  { statement_or_null }

  endtask [ : task_identifier ]

| [ interface_identifier . ] task_identifier ( task_port_list tf_port_list ) ;

  { block_item_declaration }

  { statement_or_null }

  endtask [ : task_identifier ]

 

task_declaration ::= task [ lifetime ] task_body_declaration

 

tf_item_declaration task_item_declaration ::=

  block_item_declaration

| { attribute_instance } tf_input_declaration ;

| { attribute_instance } tf_output_declaration ;

| { attribute_instance } tf_inout_declaration ;

| { attribute_instance } tf_ref_declaration ;

 

task_port_list ::= task_port_item { , task_port_item }

| list_of_port_identifiers { , task_port_item }

 

tf_port_list ::=

tf_port_item { , tf_port_item }

 

task_port_item tf_port_item ::=

  { attribute_instance } tf_input_declaration

| { attribute_instance } tf_output_declaration

| { attribute_instance } tf_inout_declaration

| { attribute_instance } tf_ref_declaration

| { attribute_instance } port_type list_of_tf_port_identifiers

| { attribute_instance } [ signing ] { packed_dimension } list_of_tf_variable_identifiers

| { attribute_instance } tf_data_type data_type list_of_tf_variable_identifiers

LRM-45

Change to Syntax 10-1 (change in red):

tf_input_declaration ::=

  input [ signing ] { packed_dimension } list_of_tf_port_identifiers list_of_tf_variable_identifiers

| input tf_data_type data_type list_of_tf_variable_identifiers

 

tf_output_declaration ::=

  output [ signing ] { packed_dimension } list_of_tf_port_identifiers list_of_tf_variable_identifiers

| output tf_data_type data_type list_of_tf_variable_identifiers

 

tf_inout_declaration ::=

  inout [ signing ] { packed_dimension } list_of_tf_port_identifiers list_of_tf_variable_identifiers

| inout tf_data_type data_type list_of_tf_variable_identifiers

 

tf_ref_declaration ::=

[ const ] ref tf_data_ tf_data_type data_type list_of_tf_variable_identifiers

 

tf_data_type ::=

  data_type

| chandle

Section 10.3

LRM-40 LRM-58 LRM-96 LRM-98

Change to Syntax 10-2 (change in red):

function_body_declaration ::=

  [ signing ] [range_or_type type_or_dimensions ]

  [ interface_identifier . ] function_identifier ;

  { tf_item_declaration function_item_declaration }

  { function_statement_or_null }

  endfunction [ : function_identifier ]

| [ signing ] [range_or_type type_or_dimensions ]

  [ interface_identifier . ] function_identifier (tf_port_list ) ;

  { block_item_declaration }

  { function_statement_or_null }

endfunction [ : function_identifier ]

 

function_declaration ::=

  function [ lifetime ] function_body_declaration

 

function_item_declaration ::=

  block_item_declaration

| { attribute_instance } tf_input_declaration ;

| { attribute_instance } tf_output_declaration ;

| { attribute_instance } tf_inout_declaration ;

| { attribute_instance } tf_ref_declaration ;

 

function_port_item ::=

  { attribute_instance } tf_input_declaration

| { attribute_instance } tf_output_declaration

| { attribute_instance } tf_inout_declaration

| { attribute_instance } tf_ref_declaration

| { attribute_instance } port_type list_of_tf_port_identifiers

| { attribute_instance } tf_data_type list_of_tf_variable_identifiers

 

function_port_list ::= function_port_item { , function_port_item }

 

range_or_type type_or_dimensions ::=

  packed_dimension { packed_dimension } range

| function_data_type

Section 10.3.3 (New)

LRM-78

Add new section (change in red):

10.3.3 Restrictions on function signing

 

It shall be illegal to add signing declarations to functions that return one of the following data types:

      void

      non integer types

      unpacked structures or unions

      data types previously defined by typedef declarations

 

The following function declarations would be considered illegal:

 

function signed struct { logic a; byte b;} IllegalFoo1;     // illegal function declaration

endfunction

     

typedef struct { logic a; byte b; } unpackedstruct;

 

function signed unpackedstruct IllegalFoo2;                 // illegal function declaration

endfunction

Section 10.5.1

LRM-100

Change (change in red):

function int crc( byte packet [1000:1] );

for( int j= 0 1; j <= 1000; j++ ) begin

crc ^= packet[j];

end

endfunction

Section 10.5.2

LRM-111

Change (change in red):

Arguments passed by reference must match exactly, no promotion, conversion, or auto-casting is possible when passing arguments by reference. In particular, array arguments must match their type and all dimensions exactly. Fixed-size arrays cannot be mixed with dynamic arrays and vice-versa.

Arguments passed by reference must be matched with equivalent data types. No casting shall be permitted. See section 5.8.1 Equivalent Types.

 

LRM-83

Change (change in red):

Passing an argument by reference is a unique argument passing qualifier, different from input, output, or inout. Combining ref with any other directional qualifier is shall be illegal. For example, the following declaration results in a compiler error:

Section 10.6

LRM-58

Change (change in red):

To access functions defined in any other scope, including $root, the foreign code shall have to change DPIcontext appropriately.