Language Change Specification for Bidirectional Connections

LCS Number: LCS-2016-070a
Version: 1
Date: 26-Mar-2017
Status: Voting
Author: Patrick Lehmann
Martin Zabel
Email: Main.PatrickLehmann
Main.MartinZabel
Source Doc: Bidirectional Connections
Summary: Adds signal map aspects to concurrent signal associations.

Voting Results: Cast your votes here

Yes:

  1. Patrick Lehmann - 2017-03-26 - ver 1

No:

Abstain:

Style Notes

Changes are shown in red font.
Deletions are crossed out.
Restructuring is shown in crossed out gray font somewhere else in gray font.
Editing or reviewing notes in green font.

Reviewing Notes

Version 1: 26-Mar-2017

  • Split of signal map aspect to LCS 070a to be delayed to VHDL-2020
  • TODOs for VHDL-2020
    • Split into two LCS / Proposals
      1. signal map aspect in concurrent signal associations
      2. signal map aspect in port maps (incomplete by now)
    • Support indices as a formal -> choices

Details of Language Change

6.5.7.1 General [in 6.5.7 Association lists]

An association list, other than one appearing in an interface package generic map aspect (see 6.5.5), establishes correspondences between
formal or local generic, port, or parameter names on the one hand and local or actual names, expressions, subtypes, subprograms, or packages
on the other. Likewise, a signal association list establishes correspondences between formal or local signal names on the one hand and local or
actual signal names, or signal maps on the other.

association_list ::=
  association_element { , association_element }

association_element ::=
  [ formal_part => ] actual_part

formal_part ::=
    formal_designator
  | function_name ( formal_designator )
  | type_mark ( formal_designator )

formal_designator ::=
    generic_name
  | port_name
  | parameter_name

actual_part ::=
    actual_designator
  | function_name ( actual_designator )
  | type_mark ( actual_designator )

actual_designator ::=
    [ inertial ] expression
  | signal_name
  | signal_map_aspect
  | variable_name
  | file_name
  | subtype_indication
  | subprogram_name
  | instantiated_package_name
  | open

Each association element in an association list associates one actual designator with the corresponding interface element in the interface list
of a subprogram declaration, component declaration, entity declaration, block statement, or package. Likewise, each signal association element
in a signal association list associates one actual designator with the corresponding element in the list of a signal map or port map.
The
corresponding interface element is determined either by position or by name.

An association element is said to be named if the formal designator appears explicitly; otherwise, it is said to be positional. For a positional
association, an actual designator at a given position in an association list corresponds to the interface element at the same position in the
interface list.

Likewise, a signal association element is said to be named if the signal association formal designator appears explicitly; otherwise,
it is said to be positional. For a positional association, a signal association actual designator at a given position in a signal association
list corresponds to the composite element at the same position in the signal's type declaration.

In the following paragraphs, the term actual refers to an actual designator or signal association actual designator, and the term
formal refers to a formal designator or signal association formal designator.

The formal part of a named association element may be in the form of a function call, where the single argument of the function is the formal
designator itself, if and only if the formal is an interface object, the mode of the formal is out, inout, buffer, or linkage, and if the actual
is not open. In this case, the function name shall denote a function whose single parameter is of the type of the formal and whose result is the
type of the corresponding actual. Such a conversion function provides for type conversion in the event that data flows from the formal to the actual.

Alternatively, the formal part of a named association element may be in the form of a type conversion, where the expression to be converted is
the formal designator itself, if and only if the formal is an interface object, the mode of the formal is out, inout, buffer, or linkage, and if
the actual is not open. In this case, the base type denoted by the type mark shall be the same as the base type of the corresponding actual. Such
a type conversion provides for type conversion in the event that data flows from the formal to the actual. It is an error if the type of the
formal is not closely related to the type of the actual. (See 9.3.6.)

