VHDL Issue Number: 2020 Language_Version: VHDL-2002 Classification: Language Definition Problem Summary: keyword REPORT is over-used Relevant_LRM_Sections: 8.2 Assertion statement 8.3 Report statement Related_Issues: Changes to the LRM such as making a final ; optional in port and generic declarations makes me nervous. I'm afraid of unexpected consequences. Key_Words_and_Phrases: assert, report, ; Authors_Name: Paul Butler Authors_Phone_Number: 512 683 8743 Authors_Fax_Number: Authors_Email_Address: Paul.Butler@ni.com Authors_Affiliation: National Instruments Authors_Address1: 11500 N. MoPac Authors_Address2: Austin, TX 78759 Authors_Address3: Current Status: VASG-Approved Superseded By: ------------------------ Date Submitted: 20 February 2003 Date Analyzed: 1-Nov-04 Author of Analysis: Peter Ashenden Revision Number: 4 Date Last Revised: 11 November 2005 Description of Problem ---------------------- In 1076-1987, the following VHDL would not compile. In 1076-1993, it produces unexpected results: assert true; report "failure detected" severity error; Because report is both an optional word in an assertion statement and the first word in a report statement, the above code must compile with or without the semicolon following the assertion expression. Extra semicolons, especially at a natural end-of-line, are a common typing mistake. Proposed Resolution ------------------- While the report statement is handy, it enables a simple typo like the one above to wreak debugging havoc. The typical complaint from local engineers starts something like, "Modelsim claims that 5 < 2!" when, in fact, the writer has accidentally created an assertion that passes followed by a report statement! In the future, please watch out for LRM enhancements that enable typos to compile without warning but result in undesirable behavior. VASG-ISAC Analysis & Rationale ------------------------------ The submitter is correct in identifying poor syntax design. However, to change the syntax to avoid the problem would not be backward compatible. Hence, we must live with the poor design for the report statement. Reviewers of future changes should be aware of the importance of good syntax design. Issues such as this can be avoided by more extensive prototyping and validation of proposed language changes before they are set in stone in a revision of the LRM. Where resources permit, such validation should be done. VASG-ISAC Recommendation for IEEE Std 1076-2002 ----------------------------------------------- No change. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Add a note to clause 8.2 Assertion Statement which reads something like: Note: If a semicolon is inadvertently placed between the assert condition and the REPORT keyword in an assertion statement then no error will be detected. Instead, the intended assertion will be interpreted as an assertion statement with no report expression or severity expression, followed by a report statement. -------------END OF IR----------------