[sv-bc] Erratta or simple proposal for task, function, property, sequencearguments.


Subject: [sv-bc] Erratta or simple proposal for task, function, property, sequencearguments.
From: Adam Krolnik (krolnik@lsil.com)
Date: Thu Sep 18 2003 - 07:44:20 PDT


Good morning all;

SV 3.1 added the shorthand ability to named port connections to only
mention the name of the port. The net name would be assumed to match
the port name. E.g

DFF flop1 (.q(delay_sig),
            .d(sig),
            .clk, // Connect net 'clk' to port 'clk'
            .rst_n // Connect net 'rst_n' to port 'rst_n'
           );

I propose that the committee overlooked adding this shorthand ability for
the task, function, property and sequence argument lists. The IEEE committee
included the named connection ability to tasks and functions to be symmetric
with port connections.

The BNF changes include adding the shorthand to the list_of_arguments,
list_of_constant_arguments and actual_arg_list productions. It would
also require creating a separate production for the new class call as
it uses the list_of_arguments production. Note, constant functions could
use this too, though the function argument would only be able to match a
genvar identifier.

Proposal:

WAS:

list_of_arguments ::=
[ expression ] { , [ expression ] }
| . identifier ( [ expression ] ) { , . identifier ( [ expression ] ) }

list_of_constant_arguments ::=
   [ constant_expression ] { , [ constant_expression ] }
   | . identifier ( [ constant_expression ] ) { , . identifier ( [ constant_expression ]
   ) }

actual_arg_list ::=
( actual_arg_expr { , actual_arg_expr } )
| ( . formal_identifier ( actual_arg_expr ) { , . formal_identifier ( actual_arg_expr ) } )

blocking_assignment ::=
    variable_lvalue = delay_or_event_control expression
   | hierarchical_variable_identifier = new [ constant_expression ] [ (
variable_identifier ) ]
   | class_identifier [ parameter_value_assignment ] = new [ ( list_of_arguments ) ]

Proposed:

-- Make parenthesis expression optional.
list_of_arguments ::=
[ expression ] { , [ expression ] }
| . identifier [ ( [ expression ] ) ] { , . identifier [ ( [ expression ] ) ] }

-- Make parenthesis expression optional.
list_of_constant_arguments ::=
   [ constant_expression ] { , [ constant_expression ] }
   | . identifier [ ( [ constant_expression ] )] { , . identifier [ ( [
                constant_expression ] ) ] }

-- Make parenthesis expression optional.
actual_arg_list ::=
( actual_arg_expr { , actual_arg_expr } )
| ( . formal_identifier [ ( actual_arg_expr ) ] { , . formal_identifier
              [ ( actual_arg_expr ) ] } )

  -- Replace list_of_arguments with list_of_class_arguments.
blocking_assignment ::=
    variable_lvalue = delay_or_event_control expression
   | hierarchical_variable_identifier = new [ constant_expression ] [ (
variable_identifier ) ]
   | class_identifier [ parameter_value_assignment ] = new [ ( list_of_class_arguments ) ]

  -- Add this new production.
list_of_class_arguments ::=
[ expression ] { , [ expression ] }
| . identifier ( [ expression ] ) { , . identifier ( [ expression ] ) }

     Adam Krolnik
     Verification Mgr.
     LSI Logic Corp.
     Plano TX. 75074



This archive was generated by hypermail 2b28 : Thu Sep 18 2003 - 09:00:33 PDT