ISAC: Proposed Agenda for ISAC meeting April 20 2006 REVISED

From: Chuck Swart <cswart_at_.....>
Date: Thu Apr 20 2006 - 09:26:52 PDT
Next Meeting: Thursday April 20, 2006, 7 pm Pacific Daylight Time
            (Friday April 21, 2006, 2 am GMT)

telecom info (same as always)
US 800-637-5822
Other +1 647-723-3937
Access Code 6850821


1. New ISAC Issues:

2091    Analyzed        Peter           Translation between std_logic_vector based types and std_ulogic_vector


2. Recently voted ISAC Issues:

None

3. Open ISAC Issues:

2038    Submitted       Ajay            Minor semantic errors
2054    Analyzed        Larry           Individual assoc. rules for array formal are not valid
2062    Analyzed        Chuck           Range staticness
2074    Analyzed        Chuck & Ajay    Problem with direct/select visibility in formal part
2082    Analyzed        Chuck           Elaboration of unconstrained interface objects
2085    Analyzed        Chuck           What happens when a parameter of mode out is not assigned in a procedure?
2086    Analyzed        Chuck           Incorrect description of type mark in disconnection specification

4. Review of old ISAC issues:

Note: This is the latest update which I have. If you have any changes or corrections, please email me.
We will probably redistribute the open issues, since there have been changes in active participants.

Last edited 02 September 2005

Analysis of VHDL93 IRs for VHDL2002

1002    Open     Ambiguity as to when parameter subtype indications are elaborated.
1003    Open     Non-commutative and non-associative resolution functions are a source of non-determinism
1004    Enhancement-Analysis needed Are deferred constants still deferred after their full declaration?
1008    Resolved Function NOW is undefined during static elaboration.
1009    Open     Unclear context of evaluation for formal part of block map aspects.
1013    Open     Reference to a generate loop parameter in a configuration is unclear
1014    Open     The LENGTH attribute is ill-defined.
1017    Open     Why must a name in a wait stmt. sens. list be static?
1019    Resolved The signal updating steps of the simulation cycle is incorrect.
1023    Open     VPI Issue 2 -- Specifications applying to 0 entities
1024    Open     VPI Issue 20 -- Primary units with same name
1028    Open     Is the entity identifier directly visible in architecture bodies and configuration declarations?
1029    Reopen   What should happen when there is a port clause in a block statement but no port map clause?
1033    Open     Attributes cannot be specified in package bodies.
1034    Open     Qualified expression checks may be too restrictive.
1038    Open     The definitions of A'LEFT, A'RIGHT, A'HIGH, A'LOW, A'RANGE, and A'REVERSE_RANGE are ill-defined when
1039    Open     May subelements and slices of procedure signal parameters be individually driven?
1044    Resolved Definition of 'HIGH and 'LOW in a null range
1053    Resolved This IR number (1053) was allocated but not needed.
1054    Reopen   Short-circuit operators don't when called as functions
1068    Open     When do buffer ports have sources?
1073    Resolved The meaning of a qualified expression is in dispute
1078    Open     Memory leak and portability issue with TEXTIO
1083    Open     Pureness of function ENDFILE

