[sv-bc] port declaration clarifications

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Mon Nov 22 2010 - 05:47:18 PST

Hi,

Here are some miscellaneous clarifications regarding port declarations, related to various Mantis items.
I want to check that there is agreement about them before I write them into proposals.
A few are questions.
The descriptions are somewhat in shorthand.

1. Differences between task/function ports (formal arguments) and module/interface/program ports:
- Port direction can also be 'const ref'
- Ports can only be variables, but not nets or interfaces
- The default direction is input
- 13.5.3 says, "The syntax to declare a default argument in a subroutine is as follows:
subroutine( [ direction ] [ type ] argument = default_expression);
The optional direction can be input, inout, output, or ref." Can a const ref port have a default?

2. Default values are not inherited by the next port declaration.

3. The BNF does not allow default values for explicitly named ports. Should they be allowed?

4. Interface ports (i.e., a port that is an interface, not a port of an interface):

- allowed for modules/programs/interfaces only
- The following declaration types exist:
o interface_identifier list_of_interface_identifiers
o interface_identifier.modport_identifier list_of_interface_identifiers
o "interface" list_of_interface_identifiers // generic interface
o "interface".modport_identifier list_of_interface_identifiers // generic interface with modport
- Each identifier in list_of_interface_identifiers can have unpacked dimensions
- No explicitly named interface ports?
- Generic interfaces only in ANSI style
- No default values
- An interface port can be the first in an ANSI style port declaration

5. ANSI: Interface ports break inheritance chain. Subsequent ports are treated like the first.

6. ANSI: Consider the following case: "a, B b", where a is some port. B is searched for. If it is found to be a type identifier (the search rules have to be written), then b is a regular port. If B is found to be an interface identifier, then b is an interface port.

7. ANSI: Following an interface port declaration, if the subsequent port only contains a port identifier (and possibly unpacked dimensions), then it is treated as a continuation of the list of interface identifiers. Otherwise, it begins a new type of port.

8. Inheritance rules: Current rules don't adequately cover the case where the data type is a typedef that may include unpacked dimensions. I think the basic rule is simply that everything to the left of the port identifier is inherited, everything to the right of the port identifier is not.

Thanks,
Shalom

Shalom Bresticker
Intel LAD DA, Jerusalem, Israel
+972 2 589 6582 (office)
+972 54 721 1033 (cell)
http://www.linkedin.com/in/shalombresticker

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Nov 22 05:48:11 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 22 2010 - 05:51:06 PST