VHDL Issue Number: 2008 Language_Version: VHDL-93 Classification: Language Definition Problem Summary: Source value of undriven, non-sourced INOUT, OUT or BUFFER port Relevant_LRM_Sections: 4.3.1.2, 12.6.2 Related_Issues: Key_Words_and_Phrases: source, port, INOUT, OUT, BUFFER Authors_Name: Stephen Bailey Authors_Phone_Number: 303-588-2001 Authors_Fax_Number: 303-652-1578 Authors_Email_Address: stephen@srbailey.com Authors_Affiliation: Synopsys Inc. Authors_Address1: 6664 Cherokee Ct. Authors_Address2: Niwot, CO 80503 Authors_Address3: Current Status: Analyzed Superseded By: ------------------------ Date Submitted: 1 November 2000 Date Analyzed: 29-Oct-04 Author of Analysis: Peter Ashenden Revision Number: 2 Date Last Revised: 24-Nov-04 Description of Problem ---------------------- Take the following example: entity foo is port ( IO : inout std_logic; O : out std_logic ); end entity foo; architecture A of foo is begin O <= not IO; end architecture A; entity top is end top; architecture A of top is signal IO_actual, O_actual : std_logic; begin UUT : work.foo(A) port map (IO_actual, O_actual); IO_actual <= '1', '0' after 100 ns; end architecture A; The LRM states in section 4.3.1.2 that the INOUT port IO creates a source for IO_actual. But, there is no driver defined for IO within FOO(A). The LRM also states in 12.6.2 that: "If S is a resolved signal and has one or more sources, then the driving values of the sources of S are examined. ... [T]he driving value of S is obtained by executing the resolution function associated with S, where that function is called with an input parameter consisting of the concatenation of the driving values of the sources of S...." My question is, where does the LRM define what the *driving value* of O is and, therefore, what value IO contributes as a source for the resolution and computation of the effective value of IO_actual? All implementations that I'm aware of, except for 1, applies the default initial value ('U' in this case) as the source value of IO. The exception implements this situation as IO contributing no value to the resolution of IO_actual. Therefore, in all but the exceptional case, IO_actual remains 'U' during simulation. In the exceptional case, IO_actual toggles as though it has only one driver/one source. Proposed Resolution ------------------- I believe the intent of the LRM is that the source value of a port in this case is the initial value of the port. What is missing from the LRM is a statement in section 12.6.2 that the source value of an INOUT, OUT or BUFFER mode port that has no drivers and no sources is the initial value of the port. Alternatively, a note covering this situation might be sufficient and probably belongs in section 12.6.2 VASG-ISAC Analysis & Rationale ------------------------------ The submitter poses the question, "where does the LRM define what the *driving value* of O is, ..." and then proceeds to ask about the value contributed by IO. This analysis assumes that the submitter intended to ask about the driving value of IO, not of O, since the O is driven by the concurrent signal assignment within architecture A. 12.6.2, on page 173, specifies how the driving value is determined for basic signals. The first list item is: -- If S has no source, then the driving value of S is given by the default value associated with S (see 4.3.1.2). Since the port IO in the submitter's example is a basic signal with no source, its driving value is determined in this manner. The default value for a port is specified in 4.3.2, page 64: In an interface signal declaration appearing in a port list, the default expression defines the default value(s) associated with the interface signal or its subelements. In the absence of a default expression, an implicit default value is assumed for the signal or for each scalar subelement, as defined for signal declarations (see 4.3.1.2). The value, whether implicitly or explicitly provided, is used to determine the initial contents of drivers, if any, of the interface signal as specified for signal declarations. Thus, in the submitter's example, the default value for IO is 'U', and this is the driving value of IO. VASG-ISAC Recommendation for IEEE Std 1076-2002 ----------------------------------------------- No change. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Add a Note to the Note list in 4.3.2, page 65: 5----The driving value of a port that has no source is the default value of the port (see 12.6.2). Add a Note to the Note list in 12.6.2, page 175: 9--The driving value of a port that has no source is the default value of the port (see 4.3.2). -------------END OF IR----------------