VHDL Issue Number: 0143 Classification: Language Enhancement Language Version: VHDL-87 Summary: Allow case-statement 'coverage' checking to be done whenever possible by the analyzer. Related Issues: ? Relevant LRM Sections: 8.8 Key Words and Phrases: Case-statement Current Status: Submitted 1076-1993 Disposition: Closed (All Issues Completely Addressed) Disposition Rationale: Section 8.8 revized to list what kind of expression is allowed. See the 5 bullet items. Superseded By: N/A ----------------------- Date Submitted: 1989/06/21 Author of Submission: Ken Scott Author's Affiliation: Vantage Analysis Systems, Inc. Author's Post Address: 42840 Christy St., Suite 201 Fremont, CA 94538 Author's Phone Number: (415) 659-0901 Author's Fax Number: Author's Net Address: N/A ----------------------- Date Analyzed: TBD Author of Analysis: TBD Revision Number: $Revision: 1.7 $ Date Last Revised: $Date: 1995/05/13 21:53:48 $ Description of Problem ---------------------- The third paragraph of section 8.7 requires that checking for case-statement coverage be done in the following two cases: o If the expression is the name of an object whose subtype is locally static; o If the expression is a qualified expression or type conversion whose type mark denotes a locally static subtype. Examine the following VHDL: p: process -- Define a function which returns a locally static subtype. function F return BIT is begin return '1'; end; begin case F is when '0' => -- Do something; -- Missing a case for '1' end case; end process p; According to a strict reading of the LRM, this VHDL should be legal. Yet it is obvious that the case statement does not have choices for each and every possible value that can be returned from the function F. In order to enable this checking you need to qualify the function call F with the type BIT: case BIT'(F) is ... which is ludicrous. Proposed Resolution ------------------- Expand the case-statement checking to cover not only objects but any expression which results in a value of a locally static subtype. VASG-ISAC Analysis & Rationale ------------------------------ VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- VASG-ISAC Recommendation for Future Revisions ---------------------------------------------