1000 Accumulated typographical and terminology errors.
1001 Entity aspect in default binding indication is unclear.
1005 Unclear requirements on prefix in predefined attribute names.
1006 Parentage checks are difficult to verify during static model elaboration.
1007 Can a range constraint in a type declaration use 'RANGE?
1010 Overloaded convertible operands make type analysis very difficult.
1011 Enumeration literals, physical units, and library names cannot be attributed.
1012 It is unclear how Physical Literals of type TIME should be treated when checking for conformance.
1015 The note illustrating the equivalent sequence of declarations for a constrained array type definition is
1016 LRM definition of block statements is ambiguous.
1018 What does "reference" mean?
1020 The 'note' implies that predefined attributes of the actual will not be visible on the formal.
1021 Constrained arrays with negative index bounds are difficult to declare.
1022 A subtype Delay would aid VHDL definition and use.
1025 Checking the target type of an aggregate signal assignment
1026 Glossary refers to old "size constraint" in entry for "constraint."
1027 REVERSERANGE should be a keyword in the language.
1030 Imprecise wording and inconsistent presentation order.
1031 Can targets be in the form of nested aggregates?
1032 May analyzers make non-locally static checks?
1033 Attributes cannot be specified in package bodies.
1035 Rules for non-local access to signals and variables in functions are too restrictive.
1036 Integer subtypes & operations
1040 Resolved composite signals are difficult to associate.
1041 Implicit signals are not objects.  Moreover, they may not be signals.
1042 Missing sentence for variable assignment aggregate target.
1043 User defined attribute on function name
1045 Qualified expressions lead to lexical ambiguity
1046 Unclear definition of "resolved signal."
1047 VPI Issue 10 -- Entity class type vs. subtype
1048 Deferred constant reference before complete definition.
1049 When is an entity bound to the library it references?
1050 Visibility outside of design units is not well-defined.
1051 Direct visibility rules for USE clauses are incomplete and confusing.
1052 Rules for others in aggregates are incomplete
1055 Reading predefined signal attributes of subprogram signal parameters within the subprograms.
1056 Certain error requirements are not well-defined.
1057 Expanded names are not allowed in extended regions.
1058 What use are LINKAGE ports?
1059 What is the allowed use of others in record aggregates?
1060 A'LEFT's result type is anomalously described.
1062 Can a resolution function return an unconstrained array?
1063 Scope and visibility rules for predefined attributes are unclear.
1064 Passiveness of processes is not analysis-time computable.
1066 Conversion function definition assumes different types.
1069 Mod and rem are ill-defined when they return zero.
1070 VPI Issue 14 -- Prefixes in USE clauses
1071 The bounds of array aggregates are ill-defined.
1072 Does the elaboration of a process statement create a process?
1074 Interpretation of overloaded name prefixes is unclear.
1075 Self-referential access types are not prohibited.
1076 Applicability of resolution functions is still unclear.
1077 Out ports cannot drive buffer ports.
1079 Conflicting rules for direction of concatenation
1081 Expression elaboration with impure functions
1082 Implicit conversion of a universal real expression
1085 "Staticness" of the predefined attribute INSTANCE_NAME
1086 Use of character literal or operator symbol in alias
1088 Problems with physical mapping of libraries
1089 Visibility problem with components and USE clauses
1090 Do library clauses extend from entities to architectures?
1091 Group constituent names cannot have signatures.
1092 Must a selected name in a use clause denote anything?
1093 Replacement characters (from Ada) complicate parsing.
1094 Bad wording for individual association for subprograms.
1095 Are time literals with real numeric parts exact?
1096 Entity aspect poorly defined for incremental binding.
1097 Why do primary unit names in secondary units differ?
1098 Can variable parameters be left unassociated or not?
1104 Inconsistent, overly restrictive subtype checks.
1105 The elaboration of group declarations is not defined.
1106 Accumulated problems with unclear wording.
1107 Postponed process behave illogically at initialization.
1108 The subtype of a deferred constant may not always be deduced during analysis time.
1109 The term "named entity" it not defined.
1110 The term "object" is not well-defined.
1111 Is a user-defined attribute an object?
1112 Need to disallow conversion function signal parameters.
1114 LRM wording doesn't account for separators.
1115 Should subtype and constraint checks really be made when the driver takes on the value of a signal?
1116 implicit signals in guard expression (via port maps)
1117 Problem with Composite Resolved Signal
1118 Group constituent can't be user-defined attribute name.
1119 LRM is not clear as to when the wait statement condition clause is evaluated in a postponed process.
1120 Inconsistency about the mode of formal parameters of class file.
1121 Meaning of a changed value for reals is not clear
1122 Default binding text and examples disagree
1123 Simulation cycle does not account for processes resuming after expiration of the timeout interval
1124 Are all actuals evaluated in incremental binding?







