Subject: [sv-bc] Proposed BNF replacement for A.2.9 (modports)
From: Brad Pierce (Brad.Pierce@synopsys.com)
Date: Mon Jan 20 2003 - 09:07:17 PST
------------------ Proposal ----------------------------------------
Replace A.2.9 with --
modport_declaration
::=
'modport' modport_item { ',' modport_item } ';'
modport_item
::=
modport_identifier '(' modport_ports_declaration
{ ',' modport_ports_declaration } ')'
modport_ports_declaration
::=
modport_simple_ports_declaration
| modport_hierarchical_ports_declaration
| modport_tf_ports_declaration
modport_simple_ports_declaration
::=
'input' list_of_modport_port_identifiers
| 'output' list_of_modport_port_identifiers
| 'inout' list_of_modport_port_identifiers
modport_hierarchical_ports_declaration
::=
interface_instance_identifier
{ '[' constant_expression ']' }
. modport_identifier
modport_tf_ports_declaration
::=
import_export modport_tf_port
{ ',' modport_tf_port }
modport_tf_port
::=
'task' named_task_proto
| 'function' named_function_proto
| task_or_function_identifier
import_export
::=
'import'
| 'export'
-------
Add to A.9.3 --
interface_instance_identifier
::=
identifier
-------
Add to A.2.3 --
list_of_modport_port_identifiers
::=
port_identifier { ',' port_identifier }
-------------- Motivations ----------------------------------
1) In an hierarchical interface, modport ports can
themselves be from modports of interface instances.
And those instances can be arrayed or generated,
just like module instances. So rather than
interface_identifier . port_identifer
we need
interface_instance_identifier {[...]}
. modport_identifier
2) The current BNF uses an ANSI-C style in modports that
would require repetitive declarations of direction and
import/export, such as,
modport master ( input a,
input b,
output c,
output d,
import task masterRead(),
import task masterWrite() ) ;
but the SystemVerilog language uses a style consistent
with Verilog 2001, extending the ANSI-C style to
something like --
modport master ( input a, b,
output c, d,
import task masterRead(),
task masterWrite() ) ;
3) As noted in http://www.eda.org/sv-bc/hm/0221.html
the [port_type] should not have been in modport_port
in the existing BNF.
-----------------------------------------------------------------
This archive was generated by hypermail 2b28 : Mon Jan 20 2003 - 09:08:28 PST