The actual part of a (named or positional) association element corresponding to a formal interface object may have the syntactic form of a function
call. This form may be interpreted either as a function call whose parameter is the actual designator, or as an expression, in which case the entire
expression is the actual designator. The actual part is interpreted as a function call whose parameter is the actual designator if and only if

  • The corresponding function declaration has one parameter,
  • The mode of the formal corresponding to the association element is in, inout, or linkage and the class of the formal is not constant,
  • The function parameter is a signal name or a variable name, and
  • The function name is not preceded by the reserved word inertial.

Otherwise, the entire expression given by the function call is interpreted as the actual designator. In the case of a function call whose parameter
is the actual designator, the type of the function parameter shall be the type of the actual and the result type shall be the type of the corresponding
formal. Such a function call is interpreted as application of a conversion function that provides for type conversion in the event that data flows
from the actual to the formal.

Alternatively, the actual part of a (named or positional) association element corresponding to a formal interface object may have the syntactic form
of a type conversion. This form may be interpreted either as a type conversion whose operand is the actual designator, or as an expression, in which
case the entire expression is the actual designator. The actual part is interpreted as a type conversion whose operand is the actual designator if
and only if

  • The mode of the formal corresponding to the association element is in, inout, or linkage, and the class of the formal is not constant,
  • The operand is a signal name or a variable name, and
  • The type mark is not preceded by the reserved word inertial.

Otherwise, the entire expression given by the type conversion is interpreted as the actual designator. In the case of a type conversion whose
operand is the actual designator, the base type denoted by the type mark shall be the same as the base type of the corresponding formal. Such a
type conversion provides for type conversion in the event that data flows from the actual to the formal. It is an error if the type of the actual
is not closely related to the type of the formal.

The type of the actual (after applying the conversion function or type conversion, if present in the actual part) shall be the same as the type of
the corresponding formal, if the mode of the formal is in, inout, or linkage, and if the actual is not open. Similarly, if the mode of the formal
is out, inout, buffer, or linkage, and if the actual is not open, then the type of the formal (after applying the conversion function or type
conversion, if present in the formal part) shall be the same as the corresponding actual.

For the association of signals with corresponding formal ports, association of a formal of a given composite type with an actual of the same type
is equivalent to the association of each scalar subelement of the formal with the matching subelement of the actual, provided that no conversion
function or type conversion is present in either the actual part or the formal part of the association element. If a conversion function or type
conversion is present, then the entire formal is considered to be associated with the entire actual.

Similarly, for the association of actuals with corresponding formal subprogram parameters, association of a formal parameter of a given composite
type with an actual of the same type is equivalent to the association of each scalar subelement of the formal parameter with the matching subelement
of the actual. Different parameter passing mechanisms may be required in each case, but in both cases the associations will have an equivalent
effect. This equivalence applies provided that no actual is accessible by more than one path (see 4.2.2.2).

A formal interface object shall be either an explicitly declared interface object or member (see 5.1) of such an interface object. In the former
case, such a formal is said to be associated in whole. In the latter cases, named association shall be used to associate the formal and actual;
the subelements of such a formal are said to be associated individually. Furthermore, every scalar subelement of the explicitly declared interface
object shall be associated exactly once with an actual (or subelement thereof) in the same association list, and all such associations shall
appear in a contiguous sequence within that association list. Each association element that associates a slice or subelement (or slice thereof)
of an interface object shall identify the formal with a locally static name.

If an interface element in an interface list includes a default expression for a formal generic constant, for a formal port of any mode other
than linkage, or for a formal variable or constant parameter of mode in, or an interface subprogram default for a formal generic subprogram,
then any corresponding association list need not include an association element for that interface element. For an interface element that is
a formal generic constant, a formal signal port, or a formal variable or constant parameter, if the association element is not included in the
association list, or if the actual is open, then the value of the default expression is used as the actual expression or signal value in an
implicit association element for that interface element. For an interface element that is a formal generic subprogram, if the association
element is not included in the association list, or if the actual is open, then the subprogram denoted by the formal generic subprogram is
determined by the interface subprogram default as described in 6.5.6.2.

It is an error if an actual of open is associated with a formal interface object that is associated individually. An actual of open counts
as the single association allowed for the corresponding formal interface object, but does not supply a constant, signal, or variable (as is
appropriate to the object class of the formal) to the formal.