-------------BEGINNING OF IR----------------

VHDL Issue Number:        2082     

Language_Version          VHDL-2002
Classification            Language Definition Problem
Summary                   Elaboration of unconstrained interface objects
Relevant_LRM_Sections     4.3.2.2 Association lists
                          12.2 Elaboration of a block header
                          12.5 Dynamic elaboration
Related_Issues            Accellera VHDL-TC VTC-7, LCS-2006-118, IR 2085
Key_Words_and_Phrases     elaboration, formal interface objects, association elements
Authors_Name              Peter Ashenden
Authors_Phone_Number      +61 414 709 106
Authors_Fax_Number        
Authors_Email_Address     peter@ashenden.com.au
Authors_Affiliation       Ashenden Designs
Authors_Address1          
Authors_Address2          
Authors_Address3          

Current Status:           Analyzed

Superseded By:

------------------------
Date Submitted:           27 January 2006
Date Analyzed:            19 April 2006
Author of Analysis:       Chuck Swart
Revision Number:          1
Date Last Revised:        20 April 2006

Description of Problem
----------------------

The order of elaboration of interface objects and the corresponding
associations is problematic when the type of an interface object is
unconstrained. For such interface objects, the index ranges are taken
from the association elements.
    
    12.2 and 12.5 specify that elaboration proceeds by first
       elaborating the formal objects (generics, ports or parameters),
       followed by elaboration of the association lists. Elaborating
       the formal objects involves elaborating the subtype indications
       and creating the objects. However, for objects of unconstrained
       types, the objects cannot be created until the index ranges are
       known, and that isn't until the corresponding association
       elements are elaborated.


Proposed Resolution
-------------------

Elaboration needs to be defined in such a way that association
elements are elaborated before formal objects are created. A possible
sequence may be
    
    (1) elaborate the subtype indications of the formals
    
    (2) elaborate the association elements (including any implicit
        association elements)
    
    (3) determine index ranges for formals from association elements,
        if required
    
    (4) create formals

VASG-ISAC Analysis & Rationale
------------------------------

The submitter is correct. There are defects in the elaboration rules
for unconstrained interface objects.

LCS-2006-118 deals with this issue for generics. The proposed Recommendation
for Future Revisions contains wording to correct the problem for ports and
for subprogram parameters.

Some comments on the proposed changes:

In the existing LRM it is not clear whether or not clause 12.3.1.4,
Object declarations, applies to interface objects which are not
generics or ports. We have clarified this by explicitly stating that
they are not covered by this clause and by adding appropriate wording
to clause 12.5.

It is also unclear in the current LRM whether or not parameters of
mode OUT are initialized. Clause 12.5 has been modified to specify
this initialization.

VASG-ISAC Recommendation for IEEE Std 1076-2002
-----------------------------------------------

Interpret the LRM as if the Recommendation for Future Revisions were
in effect.

VASG-ISAC Recommendation for Future Revisions
---------------------------------------------

LCS-2006-118 changes clauses 12.2, 12.2.1, and 12.2.2 (among others).
These changes correct the problem for generics. The following similar
changes apply to ports and subprogram parameters:

12.2.3 

Change:

        The elaboration of a port declaration consists of elaborating
        the subtype indication and then creating a port of that
        subtype.

To:

        The elaboration of a port declaration establishes that the
        port can subsequently be referenced.

Change:

        Elaboration of a port association list consists of the
        elaboration of each port association element in the
        association list whose actual is not the reserved word
        open.Elaboration of a port association element consists of the
        elaboration of the formal part; the port or subelement or
        slice thereof designated by the formal part is then associated
        with the signal or expression designated by the actual
        part. This association involves a check that the r4restrictions
        on port associations (see 1.1.1.2) are met. It is an error if
        this check fails.

