=============================================================================== 1076.1 Ballot Resolution Commitee Comment Resolution Report ------------------------------------------------------------------------------- CRR Number: 1 Topic Addressed: Predefined attributes 'Ramp and 'Slew Related CRs: 96, 97, 98, 99, 101 (Alan Mantooth, Analogy, affirmative) 127, 128, 129, 171 (Michael J. Haney, Univ. of Illinois, negative) Relevant LRM Sections: 14.1 Resolution Status: Approved on 9.2.1998 =============================================================================== Comment Reports Summary ~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------------------------------------- CR096 delta document page 100 line 3083 replace "S'Ramp(tr, tf)" with "S'RAMP(TR, TF)" page 101 line 3090 replace "S'RAMP(tr, tf)" with "S'RAMP(TR, TF)" line 3091 replace "" with line 3098 replace "s'LAST-EVENT" with "s'LAST_EVENT" line 3100 it would be clearer and simpler if you would replace "s + (lv - s) * (tt - s'LAST_EVENT)/tt" with "lv + (s'LAST_EVENT/tt) * (s - lv)" line 3128 replace "S'Event" with "s'EVENT" Proposed Resolution ~~~~~~~~~~~~~~~~~~~~ See the description for the suggested resolutions. ---------------------------------------------------------------------- CR097 delta document, page 102, line 45 states If omitted, it defaults to the value of 0.0: (sic) which approximates the negative of the maximum rising infinite slope.. (sic) yet the intent is to approximate the negative of the provided value for MAX_RISING_SLOPE, which need not be infinite! Proposed Resolution ~~~~~~~~~~~~~~~~~~~ rewrite delta document, page 102, line 45 to state If omitted, it defaults to the value 0.0. When MAX_FALLING_SLOPE is 0.0, it is interpreted as a value which approximates the negative of the value specified for the maximum rising slope. ---------------------------------------------------------------------- CR099 delta document, page 105 line 3236 replace If omitted, it defaults to the value of 0.0; which approximates the negative of the maximum rising infinite slope.. with If omitted, it defaults to the value 0.0. When MAX_FALLING_SLOPE is 0.0, it is interpreted as a value which approximates the negative of the value specified for the maximum rising slope. line 3241 replace "Q'Slew(max...)" with "Q'SLEW(MAX...)" line 3248 replace "" with "" line 3249 replace "Q'SLEW(max...)" with "Q'SLEW(MAX...)" line 3250 for clarity, rename "slope" to "fall_slope" line 3260 replace "slope" with "fall_slope" line 3261 replace "slope" with "fall_slope" line 3258 replace "rslope" with "-rslope" line 3264 replace "max_rising_slope >= 0.0" with "max_rising_slope > 0.0" line 3264 replace "max_falling_slope >= 0.0" with "max_fall_slope < 0.0" Proposed Resolution ~~~~~~~~~~~~~~~~~~~ See the description for the suggested resolutions. ---------------------------------------------------------------------- CR101 Contrary to the name, what is called MAX_FALLING_SLOPE is really the minimum value for the falling slope. Proposed Resolution ~~~~~~~~~~~~~~~~~~~ Change the name MAX_FALLING_SLOPE to MIN_FALLING_SLOPE consistently. ---------------------------------------------------------------------- CR127 In the discussion of parameters for S'SLEW, the comment is made that if MAX_FALLING_SLOPE is omitted, "...it defaults to the value of 0.0; which approximates the negative of the maximum rising infinite slope.." (note both the semicolon and double period typos, reproduced here for completeness) If I understand the code example, the actual response (as well as the sensible one) is to return Real'LOW, which is the negative of the maximum infinite positive (rising) slope (Real'HIGH). Proposed Resolution ~~~~~~~~~~~~~~~~~~~ On lines 3146-3147, replace: "...it defaults...slope.." with "...it defaults to Real'LOW, which approximates an infinite negative slope." ---------------------------------------------------------------------- CR128 In the discussion of parameters for S'SLEW, the comment is made that the MAX_FALLING_SLOPE "evaluates to a nonpositive number." However, the code example provided for S'SLEW contains the following: "assert max_rising_slope >= 0.0 and max_falling_slope >= 0.0" ^ One of these seems to be wrong. Proposed Resolution ~~~~~~~~~~~~~~~~~~~ One line 3176, change: "...falling_slope >= 0.0" to "...falling_slope <= 0.0" ---------------------------------------------------------------------- CR129 In the discussion of parameters for Q'SLEW, the comment is made that if MAX_FALLING_SLOPE is omitted, "...it defaults to the value of 0.0; which approximates the negative of the maximum rising infinite slope.." (note both the semicolon and double period typos, reproduced here for completeness) If I understand the code example, the actual response (as well as the sensible one) is to return Real'LOW, which is the negative of the maximum infinite positive (rising) slope (Real'HIGH). Proposed Resolution ~~~~~~~~~~~~~~~~~~~ On lines 3236-3237, replace: "...it defaults...slope.." with "...it defaults to Real'LOW, which approximates an infinite negative slope." ---------------------------------------------------------------------- CR171 In the discussion of parameters for Q'SLEW, the comment is made that the MAX_FALLING_SLOPE "evaluates to a nonpositive number." However, the code example provided for Q'SLEW contains the following: "assert max_rising_slope >= 0.0 and max_falling_slope >= 0.0" ^ One of these seems to be wrong. Proposed Resolution ~~~~~~~~~~~~~~~~~~~ One line 3264, change: "...falling_slope >= 0.0" to "...falling_slope <= 0.0" =============================================================================== Analysis and Action Taken ~~~~~~~~~~~~~~~~~~~~~~~~~ We have redefined the three quantities to support composites. The corresponding new definitions are included below. Note that typographical issues (e.g. bold for reserved words, upper case for named entities declared in package Standard) will be handled when the revised definitions are integrated into the LRM. We have rewritten the textual description of the three quantities such that the following issues have been addressed: CR097 line 3145 CR098 line 3146 CR099 line 3236 CR127 CR129 We have rewritten the equivalent blocks for the three quantities. As a consequence the following issues have either been addressed or do not apply any more: CR096 lines 3091, 3100 CR098 lines 3159, 3169, 3176, 3201, 3207 CR099 lines 3248, 3258, 3264 CR128 CR171 Note that in last two cases the assert statement in function slope is sufficient to guarantee correct values for the parameters. With respect to CR098 lines 3161, 3171, 3172 CR099 lines 3250, 3260, 3261 we have kept the name of the function unchanged. In both cases the function is local to the block, and it is called in the initial value expression of the immediately following statement. Therefore, we believe that there is no possibility of confusion. With respect to CR101, we have changed the names of the two parameters in the definition of S'Slew to RISING_SLOPE and FALLING_SLOPE because their alues directly specify the slope. We have left the parameter names unchanged in the definition of Q'Slew; we believe that MAX_FALLING_SLOPE adequately describes the meaning of the parameter, the steepest slope in falling direction. We also believe that the proposed name MIN_FALLING_SLOPE could easily be misunderstood to mean the shallowest slope. The other issues raised in the CRs are of typographical nature. They either do not apply any more, or they will be addressed when the revised definitions are integrated into the LRM. =============================================================================== Revised Definitions ~~~~~~~~~~~~~~~~~~~ S'RAMP[(TRISE [,TFALL])] Kind: Quantity Prefix: Any signal denoted by the static name S whose scalar subelements are of a floating point type Parameters: TRISE: a static expression of a floating point type that evaluates to a nonnegative value. If omitted, it defaults to 0.0. TFALL: a static expression of a floating point type that evaluates to a nonnegative value. If omitted, it defaults to the value of TRISE. Result Type: The base type of S. Result: A quantity where each scalar subelement follows the corresponding scalar subelement of S. If the value of any parameter is greater than 0.0, the corresponding value change is linear from the current value of the scalar subelement of S to its new value, whenever that subelement has an event. Suppose that SRAMP is an alias for any scalar subelement of the attribute name, that STYPE designates its type, that SELEM is an alias for the corresponding scalar subelement of S, and that TRISE and TFALL designate the actual or defaulted values of the parameters with the same names. Then the behavior of each scalar subelement of S'RAMP is formally described by the value of SRAMP produced by the following equivalent block: block generic (trise, tfall: real); generic map (trise => real(TRISE), tfall => real(TFALL)); port (signal s: in real; quantity sramp: out real); port map (s => real(SELEM); STYPE(sramp) => SRAMP); signal slope, tt: real := 0.0; begin assert trise >= 0.0 and tfall >= 0.0; sramp == s'delayed - slope * (tt - s'delayed'last_event); break on s'delayed, slope; -- Start or end of ramp process begin wait on domain; loop wait on s; while s'event loop if s > sramp and trise > 0.0 then tt <= trise; slope <= (s-sramp)/trise; wait on s for trise; elsif s < sramp and tfall > 0.0 then tt <= tfall; slope <= (s-sramp)/tfall; wait on s for tfall; else wait on s for 0.0; end if; end loop; slope <= 0.0; end loop; end process; end block; ---------------------------------------------------------------------- S'SLEW[(RISING_SLOPE [,FALLING_SLOPE])] Kind: Quantity Prefix: Any signal denoted by the static name S whose scalar subelements are of a floating point type Parameters: RISING_SLOPE: a static expression of type REAL that evaluates to a positive value. If omitted, it defaults to REAL'HIGH, which is interpreted as an infinite slope. FALLING_SLOPE: a static expression of type REAL that evaluates to a negative value. If omitted, it defaults to the negative of RISING_SLOPE. The value REAL'LOW is interpreted as a negative infinite slope. Result Type: The base type of S. Result: A quantity where each scalar subelement follows the corresponding scalar subelement of S. If the value of RISING_SLOPE is less that REAL'HIGH, or if the value of FALLING_SLOPE is greater than REAL'LOW, the corresponding value change is linear from the current value of the scalar subelement of S to its new value, whenever that subelement has an event. Suppose that SSLEW is an alias for any scalar subelement of the attribute name, that STYPE designates its type, that SELEM is an alias for the corresponding scalar subelement of S, and that RISING_SLOPE and FALLING_SLOPE designate the actual or defaulted values of the parameters with the same names. Then the behavior of each scalar subelement of S'SLEW is formally described by the value of SSLEW produced by the following equivalent block: block generic (rising_slope, falling_slope: real); generic map (rising_slope => RISING_SLOPE, falling_slope => FALLING_SLOPE); port (signal s: in real; quantity sslew: out real); port map (s => real(SELEM); STYPE(sslew) => SSLEW); signal slope, tt: real := 0.0; begin assert rising_slope > 0.0 and falling_slope < 0.0; sslew == s'delayed - slope * (tt - s'delayed'last_event); break on s'delayed, slope; -- Start or end of ramp process variable ttv: real; begin wait on domain; loop wait on s; while s'event loop if s > sslew and rising_slope /= real'high then ttv := (s-sslew)/rising_slope; slope <= rising_slope; elsif s < sslew and falling_slope /= real'low then ttv := (s-sslew)/falling_slope; slope <= falling_slope; else ttv := 0.0; end if; tt <= ttv; wait on s for ttv; end loop; slope <= 0.0; end loop; end process; end block; --------------------------------------------------------------------- Q'SLEW[(MAX_RISING_SLOPE [,MAX_FALLING_SLOPE])] Kind: Quantity Prefix: Any quantity denoted by the static name Q Parameters: MAX_RISING_SLOPE: a static expression of type REAL that evaluates to a positive value. If omitted, it defaults to REAL'HIGH, which is interpreted as an infinite slope. MAX_FALLING_SLOPE: a static expression of type REAL that evaluates to a negative value. If omitted, it defaults to the negative of MAX_RISING_SLOPE. The value REAL'LOW is interpreted as a negative infinite slope. Result Type: The base type of Q. Result: A quantity where each scalar subelement follows the corresponding scalar subelement of Q, but its derivative w.r.t. time is limited by the specified slopes. Suppose that QSLEW is an alias for any scalar subelement of the attribute name, that QTYPE designates its type, that QELEM is an alias for the corresponding scalar subelement of S, and that MAX_RISING_SLOPE and MAX_FALLING_SLOPE designate the actual or defaulted values of the parameters with the same names. Then the behavior of each scalar subelement of Q'SLEW is formally described by the value of QSLEW produced by the following equivalent block: block generic (max_rising_slope, max_falling_slope: real); generic map (max_rising_slope => MAX_RISING_SLOPE, max_falling_slope => MAX_FALLING_SLOPE); port (quantity q: in real; quantity qslew: out real); port map (q => real(QELEM); QTYPE(qslew) => QSLEW); type slewstate is (falling, none, rising); signal slewing: slewstate := none; begin assert max_rising_slope > 0.0 and max_falling_slope < 0.0; case slewing use when rising => qslew'Dot == max_rising_slope; when none => qslew == q; when falling => qslew'Dot == max_falling_slope; end case; break on slewing when slewing'delayed /= none; process begin if q'dot > max_rising_slope then slewing <= rising; wait on q'above(qslew); elsif q'dot < max_falling_slope then slewing <= falling; wait on q'above(qslew); else slewing <= none; wait on q'dot'above(max_rising_slope), q'dot'above(max_falling_slope); end if; end process; end block; ===============================================================================