VHDL Issue Number: 0208 Classification: Language Definition Problem Language Version: VHDL-87 Summary: The expression defining the value of a constant does not have to be of the type of the constant. Related Issues: None. Relevant LRM Sections: 4.3.1.1 Key Words and Phrases: Constant declarations, type constraints Current Status: Submitted 1076-1993 Disposition: Closed (All Issues Completely Addressed) Disposition Rationale: Section 4.3.1.1 was updated. Superseded By: N/A ----------------------- Date Submitted: 1991/03/18 Author of Submission: Paul Menchini Author's Affiliation: CAD Language Systems, Inc. Author's Post Address: P.O. Box 13036 Research Triangle Park, NC 27709-3036 Author's Phone Number: (919) 361-1913 Author's Fax Number: Author's Net Address: mench@clsi.com ----------------------- Date Analyzed: TBD Author of Analysis: TBD Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/08/04 01:45:13 $ Description of Problem ---------------------- Paragraph 4 of Section 4.3.1.2 states (in part): If the signal declaration includes the assignment symbol followed by an expression, it must be of the same type as the signal. Similarly, paragraph 2 of Section 4.3.1.3 states: If the variable declaration includes the assignment symbol followed by an expression, the expression specifies an initial value for the declared variable; the type of the expression must be that of the variable. There is no analogous statement in Section 4.3.1.1; instead paragraph 2 of this section merely states (in part): If the assignment symbol ":=" followed by an expression is present in a constant declaration, the expression specifies the value of the constant. It seems that the lack of requirement that the type of the expression be that of the constant is an oversight and not a deliberate omission. Proposed Resolution ------------------- Change the first sentence of paragraph 2 of Section 4.3.1.1 to read: If the assignment symbol ":=" followed by an expression is present in a constant declaration, the expression specifies the value of the constant; the type of the expression must be that of the constant. Moreover, the "it" in the first sentence of paragraph 4 of Section 4.3.1.2 may be ambiguous. The first sentence might be clearer if expressed as: If the signal declaration includes the assignment symbol followed by an expression, the expression must be of the same type as the signal. VASG-ISAC Analysis & Rationale ------------------------------ TBD VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- TBD VASG-ISAC Recommendation for Future Revisions --------------------------------------------- TBD