It is an error if a signal association actual, which is a resolved composite type, of open is associated with a signal association formal
object that is associated individually.

It is an error if the reserved word inertial appears in an association element other than in a port map aspect.

[Notes ...]

6.5.7.4 Signal map aspects [NEW]

[Reviewer note: These paragraphs are generated from 6.5.7.3 Port map aspects]

A signal map aspect associates signals or values with the formal element in a signal association.


signal_map_aspect ::=
  map ( signal_association_list )

signal_association_list ::=
  signal_association_element { , signal_association_element } [ , ]       optional comma, if LCS-2016-071b is approved

signal_association_element ::=
  [ signal_association_formal_part => ] signal_association_actual_part

signal_association_formal_part ::=
    signal_association_formal_designator
  | function_name ( signal_association_formal_designator )
  | type_mark ( signal_association_formal_designator )

signal_association_formal_designator ::=
  subelement_name

signal_association_actual_part ::=
    signal_association_actual_designator
  | function_name ( signal_association_actual_designator )
  | type_mark ( signal_association_actual_designator )

signal_association_actual_designator ::=
    signal_name
  | open

Both named and positional association are allowed in a signal association list.

The following definitions are used in the remainder of this subclause:

  • The term actual refers to a signal association actual designator that appears in a signal association element of a signal association list.
  • The term formal refers to a signal association formal designator that appears in a signal association element of a signal association list.

In each case, it is an error if a scalar formal is associated with more than one actual, and is is an error if a scalar subelement of
any composite formal is associated with more than one scalar subelement of an actual.

An actual associated with a formal subelement in a signal map aspect shall be a signal, an expression, or the reserved word open.

Certain restrictions apply to the actual associated with a formal subelement in a signal map aspect; these restrictions are described
in 6.5.6.3.

[Reviewer note: These paragraphs are generated from 6.5.6.3 Port clause]

If a formal is associated with an expression that is not globally static (see 9.4.1) and the formal is of an unconstrained or partially
constrained composite type requiring determination of index ranges from the actual according to the rules of 5.3.2.2, then the expression
shall be one of the following:

  • The name of an object whose subtype is globally static
  • An indexed name whose prefix is one of the members of this list
  • A slice name whose prefix is one of the members of this list and whose discrete range is a globally static discrete range
  • An aggregate, provided all choices are locally static and all expressions in element associations are expressions described in this list
  • A function call whose return type mark denotes a globally static subtype
  • A qualified expression or type conversion whose type mark denotes a globally static subtype
  • An expression described in this list and enclosed in parentheses

If the actual part of a given signal association element for a formal is an expression that is not globally static, then the given
association element is equivalent to association of the formal with an anonymous signal implicitly declared in the declarative region
that immediately encloses the block. The signal has the same subtype as the formal port and is the target of an implicit concurrent
signal assignment statement of the form

anonymous <= E;

where E is the expression in the actual part of the given association element. The concurrent signal assignment statement occurs in
the same statement part as the enclosing block.

A formal that is not associated with an actual is said to be an unassociated formal.

[Reviewer note: copied from 6.5.7.1 Association lists - General, paragraph 19 and 20, page 83]

For the association of signals of a given composite type, association of a right-hand side target and a left-hand side target of the same type is
equivalent to the association of each scalar subelement of the right-hand side with the matching subelement of the left-hand side, provided that no
conversion function or type conversion is present on either side of the association element.

A left-hand side signal association target shall be either an explicitly declared signal or member thereof (see 5.1). In the former case, such a
target is said to be associated in whole. In the latter cases, named association shall be used to associate the targets; the subelements of such a target
are said to be associated individually.

11.7 Concurrent signal association statements [NEW, inserted between 11.6 and 11.7]

[Editor note: New main paragraph]

A concurrent signal association statement represents an association between two signals. Associated signals are said to
compose an association group. An association group can comprise multiple signals.

concurrent_signal_association_statement ::=
  [ label : ] concurrent_simple_signal_association

concurrent_simple_signal_association ::=
  lhs_signal_association_target <=> rhs_signal_association_target ;
  lhs_signal_association_target <=> rhs_signal_association_target ;

