ISAC: Two new IRs

From: Chuck Swart <cswart@model.com>
Date: Wed Dec 15 2004 - 16:56:20 PST

Here are two more new IRs for your consideration.

Chuck Swart

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

VHDL Issue Number: 2049

Language_Version: VHDL-2002
Classification: Language Definition Problem
Summary: Circular definition of an event on a signal
Relevant_LRM_Sections: 12.6.2
Related_Issues:
Key_Words_and_Phrases: event, signal update
Authors_Name: Peter Ashenden
Authors_Phone_Number: +61 8 8339 7532
Authors_Fax_Number: +61 8 8339 2616
Authors_Email_Address: peter@ashenden.com.au
Authors_Affiliation: Ashenden Designs
Authors_Address1:
Authors_Address2:
Authors_Address3:

Current Status: Submitted

Superseded By:

------------------------
Date Submitted: 7 May 2004
Date Analyzed:
Author of Analysis:
Revision Number: 0
Date Last Revised:

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

    We appear to have created a circular definition for the term "event".
    
    12.6.2 on page 174 defines an event on S in terms of the expression
    "S = S'Delayed" being false.
    
    12.6.3 on page 176 defines update of S'Delayed in terms of execution
    of an equivalent process.
    
    14.1 on page 196 specifies the equivalent process as
    
        P:
    process (S)
           begin
              R <= transport S after T;
           end process ;
    
    and specifies that S'Delayed(T) is the same as R for any T.
    
    9.2 on page 135 specifies that a process containing a sensitivity list
    contains an implicit wait statement of the form
    
        wait on sensitivity_list ;
    
    where the sensitivity_list in the wait statement is that in the
    process header. Hence, the above process is equivalent to
    
        P: process
           begin
              R <= transport S after T;
              wait on S;
           end process ;
    
    8.1 on page 117 defines the sensitivity set of a wait statement such
    as the one above as the set of signal in the sensitivity list, in this
    case, S.
    
    8.1 on page 117 then specifies that a process suspended by a wait
    statement can resume as the result of an event occurring on a signal
    in the sensitivity set of the wait statement.
    
    An event is defined ....
    

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

    I'd suggest avoiding this circular definition by revising the
    definition of event as follows:
    
    Updating a signal of type T is said to change the current value of the
    signal if and only if application of the predefined "=" operator on
    type T to the newly updated value of the variable containing the
    current value of the signal and the previous value of that variable
    evaluates to False.
    

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

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

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

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

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

VHDL Issue Number: 2050

Language_Version: VHDL-2002
Classification: Language Definition Problem
Summary: Definition of S'Last_Value was apparently broken in 1993
Relevant_LRM_Sections: Section 14.
Related_Issues:
Key_Words_and_Phrases: 'last_value
Authors_Name: Erich Marschner
Authors_Phone_Number: 410 750 6995
Authors_Fax_Number:
Authors_Email_Address: erichm@cadence.com
Authors_Affiliation: Cadence
Authors_Address1:
Authors_Address2:
Authors_Address3:

Current Status: Submitted

Superseded By:

------------------------
Date Submitted: 14 December 2004
Date Analyzed:
Author of Analysis:
Revision Number: 0
Date Last Revised:

Description of Problem
----------------------
      
  - VHDL 87 defines the value of S'Last_Value at time 0 (and prior to the first change on S) to be equal to S.
  - VHDL 93 does not appear to define the value of S'Last_Value at time 0 / prior to the first change on S.
  - VHDL 2002 contains the same definition as in VHDL 93
    
  The VHDL 1076-1987 LRM contains the following definition for S'Last_Value (on page 14-8):
    
      S'LAST_VALUE
          Kind: Function
          Prefix: Any signal denoted by the static signal name S.
          Result Type: The base type of S.
          Result: The previous value of S, immediately before the last change of S. Specifically:
    
          For a scalar signal S, S'LAST_VALUE = S'DELAYED(T) where T
