VHDL Issue Number: 0052 Classification Language Definition Problem Language Version: VHDL-87 Summary: What is the value of a non-static Entity Attribute. Related Issues: None. Relevant LRM Sections: 5.1 Key Words and Phrases: User Defined Attributes, Entity, Staticness Current Status: ISAC-Approved 1076-1993 Disposition: Closed (All Issues Completely Addressed) Disposition Rationale: VHDL-93 LRM was revised. Superseded By: N/A ----------------------- Date Submitted: 1990/07/26 Author of Submission: Clive R. Charlwood Author's Affiliation: Synopsys Inc. Author's Post Address: 1098 Alta Ave. Mountain View, CA 94043 Author's Phone Number: (415) 962 5425 Author's Fax Number: Author's Net Address: crc@synopsys.com ----------------------- Date Analyzed: 1990/07/26 Author of Analysis: Clive R. Charlwood Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/08/03 00:33:05 $ Description of Problem ---------------------- Examine the following VHDL: package P is attribute AT: integer; end p; ---------------------- use WORK.P.AT; entity E1 is generic(G: integer := 4); attribute AT of E1: entity is g; end; architecture A1 of E1 is begin end; ---------------------- entity E is end; architecture A of E is component C generic(g:integer); end component; for all : C use entity WORK.E1(A1); begin C1: C generic map (g => 45); C2: C generic map (g => 123); P: process variable V: integer; begin V := WORK.E1'AT; -- What is the value of WORK.E1'AT? wait; end process; end; There is a problem here. What is the value of the attribute AT? Is it dependent on how the entity is instanced? What is the value if the entity is never instanced? Or if it is instanced more than once with different values for the generic G? VASG-ISAC Analysis & Rationale ------------------------------ There appear to be two problems here. 1. What is the value of the attribute if the entity is instanced more than once? 2. What is the value of the attribute if the entity is not instanced? (Since the entity is strictly speaking not "part of the design", is the attribute accessible?) The area of static value propagation at elaboration time needs to be studied in some detail. However, the first problem is easily fixed by assuming that attributes of an entity must be locally static. The second problem is more difficult. It requires further study. VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- Assume, that attributes of an entity must be locally static. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- The following areas need further study: 1. Static value propagation at elaboration time. 2. The visibility of an entity attribute outside of the entity.