signal_association_target ::=
  signal_name
	
lhs_signal_association_target ::=
  signal_name

rhs_signal_association_target ::=
    signal_name
  | signal_map_aspect

A signal association implies no direction of information exchange between signal association targets (henceforth referred to as targets).
If the target in the concurrent signal association statement is a name, then the name shall denote a signal.

The signals are associated as follows:

  • If the left-hand side target is a scalar signal and the right-hand side target is also a scalar signal, then both signals are associated.
  • If the left-hand side target is a composite signal and the right-hand side target is also a composite signal, then each subelement in the right-hand
    side target shall be associated with the corresponding subelement in the left-hand side target.
  • If the left-hand side target is a composite signal and the right-hand side target a signal association list, then each signal association formal part
    shall be associated with the corresponding subelement in the left-hand side target.
  • All other cases are an error.

All signals in an association group are either resolved or unresolved signals and shall share the same subtype. Moreover, the resolution function
corresponding to a subtype shall be the same, if any.

If a subelement or slice of a resolved signal of a composite type is associated as the right-hand side target, then every scalar subelement of that
signal shall be associated exactly once with the corresponding left-hand side target in the same concurrent signal association statement.

Note 1 -- A signal association target, denoting a signal name, can also denote an attribute name returning an implicit signal.

Annex C

[Editor note: Add these rules]
actual_designator ::=
    [ inertial ] expression
  | signal_name
  | signal_map_aspect
  | variable_name
  | file_name
  | subtype_indication
  | subprogram_name
  | instantiated_package_name
  | open

[...]

concurrent_assertion_statement ::=
  [ label : ] [ postponed ] assertion ;

concurrent_signal_association_statement ::=
  [ label : ] concurrent_simple_signal_association

concurrent_conditional_signal_assignment ::=
  target <= [ guarded ] [ delay_mechanism ] conditional_waveforms ;

concurrent_procedure_call_statement ::=
  [ label : ] [ postponed ] procedure_call ;

concurrent_selected_signal_assignment ::=
  with expression select [ ? ]
    target <= [ guarded ] [ delay_mechanism ] selected_waveforms ;

concurrent_signal_assignment_statement ::=
    [ label : ] [ postponed ] concurrent_simple_signal_assignment
  | [ label : ] [ postponed ] concurrent_conditional_signal_assignment
  | [ label : ] [ postponed ] concurrent_selected_signal_assignment

concurrent_simple_signal_association ::=
  lhs_signal_association_target <=> rhs_signal_association_target ;
  lhs_signal_association_target <=> rhs_signal_association_target ;

concurrent_simple_signal_assignment ::=
  target <= [ guarded ] [ delay_mechanism ] waveform ;

concurrent_statement ::=
    block_statement
  | process_statement
  | concurrent_procedure_call_statement
  | concurrent_assertion_statement
  | concurrent_signal_assignment_statement
  | concurrent_signal_association_statement
  | component_instantiation_statement
  | generate_statement
  | PSL_PSL_Directive

[...]

lhs_signal_association_target ::=
  signal_name

[...]

rhs_signal_association_target ::=
    signal_name
  | signal_map_aspect

[...]

signal_map_aspect ::=
  map ( signal_association_list )

signal_association_target ::=
  signal_name

signal_association_list ::=
  signal_association_element { , signal_association_element } [ , ]       optional comma, if LCS-2016-071b is approved

signal_association_element ::=
  [ signal_association_formal_part => ] signal_association_actual_part

signal_association_formal_part ::=
    signal_association_formal_designator
  | function_name ( signal_association_formal_designator )
  | type_mark ( signal_association_formal_designator )

signal_association_formal_designator ::=
  subelement_name

signal_association_actual_part ::=
    signal_association_actual_designator
  | function_name ( signal_association_actual_designator )
  | type_mark ( signal_association_actual_designator )

signal_association_actual_designator ::=
    expression
  | signal_name
  | open

Comments

Version 1

Topic revision: r3 - 2020-02-17 - 15:34:42 - JimLewis
 
Copyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback