VHDL Issue Number: 1024 Classification: Language Definition Problem Language Version: VHDL-87 Summary: VPI Issue 20 -- Primary units with same name Related Issues: 0180, 0196 Relevant LRM Sections: 11.1, 11.4 Key Words and Phrases: primary unit, analysis order Current Status: Analyzed 1076-1993 Disposition: N/A Disposition Rationale: N/A Superseded By: N/A ----------------------- 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: 1991/11/19 Author of Analysis: Stephen Bailey Revision Number: $Revision: 1.1 $ Date Last Revised: $Date: 1995/07/26 22:30:52 $ Description of Problem ---------------------- (This supersedes IR 0196.) Can the name of a primary unit be used as the name of another primary unit in a same file? Test File: ch11/s01/03030101.vhd This test was classified as an "expect failure" test because the test point (110100_030301) was interpreted as each pri- mary unit must have a unique name. However, the test point doesn't explicitly specify that each primary unit must have a unique name. This should be clarified by the VASG commit- tee. -- ##B10033114G8FF******************************************************** -- --+ File: [SUITE.CH11.S01]03030101.vhd -- --+ Copyright: (c) 1989 by Virginia Tech. All rights reserved. -- --+ LRM_Version: IEEE Std. 1076-1987 -- --+ Subsets: All -- --+ Description: -- --+ Test_point - (110100_030301) "Each primary unit in a given library must ha -- a simple name that is unique within the given library." -- --+ Test_objective (1) - Test that an error is reported when the name of a -- primary unit is not unique within the given library. In this test two -- design units with the same simple name have been created. When analyzed -- both the primary units with the same simple name are placed in the design -- library. It is illegal to have two such units in the same design library. -- --+ References: None -- --+ Instructions: None -- --+ Keywords: primary unit, library. simple name -- --+ Test_Results: Expect_Failure. Output_Checked. Approximate error message: -- "Primary units within a design library must not have the same simple name" -- --+ Test_Type: Dynamic Semantic -- --+ History: Created KSC/VTech 4-25-90 -- --+ Comments: None -- --**************************************************************************** package PP is end PP; entity PP is --- Failure_here end PP; architecture behav of PP is begin end ; Proposed Resolution ------------------- TBD VASG-ISAC Analysis & Rationale ------------------------------ The submittor is correct that the LRM states, "Each primary unit in a given library must have a simple name that is unique within the given library ...." (LRM 11.1) However, all the LRM states in regards to reanalysis of a library unit is, "If a libary unit is changed (e.g., by reanalysis of the corresponding design unit), then all library units that are potentially affected by such a change become obsolete ...." (LRM 11.4) A library unit is the library representation of a design unit: "Analysis of a design unit defines the corresponding library unit in a design library." (LRM 11.1) Design units are "[c]ertain constructs" which "may be independently analyzed and inserted into a design library." (LRM 11.1) Finally, a primary unit is a library unit. (LRM 11.1) Since a primary unit must be unique by simple name only, then it is not an error to analyze a primary unit that is a different construct than an existing primary unit (in the library) with the same name. The affect of such an analysis is to replace the existing primary unit with the same simple name as the primary unit being analyzed into the library. VASG-ISAC Recommendation for IEEE Std 1076-1993 ----------------------------------------------- The analysis of a primary unit with the same simple name, but of different construct as an existing primary unit, is not an error. The result is the replacement of the existing primary unit with the more recently analyzed primary unit of the same name. (Construct refers to the set of VHDL language constructs that are legal for primary units -- entity_declaration, configuration_ declaration and package_declaration.) VASG-ISAC Recommendation for Future Revisions --------------------------------------------- The recommendation above could be included in future versions of the LRM.