>= 0ns is the smallest value such that S'STABLE(T) is FALSE.
          If no such T exists, then S'LAST_VALUE is equal to S.
    
          For a composite signal S, S'LAST_VALUE is equal to the
          aggregate of the previous values of each element of S.
    
    Note that this defines the value of S'Last_Value at time 0, by
    saying that if no previous change on S occurred (i.e., no T>=0ns
    exists for which S'STABLE(T) = False), then S'Last_Value is equal
    to S. This applies at time 0, since all signals are presumed to
    be stable at time 0, and to have had their initial values for an
    infinite time into the past (see 12.6.4, The simulation cycle,
    first bullet of initialization phase), and furthermore continues
    to apply up until the first change on S.
    
    The VHDL 1076-1993 LRM contains the following definition for S'Last_Value (on page 188):
    
      S'LAST_VALUE
          Kind: Function
          Prefix: Any signal denoted by the static signal name S.
          Result Type: The base type of S.
          Result: The previous value of S, immediately before the last change of S.
    
    Note that the specific details were apparently deleted, so the new
    definition no longer addresses the issue of the value at time zero
    (and up until the first change), nor does it address the meaning
    of S'Last_Value for a composite signal S. It may be that it is
    unnecessary to define S'Last_Value separately for scalar and
    composite signals, but it is clearly important to define the value
    of S'Last_Value at time 0 (and prior to the first change on S).
    
    The VHDL 1076-2002 LRM contains the same definition of
    S'Last_Value (on page 198) as appears in the VHDL 1076-1993 LRM.

Comment from azro@onebox.com:

    Erich:

    The definition from 1987 was not correct because it did not provide
    for the case where changes occurred two or more deltas before.
    Restoring to '87 (as you recommend) is not the correct solution.

    Regards,

    Alex Z
    -- Alex Zamfirescu azro@onebox.com

Comment from azro@onebox.com:

    Steve:

    I did not claim that there are deltas before the first one at time
    zero. What I meant was that Erich's proposal to go back to the
    '87 definition should not be followed, because the '87 definition
    was wrong. It was wrong in not providing for the case where
    there is a change in a particular delta that is two or more deltas
    behind now. Going back to that definition (based on whatever reason
    to fix the first delta of the time zero) would bring back the problem
    for these other cases, and other problems with the composite types.

    Here is a simple example

.
         Signal S : integer := 0;
    begin
         S <= 100 after 5 ns;
    wait on S;
         -- Here S is 100
.
        S <= 101;
    wait;
        -- Here S is 101;
        S <= 102;
    wait;
        -- Here S is 102
    wait;
        -- Here S is also 102
    wait;
        --S'last_value should be 101 here,
        --but S'Delayed(0 ns) is 102, and S'Delayed(5 ns) is 100.
    ----------
    Besides the fact that the '87 explanation

      "For a scalar signal S, S'LAST_VALUE = S'DELAYED(T) where T >= 0ns is the
      smallest value such that S'STABLE(T) is FALSE. If no such T exists, then
      S'LAST_VALUE is equal to S."

    contradicts the intended well expressed definition

          "Result: The previous value of S, immediately before the last change of S."

    in cases like the one I described, there is a second problem with that (the '87 def)
    related to:

          "For a composite signal S, S'LAST_VALUE is equal to the aggregate of the
    previous values of each element of S."

    Using this definition S'LAST_value might take a value that the composite signal
    S never got.
    Does this require explanations too?

    Anyway, please do not revert last_value definition to its *last_value* (that before
    its last change in '93),.

    Regards,

    Alex Z

Comment from Erich Marschner

 
    Alex,

    When S'Last_Value was originally defined (with the definition
    given in VHDL 87), it was well known that it did not track changes
    over a series of delta cycles. At the time, that was acceptable.
    If this is now considered a problem, then I agree that a new
    definition is required.

    However, the current definition is broken, because it no longer
    specifies the value of S'Last_Value prior to the first change on
    S. The definition

       Result: The previous value of S, immediately before the last change of S.

    presumes that there IS some 'last change of S' that determines
    which previous value of S should be returned. In the absence of
    any change on S, this definition does not apply. So at the very
    least this definition needs to be extended to say

       Result: The previous value of S, immediately before the last change of S, if any;
            otherwise the current value of S.

    Regards,

    Erich

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

    Restore the definition of S'LAST_VALUE to the form that appeared in the VHDL 1076-1987 LRM.

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

VASG-ISAC Recommendation for IEEE Std 1076-1993
-----------------------------------------------
TBD

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

-------------END OF IR----------------
Received on Wed Dec 15 16:56:32 2004

This archive was generated by hypermail 2.1.8 : Wed Dec 15 2004 - 16:56:33 PST