
C.1 Discipline resolution
Discipline resolution is described in 8.4; it provides the semantics for two methods of resolving the discipline of undeclared interconnect. This annex provides a possible algorithm for achieving the semantics of each method. It is also possible to develop and use other algorithms to match the semantics.
C.2 Resolution of mixed signals
The following algorithms for discipline resolution of undeclared nets provide users with the ability to control the auto-insertion of connection modules. The undeclared nets are resolved at each level of the hierarchy in which continuous (analog) has precedence over discrete (digital). In both algorithms, the continuous domain is passed up the hierarchy from lower levels to the top level.
C.2.1 Default discipline resolution algorithm
This default algorithm propagates both continuous and discrete disciplines up the hierarchy to meet one another. Insertion of interface elements shall occur at each level of the hierarchy where both continuous and discrete disciplines meet. This results in connection modules being inserted higher up the design hierarchy. The algorithm is described as follows.
1. Elaborate the design
After this step, every port in the design has both its upper (actual) connection and its lower (formal) connection defined.
2. Apply all in-context node and signal declarations
For example, electrical sig; makes all instances of sig electrical, unless they have been overridden by an out-of-context declaration.
3. Apply all out-of-context node and signal declarations.
For example, electrical top.middle.bottom.sig; overrides any discipline which may be declared for sig in the module where sig was declared.
More than one conflicting in-context discipline declaration or more than one conflicting out-of-context discipline declaration for the same hierarchical segment of a signal is an error. In this case, conflicting simply means an attempt to declare more than one discipline regardless of whether the disciplines are compatible or not.
4. Traverse each signal hierarchically (depth-first) when a net is encountered which still has not been assigned a discipline:
A. It shall be determined whether the net is analog or digital. Any net whose port connections (i.e., connections to the upper part of a port) are all digital shall be considered digital (discrete domain), any others shall be considered analog (continuous domain).
B. Apply any `default_discipline directives to any net segments which do not yet have a discipline, provided their domain is the same as the domain of the default discipline. This is done according to the rules of precedence for `default_discipline (see 3.7).
C. If the segment has not yet been assigned a discipline, examine all ports to which the segment forms the upper connection and construct a list of all disciplines at the lower connections of these ports whose domains match the domain of the segment:
· If there is only a single discipline in the list, the signal is of that discipline
· If there is more than one discipline in the list and the contents of the list match the discipline list of a resolution connect statement, the net is of the resolved discipline given by the statement.
· Otherwise the discipline is unknown. This is legal provided the net segment has no mixed port connections (i.e., it does not connect through a port to a segment of a different domain). Otherwise this is an error.
At this point, connection module selection and insertion can be performed. Insert converters applying the rules and semantics of the connect statement (8.7) and auto-insertion sections (8.8).
C.2.2 Alternate expanded analog discipline resolution algorithm
This algorithm propagates continuous disciplines up and then back down to meet discrete disciplines. This may result in more connection modules being inserted lower down into discrete sections of the design hierarchy for added accuracy. The selection of this algorithm instead of the default shall be controlled by a simulator option. The algorithm is described as follows.
1. Elaborate the design
After this step, every port in the design has both its upper (actual) connection and its lower (formal) connection defined.
2. Apply all in-context node and signal declarations
For example, electrical sig; makes all instances of sig electrical, unless they have been overridden by an out-of-context declaration.
3. Apply all out-of-context node and signal declarations.
For example, electrical top.middle.bottom.sig; overrides any discipline which may be declared for sig in the module where sig was declared.
More than one conflicting in-context discipline declaration or more than one conflicting out-of-context discipline declaration for the same hierarchical segment of a signal is an error. In this case, conflicting simply means an attempt to declare more than one discipline regardless of whether the disciplines are compatible or not.
4. Traverse each signal hierarchically (depth-first) when a net is encountered which has still not been assigned a discipline:
A. It shall be determined whether the net is analog or digital. Any net whose port connections (i.e., connections to the upper part of a port) are all digital shall be considered digital. If any of the connections are analog, the net shall be considered analog. Any others shall still be considered unknown.
B. Apply any `default_discipline directives to any net segments which do not yet have a discipline, provided their domain is the same as the domain of the default discipline. This is done according to the rules of precedence for `default_discipline (see 3.7).
C. If the segment has not yet been assigned a discipline, examine all ports to which the segment forms the upper or lower connection. and construct a list of all disciplines at the other connections of these ports whose domains match the domain of the segment:
· If there is only a single discipline in the list, the signal is of that discipline
· If there is more than one discipline in the list and the contents of the list match the discipline list of a resolution connect statement, the net is of the resolved discipline given by the statement.
· Otherwise the discipline is unknown.
5. Traverse each net hierarchically (top-down) when a net is encountered which still has not been assigned a discipline:
A. It shall be determined whether the net is analog or digital. Any net whose port (i.e., connection to the lower part of a port) is digital shall be considered digital. Any others shall be considered analog.
B. Apply any `default_discipline directives which to any net segments which do not yet have a discipline, provided their domain is the same as the domain of the default discipline. This is done according to the rules of precedence for `default_discipline (see 3.7).
C. If the segment has not yet been assigned a discipline, examine all ports to which the segment forms the lower connection and construct a list of all disciplines at the upper connections of these ports whose domains match the domain of the segment:
· If there is only a single discipline in the list, the signal is of that discipline
· If there is more than one discipline in the list and the contents of the list match the discipline list of a resolution connect statement, the net is of the resolved discipline given by the statement.
· Otherwise the discipline is unknown. This is legal provided the net segment has no mixed port connections (i.e., it does not connect through a port to a segment of a different domain). Otherwise this is an error.
At this point, connection module selection and insertion can be performed. Insert converters applying the rules and semantics of the connect statement (8.7) and auto-insertion sections (8.8).
|
Quadralay Corporation http://www.webworks.com Voice: (512) 719-3399 Fax: (512) 719-3606 sales@webworks.com |