To:

        Elaboration of a port association list consists of the
        elaboration of the port association element or elements in the
        association list associated with each port
        declaration. Elaboration of the port association elements
        associated with a port declaration proceeds as follows:

        a) The subtype indication of the corresponding port
        declaration is elaborated.

        b) The formal part or parts of the port association elements
        corresponding to the port declaration are elaborated.

        c) If the type of the port is an array type or contains a
        subelement that is of an array type, the rules of 3.2.1.1 are
        applied to determine the index ranges.

        d) If the actual is not the reserved word open, the port (or
        each subelement or slice thereof) designated by the formal part
        or parts is then associated with the signals or expressions
        designated by the actual part. This association involves a
        check that the restriction on port associations (see 1.1.1.2)
        are met. It is an error if this check fails.

12.3.1.4 Object declarations

Add as a first paragraph:

        The rules of this clause apply to explicitly declared object
        declarations. Generic declarations, port declarations and
        other interface declarations are elaborated as outlined in
        12.2.1 through 12.2.4 and 12.5.

Remove note 1 which starts

       "These rules apply to all object declarations other than ..."

12.5

Change:

        b) Execution of a subprogram call involves the elaboration of
        the parameter interface list of the corresponding subprogram
        declaration; this involves the elaboration of each interface
        declaration to create the corresponding formal
        parameters. Actual parameters are then associated with formal
        parameters...

To:

        b) Execution of a subprogram call involves the elaboration of
        the parameter association list. This involves the elaboration
        of the parameter association element or elements in the
        association list associated with each interface
        declaration. Elaboration of the parameter association elements
        associated with an interface declaration proceeds as follows:

        i) The subtype indication of the corresponding interface
        declaration is elaborated.

        ii) The formal part or parts of the parameter association
        elements corresponding to the interface declaration are
        elaborated.

        iii) If the type of the interface object is an array type or
        contains a subelement that is of an array type, the rules of
        3.2.1.1 are applied to determine the index ranges.

        iv) The interface object designated by the formal part or
        parts is then associated with the actual parts.

        v) If the interface object is a variable of mode OUT then the
        implicit initial value for the object is determined.


        



-------------END OF IR----------------

-------------BEGINNING OF IR----------------

VHDL Issue Number:        2085  

Language_Version          VHDL-2002
Classification            Language Modeling Enhancement or Deficiency
Summary                   What happens when a parameter of mode out is not assigned in a procedure?
Relevant_LRM_Sections     2.1.1.1
Related_Issues            
Key_Words_and_Phrases     procedures, out
Authors_Name              Larry Soule
Authors_Phone_Number      650-584-1919
Authors_Fax_Number        
Authors_Email_Address     larrys@synopsys.com
Authors_Affiliation       Synopsys
Authors_Address1          
Authors_Address2          
Authors_Address3          

Current Status:           Analyzed

Superseded By:

------------------------
Date Submitted:           8 February 2006
Date Analyzed:            09 March 2006
Author of Analysis:       Chuck Swart
Revision Number:          2
Date Last Revised:        20 April 2006

Description of Problem
----------------------

Here is an example of a procedure with an out-mode
    parameter that is conditionally assigned.
    
    architecture a of e is
        subtype t is bit_vector(1 to 4);
        constant c : t :=     (others => '1');
    
        procedure p(i : in integer; o : out t) is
        begin
            if i > 0 then
                o := c;
            end if;
        end procedure;
    
    Section 2.1.1.1 says that only for in and inout parameters is the
    value copied in (when using pass by copy).  When exiting the
    procedure, inout and out parameters are copied back in.  If the
    out mode formal is not assigned in the procedure, this has the
    effect of writing t'left back into the actual which seem
    counter-intuitive.
    
    At least 2 VHDL implementations known to me handle this
    differently.

Proposed Resolution
-------------------

Specify that only parameters of mode out that have been assigned
inside the procedure get copied out.
    

