VHDL Issue Number: 0184 Classification: Language Definition Problem Language Version: VHDL-87 Summary: VPI Issue 8 -- Is a TIME literal locally static? Related Issues: TBD Relevant LRM Sections: TBD Key Words and Phrases: TBD Current Status: Submitted 1076-1993 Disposition: Superseded (ISAC Issues Outstanding) Disposition Rationale: N/A Superseded By: 1012 ----------------------- Date Submitted: 1991/03/15 Author of Submission: J. R. Armstrong Author's Affiliation: Virginia Polytechnic Institute and State University Author's Post Address: Bradley Department of Electrical Engineering Virginia Polytechnic Institute and State University Blacksburg, VA 24061 Author's Phone Number: (703) 231-4723 Author's Fax Number: Author's Net Address: JRA@VTVM1.CC.VT.EDU ----------------------- Date Analyzed: TBD Author of Analysis: TBD Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/07/26 21:43:59 $ Description of Problem ---------------------- Is a physical literal of type TIME locally static? LRM section 7.4, paragraph 3 specifies that: "An expression is said to be locally static if and only if every operator in the expression denotes a predefined opera- tor whose operands and result are scalar and every primary in the expression is a locally static primary, where a lo- cally static primary is defined to be one of the following: 1. a literal of any type; 2. ... ..." If we interpret that the first item for a locally static primary includes a literal of a physical type, then we can say that a physical literal of type TIME is locally static. Thus, whether a physical literal is considered as the first item or not should be clarified by VASG. The tests ch05/s03/04010102.vhd and ch02/s07/01010101.vhd will be af- fected by the ruling of VASG. The test point (050300_040101) specifies that "the time ex- pression in a disconnection specification must be static and must evaluate to a non-negative value". If a physical li- teral of type TIME is interpreted to be LOCALLY STATIC, we can say that the test ch05/s03/04010102.vhd is an expect failure test because the time expression (-10 ns) evaluates to a non-negative value, not because it is not static. If a physical literal of time TIME is interpreted to be NOT LO- CALLY STATIC, the test is an expect failure test because the time expression specification is not static. In the test ch02/s07/01010101.vhd, if the physical literals 1 US and 1000 NS are considered to be locally static, they are evaluated to have the same value. Since the test satis- fies the conformance rule, the test should be an expect suc- cess test. However, if physical literals are not considered to be locally static, their values cannot be compared to each other. Since the test does not satisfy the conformance rule, the test should be an expect failure test. Note that this issue was already submitted by Synopsys (IR 53). Expanding the above issue, we can consider another issue: Are the expressions involving TIME units that evaluate to a numeric value locally static? The tests ch03/s01/s2/03010103.vhd and ch14/s02/01140101.vhd are re- lated to this issue. In the test ch03/s01/s2/03010103.vhd, if MS and NS are con- sidered as locally static primaries, the time expression (ms/ns) is locally static and the test should be an expect success test. Otherwise, the test should be an expect fail- ure test. For the test ch14/s02/01140101.vhd, it should be clarified whether the expressions such as TIME'POS(fs) are locally static or not. If they are locally static, the test should be an expect success test. Otherwise, it should be an expect failure test. -- ##53004112441FF***************************************************** --+ File: [SUITE.CH05.S03]04010102.VHD -- --+ Copyright: (c) 1987, 1988 by CAD Language Systems, Inc. All rights reserve -- --+ LRM_version: IEEE Std. 1076-1987 -- --+ Subsets: -- --+ Description: -- --+ Test_point - (050300_040101) " The time expression in a disconnection -- specification must be static and must evaluate to a non-negative value." -- --+ Test_objective (2)- Test that the time expression in a disconnection -- specification is static and evaluates to a non-negative value. -- This test should indicate an error because the time expression in the -- disconnection specification is a negative value. -- --+ References : None -- -- Instructions: None -- --+ Keywords: guarded signals, disconnect, others, signals -- --+ Test_Results: Expect_Failure. Output_checked. Approximate Error Message: -- " Time expression in a disconnection specification must be static -- and must evaluate to a non-negative value." -- --+ Test_type: Locally Static Semantic -- --+ History: Created /CLSI 08-30-88 -- Modified RA/Vtech 05-30-89 -- Corrected CHC/Vtech 05-08-90 -- Corrected CHC/Vtech 12-3-90 -- --+ Comments: CLSI-FILE : [000000.SPECS.DISCO]18 -- --**************************************************************************** package p18 is subtype S is integer range 1 to 100; type S_vect is array (positive range <>) of S; function F (SV: S_vect) return S; signal C1 : F S bus; disconnect C1: S after -10 ns; -- Failure_here end; -- ##27001111148FF************************************************************ -- --+ File: [SUITE.CH02.S07]01010101.vhd -- --+ Copyright: (c) 1989 by Virginia Tech. All rights reserved. -- --+ LRM_Version: IEEE Std. 1076-1987 -- --+ Subsets: All -- --+ Description: -- --+ Test_point - (020700_010101) "Whenever the language rules either require o -- allow the specification of a given subprogram to be provided in more than -- one place, a numeric literal can be replaced by a different numeric litera -- if and only if both have the same value." -- --+ Test_objective (1) - Test that a numeric literal can be replaced by anoth -- when the conformance rules are satisfied. -- --+ References: None -- --+ Instructions: None -- --+ Keywords: language rules, specification, numeric literal -- --+ Test_Results: Expect_Success. Self_Checking. -- --+ Test_Type: Locally Static Semantic -- --+ History: Created KSC/VTech 4-13-90 -- --+ Comments: None -- --**************************************************************************** package P1 is procedure PX (signal I1: in Time := 1 us; signal I2 : out Bit; signal I3 : nout Integer); end P1; package body P1 is procedure PX (signal I1: in Time := 1000 ns; signal I2 : out Bit; signal I3 : nout Integer) is begin assert (I1 /= 1 us) report "No failure on test" ; end PX; end ; entity test is end test; architecture behav of test is begin end behav; -- ##31203113241FF************************************************************ --+ File: [SUITE.CH03.S01.S2]03010103.VHD -- --+ Copyright: (c) 1987, 1988 by CAD Language Systems, Inc. All rights reserve -- --+ LRM_version: IEEE Std. 1076-1987 -- --+ Subsets: -- --+ Description: -- --+ Test_point - (030120_030101) " Each bound of a range constraint that is -- used in an integer type definition must be a locally static expression -- [of some integer type, but the two bounds need not have the same integer -- type.]" -- --+ Test_objective (3)- Test that each bound of a range constraint that is -- used in an integer type definition is a locally static expression -- [of some integer type, but the two bounds need not have the same integer -- type.] -- This test should not report an error. -- --+ References : None -- --+ Instructions: None -- --+ Keywords: range constraint, bounds -- --+ Test_Results: Expect_Success . Output_checked. -- --+ Test_type: Locally Static Semantic -- --+ History: Created /CLSI 08-30-88 -- -- Modified RA/Vtech 04-15-89 -- Modified CHC/VT 05-04-90 -- --+ Comments: CLSI-FILE : [000000.TYPES.GENERAL]05 -- Whether (ms/ns) is locally static or not -- is not explicitly explained in the LRM. -- It will be sent to VASG for clarification. -- --**************************************************************************** package p5 is type a is range (1+1) to (ms/ns); -- Success_here end ; --##E2001E11145FF************************************************************* -- --+ File: [SUITE.CH14.S02]01140101.VHD -- --+ Copyright: (c) 1986 by Intermetrics Inc. All rights reserved -- --+ LRM_Version: IEEE Std. 1076-1987 -- --+ Subsets: None -- --+ Description: -- --+ Test_point - (140200_011401) "The predefined type TIME in package STANDARD -- defines eight units -fs, ps, ns, us, ms, sec, min and hr. -- --+ Test_objective (1) - Test that the physical type time (with units fs, ps, -- ns, us, ms, s, min, hr in their conventional magnitudes) is -- predefined in package STANDARD. -- --+ References: None -- --+ Instructions: None -- --+ Keywords: TIME, Package STANDARD -- --+ Test_Results: Expect_Success. Self_Checked. -- --+ Test_Type: Locally Static Semantic -- --+ History: Created MM/MCC 6-19-89 -- Modified CHC/VT 8-24-89 -- Modified CHC/VT 5-4-90 -- --+ Comments: Original file name: S-03-1-3-1001A.VHD -- Updated to 1076-1987 VHDL, checked w/Recognizer. -- (Deene)Ogden@mcc.com 20jun88 -- Corrected PROCESS-RETURN stmts, time units. -- Wed Sep 21 16:40:13 1988 -- Steve Grout -- -- Whether POS(fs) is locally static or not is not explicitly -- explained in the LRM. -- This will be sent to VASG for clarification. --**************************************************************************** -- Begin test: >>> entity E is port (PT: BOOLEAN) ; end E; architecture BB of E is begin process subtype BTRUE is BOOLEAN range TRUE to TRUE; variable V1: BTRUE; begin case V1 is when ( (TIME'POS(fs) = 1) and (TIME'POS(ps) = 1000 * TIME'POS(fs)) and (TIME'POS(ns) = 1000 * TIME'POS(ps)) and (TIME'POS(us) = 1000 * TIME'POS(ns)) and (TIME'POS(ms) = 1000 * TIME'POS(us)) and (TIME'POS(sec) = 1000 * TIME'POS(ms)) and (TIME'POS(min) = 60 * TIME'POS(sec)) and (TIME'POS(hr) = 60 * TIME'POS(min)) ) => null ; when others => null ; end case; assert FALSE report "TEST OK for given Test Point" severity note; wait; end process; end BB; Proposed Resolution ------------------- TBD VASG-ISAC Analysis & Rationale ------------------------------ TBD VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- TBD VASG-ISAC Recommendation for Future Revisions --------------------------------------------- TBD