Subject: [sv-bc] Proposals for SV-BC 18
From: Jacobi, Dan (dan.jacobi@intel.com)
Date: Fri Aug 01 2003 - 08:36:35 PDT
Hello All,
Following are two proposals that should give an answer to the items in
the issue listed as SV-BC 18.
These proposals do not depend one on each other therefore they should be
voted as separated items.
*** Proposal 18a - Function and Tasks port lists ***
Motivation
========
1. Enable the parsing function ports that have bo type declaration nor
do they have a direction
specification. These ports should default to input logic ports (See
section 10.3).
For example the parsing of the following decleration will be enbaled:
function foo(a,b,input c);
2. Now that the task port lists and function port lists are identical,
we can merge the relevant cloases
in the BNF . Decreasing the size of the BNF and simplifing it
3. Fix an eretta in the BNF by removing a semi-collon in the
task_port_list production
(after the tf_ref_declartaion token)
Proposal
=======
* Under A.2.6
REMOVE
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
REMOVE
function_port_list ::= function_port_item { , function_port_item }
ADD
tf_port_list ::= tf_port_item { , tf_port_item }
| list_of_port_identifiers { , tf_port_item }
* all commas ',' in bold red font
ADD
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 } tf_data_type list_of_tf_variable_identifiers
REPLACE
function_body_declaration ::=
[ signing ] [ range_or_type ]
[ interface_identifier . ] function_identifier ;
{ function_item_declaration }
{ function_statement_or_null }
endfunction [ : function_identifier ]
| [ signing ] [ range_or_type ]
[ interface_identifier . ] function_identifier ( function_port_list ) ;
{ block_item_declaration }
{ function_statement_or_null }
endfunction [ : function_identifier ]
WITH
function_body_declaration ::=
[ signing ] [ range_or_type ]
[ interface_identifier . ] function_identifier ;
{ function_item_declaration }
{ function_statement_or_null }
endfunction [ : function_identifier ]
| [ signing ] [ range_or_type ]
[ interface_identifier . ] function_identifier ( tf_port_list ) ;
{ block_item_declaration }
{ function_statement_or_null }
endfunction [ : function_identifier ]
* all dots '.', semicolons ';', colons ':', prentethesis '( )' and
'endfunction' keywords in bold red font
* Under A.2.7
REMOVE
task_port_list ::= task_port_item { , task_port_item }
| list_of_port_identifiers { , task_port_item }
REMOVE
task_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
REPLACE
task_body_declaration ::=
[ interface_identifier . ] task_identifier ;
{ task_item_declaration }
{ statement_or_null }
endtask [ : task_identifier ]
| [ interface_identifier . ] task_identifier ( task_port_list ) ;
{ block_item_declaration }
{ statement_or_null }
endtask [ : task_identifier ]
WITH
task_body_declaration ::=
[ interface_identifier . ] task_identifier ;
{ task_item_declaration }
{ statement_or_null }
endtask [ : task_identifier ]
| [ interface_identifier . ] task_identifier ( tf_port_list ) ;
{ block_item_declaration }
{ statement_or_null }
endtask [ : task_identifier ]
* all dots '.', semicolons ';', colons ':', prentethesis '( )' and
'endtask' keywords in bold red font
*** Proposal 18b - Function and Tasks port lists ***
Motivation
========
1. Enable the parsing of ports declared in the module or interface
with out a direction
In this case the port direction should deault to an inout (see more
information under section 8.5).
This change should enable the parsing of such decleration:
module m(wire ainout, input bit b,tri0 ainput);
But still the parsing of the following module declaration is
illegal
module mm(a,b)
wire a,b; // no direction declared
endmodule
Proposal
=======
* Under A.1.4
REPLACE
list_of_port_declarations ::=
( port_declaration { , port_declaration } )
| ( )
WITH
list_of_port_declarations ::=
( ansi_port_declaration { , ansi_port_declaration } )
| ( )
* parenthesis '( )' and commas ',' should appear in a bold red font
ADD
ansi_port_declaration :=
port_declaration
| port_type list_of_port_identifiers
Note that by using this proposal, the BNF doesn't capture the full
intent of the language (from the BNF
it is not clear that the port direction is inherited from the last
declared direction). However the BNF
Is relatively simple and does not introduce another level of lists.
Also note that this proposed BNF does not enforce the use of nets for
inouts - this should be specified in the LRM
Dan Jacobi
Intel Corp
972-4-8655855
This archive was generated by hypermail 2b28 : Fri Aug 01 2003 - 08:39:51 PDT