VASG-ISAC Analysis & Rationale
------------------------------

One way to view this problem is to ask the question: Do OUT mode
parameters get initialized (presumably to the appropriate 'left
value)? Because of the copy-in semantics for objects of mode in or
mode inout, this question is moot for other modes. Also, The rules for
signal parameters make this question meaningless for signals. That
leaves the question for out mode variables.

The LRM is not completely clear on this issue. Section 12.5 states:

"Execution of a subprogram call involves the elaboration of the
parameter interface list of the corresponding subprogram declaration;
this involves the elaboration of each interface declaration to create
the corresponding formal parameters."

Elaboration of interface declarations is not defined explicitly.
However, section 12.3.1.4 Deals with Object declarations:

"Elaboration of an object declaration that declares an object other
than a file object or an object of a protected type proceeds as
follows:

...

b) If the object declaration includes an explicit initialization
expression, the the initial value of the object is obtained by
evaluating the expression....Otherwise, any implicit initial value for
the object is determined.

c) the object is created.

d) Any initial value is assigned to the object."

Its not clear whether or not this clause refers to interface
declarations.

Clause 4.3.1 Object declarations, states:

    object_declaration ::=
                       constant_declaration
                      |signal_declaration
                      |variable_declaration
                      |file_declaration 

These are syntactic constructs which are not interface declarations.
This seems to imply that object declarations are not intended to
include interface declarations.

Also, in the above clause, the meaning of section b) is unclear.  Out
mode parameters must not contain an explicit initialization expression
(such expressions are interpreted as the value for the parameter if
left unassociated.) So its not clear whether or not an implicit
initial value for the object applies.

There are (at least) two possible solutions to the problem.

1. Extend copy-in semantics to include out mode parameters. This has
the advantage that values which are not updated within the subprogram
are unchanged. This solution also works well with pass by reference
implementations.  (There might be a problem with access types?)

2. Change clause 12.3.1.4 to specifically refer to interface
declarations (or add a new clause). This solution seems to meet the
VHDL principle that all variables are initialized, and the
initialization of interface declaration would be virtually the same as
that for local variables in the subprogram. There is a potential
performance problem, in that arrays which are passed by reference
would have to be initialized each time a subprogram was called.

Its not clear whether either of these solutions would affect backward
compatibility. It does seem that different implementations have
treated this problem in different ways, so some sort of backward
incompatibility may be inevitable.

The opinion of the ISAC is that OUT mode parameters should be
initialized to the default value. If the initialization is not
wanted, then the mode should be INOUT, which will imply copy-in
copy-out semantics.

IR 2082 involves extensive rewording of clause 12.5. This
rewording includes initialization of OUT mode parameters.

VASG-ISAC Recommendation for IEEE Std 1076-2002
-----------------------------------------------

No change. It is not clear whether or not OUT mode parameters are to
be initialized in the current standard.


VASG-ISAC Recommendation for Future Revisions
---------------------------------------------

Adopt the proposed wording used in IR 2082.


-------------END OF IR----------------

-------------BEGINNING OF IR----------------

VHDL Issue Number:        2091  

Language_Version          VHDL-2002
Classification            Language Definition Problem
Summary                   Translation between std_logic_vector based types and std_ulogic_vector

Relevant_LRM_Sections In std_logic_1164 there is a function called:
                          to_stdlogicvector (std_ulogic_vector) which
                          is used to convert from the base type
                          "std_ulogic" to the base type "std_logic"
                          because the base type for these types are
                          the same, some simulators say they the are
                          interchangeable.  Others do not.

Related_Issues            There were some other issues recently on closely 
                          related subtypes.
Key_Words_and_Phrases     to_stdlogicvector, to_stdulogicvector
Authors_Name              David Bishop
Authors_Phone_Number      585-726-6788
Authors_Fax_Number        
Authors_Email_Address     dbishop@vhdl.org
Authors_Affiliation       Eastman Kodak
Authors_Address1          2400 mt read Blvd
Authors_Address2          Rochester NY 14650-3006
Authors_Address3          

Current Status:           Analyzed

Superseded By:

------------------------
Date Submitted:           19 April 2006
Date Analyzed:            20 April 2006
Author of Analysis:       Peter Ashenden
Revision Number:          1
Date Last Revised:        20 April 2006

Description of Problem
----------------------

Please look at the following code:
    library ieee:
    use ieee.std_logic_1164.all;
    use ieee.numeric_std.all;
    
    ......
    
    variable UUU :
    unsigned (5 downto 0);
    variable SSS : std_logic_vector (5 downto 0);
    variable SUSU : std_ulogic_vector (5 downto 0);
    begin
      SUSU ::    std_ulogic_vector (SSS);  -- works but shouldn't (use to_stdulogicvector(SSS))
      SSS := std_logic_vector (SUSU);  -- works but shouldn't (use to_stdlogicvector(SUSU))
      UUU := unsigned (sss);   -- works
      SSS := std_logic_vector(UUU); -- works
      UUU := unsigned(SUSU);  -- works but shouldn't (use unsigned(to_stdlogicvector(SUSU)))
      SUSU := std_ulogic_vector(UUU); -- works but shouldn't (use to_stdulogicvector(std_logic_vector(UUU)))
    
Added: the relevant types in package numeric_std are:
   type UNSIGNED is array (NATURAL range <>) of STD_LOGIC;
   type SIGNED is array (NATURAL range <>) of STD_LOGIC;

The relevant types in package std_logic_1164 are:

    TYPE std_ulogic_vector IS ARRAY ( NATURAL RANGE <> ) OF std_ulogic;
    FUNCTION resolved ( s : std_ulogic_vector ) RETURN std_ulogic;
    SUBTYPE std_logic IS resolved std_ulogic;
    TYPE std_logic_vector IS ARRAY ( NATURAL RANGE <>) OF std_logic;


Proposed Resolution
-------------------

Two as I see it.  

If this is legal VHDL, then a note about closely related subtypes
should be in the LRM.

If this is not legal VHDL, then I will notify the group which says
this code is legal.

So far 1 simulator says this is legal and 3 say it isn't.

VASG-ISAC Analysis & Rationale
------------------------------

The submitter raises the question of what type conversions are
permitted among the type std_ulogic_vector, std_logic_vector (defined
in std_logic_1164) and unsigned (defined in numeric_std.

Type conversions are described in clause 7.3.5. A type conversion is
legal if the base type of the type mark (the target type) is closely
related to the type of the operand. The types in question are all
closely related, for the following reasons:

- They are all array types.

- They all have the same dimensionality (namely, 1).

- For each index position, they index types are all the same (namely,
  natural).

- The element types are all the same (namely, std_ulogic).

Note that, regarding this last point, it is the type of the elements
that is relevant, not the subtype. While std_logic_vector and unsigned
have std_logic as their element subtype, both have std_ulogic (the
base type of std_logic) as the element type.

Since all three array types are closely related, conversion between
any two is legal.

One might then ask why std_logic_1164 includes the to_stdlogicvector
and to_stdulogicvector functions, if their effect can be achieved with
a simple type conversion. One possible rationale is that the package
also contains overloaded functions of these names that convert a
bit_vector operand to the target type. Those functions cannot use the
target type name as the function name, so a different name was
chosen. The package designers may then have added the functions
converting between std_ulogic_vector and std_logic_vector to mirror
the naming of the bit_vector conversion functions.


VASG-ISAC Recommendation for IEEE Std 1076-2002
-----------------------------------------------

No change in interpretation.

VASG-ISAC Recommendation for Future Revisions
---------------------------------------------

No change.


-------------END OF IR----------------
Received on Thu Apr 20 09:27:02 2006

This archive was generated by hypermail 2.1.8 : Thu Apr 20 2006 - 09:27:02 PDT