#include <oagFpgaOccGraph.h>
Advanced graph traversal | |
void | getTransitiveFanin (OccRef x, list< OccRef > &transitiveFanin) |
Returns the transitive fan-in of a node that lies within the same occurrence. | |
void | getTransitiveFanout (OccRef x, list< OccRef > &transitiveFanout) |
Returns the transitive fan-out of a node that lies within the same occurrence. | |
Public Types | |
typedef set< OccRef > | Cut |
typedef list< Cut > | CutSet |
Static Public Member Functions | |
Functional operations | |
OccRef | getNull (oa::oaOccurrence *occurrence) |
bool | isNull (OccRef x) |
Returns a null reference inside the given occurrence. | |
OccRef | constantOne (oa::oaOccurrence *occurrence) |
Tests a reference to see if it is null. | |
OccRef | constantZero (oa::oaOccurrence *occurrence) |
Returns a reference in the given occurrence to the function that is always true. | |
Intra-module incremental graph traversal | |
Returns a reference in the given occurrence to the function that is always false. | |
RtlNode::Type | getNodeType (OccRef x) |
OccRef | getTerminalDriver (OccRef terminal, bool searchThroughHierarchy=false) |
Returns the driver of a TERMINAL node. | |
bool | isTerminal (OccRef terminal) |
OccRef | getNextState (OccRef sequential) |
Tests if a reference is to a TERMINAL node. | |
bool | isSequential (OccRef sequential) |
Returns the next state input of a SEQUENTIAL node. | |
void | getFanout (OccRef x, list< OccRef > &result) |
Returns the fan-out of a node that lies within the same occurrence. | |
bool | hasFanout (OccRef x) |
Explicitly managing graph-to-net connections | |
Returns the fanout of a node. | |
oa::oaOccBitNet * | getNetToBBConnection (OccRef ref) |
Returns the OpenAccess net connected to a given graph TERMINAL. | |
OccRef | getNetToBBConnection (oa::oaOccBitNet *net) |
void | getNetToBBAllEquivConnections (OccRef ref, list< oa::oaOccBitNet * > &result) |
Global graph queries | |
void | getOutputs (oa::oaOccurrence *top, list< OccRef > &result) |
Gets all output terminals inside an occurrence. | |
void | getOutputs (oa::oaOccurrence *top, list< oa::oaOccBitNet * > &result) |
Gets all output nets inside an occurrence. | |
void | getInputs (oa::oaOccurrence *top, list< OccRef > &result) |
Gets all input terminals inside an occurrence. | |
void | getInputs (oa::oaOccurrence *top, list< oa::oaOccBitNet * > &result) |
Gets all input nets inside an occurrence. | |
void | getStates (oa::oaOccurrence *top, list< OccRef > &result) |
Gets all state bits inside this occurrence and its subinstances. | |
void | getLocalStates (oa::oaOccurrence *top, list< OccRef > &result) |
Gets all state bits inside this occurrence. | |
void | getConstants (oa::oaOccurrence *top, list< OccRef > &zeros, list< OccRef > &ones) |
Gets all constant 0 refs in the hierarchy. | |
void | getAllConnections (oa::oaOccBitNet *net, set< oa::oaOccBitNet * > &connectedNets, set< OccRef > &connectedRefs, bool searchForwardThroughGraph=true, bool searchBackwardThroughGraph=true, bool searchThroughHierarchy=true, bool searchThroughEquivNets=true, bool searchThroughEquivRefs=false, bool includeSelf=true) |
Returns the set of nets and refs that are logically connected. | |
void | getAllConnections (OccRef x, set< oa::oaOccBitNet * > &connectedNets, set< OccRef > &connectedRefs, bool searchForwardThroughGraph=true, bool searchBackwardThroughGraph=true, bool searchThroughHierarchy=true, bool searchThroughEquivNets=true, bool searchThroughEquivRefs=false, bool includeSelf=true) |
Returns the set of nets and refs that are logically connected. |
The OccGraph class is not a data structure on its own, but instead provides an interface for manipulating functionality graphs in the unfolded occurrence domain view. All methods in the OccGraph class are static. The OccRef structure provides the mechanism for referring to graph nodes within this view, and most OccGraph methods operate on OccRefs.
The occurrence view is appropriate for working with the global functionality of hierarchical designs. Two different instantiations (occurrences) may implement the same local behavior, but the global functions being implemented on each of their pins depends on their connectivity and context in the larger design. To manipulate global functionality, it does not suffice to traverse the folded (module) design view; the unfolded (occurrence) hierarchy is better suited.
The occurrence view is not appropriate for making modifications to the local functional descriptions of design objects. There aren't any methods in the OccGraph class to modify graphs from within the occurrence view. Any changes must be made to the module (using the ModGraph interface) and thereby all occurrences of the module. If a change is to be made to only this particular instance (e.g. an observability-don't-care simplification), it should be uniquified (via oagFpga::uniqify) into its own module, and the changes made on that unique module.
Definition at line 48 of file oagFpgaOccGraph.h.
|
Definition at line 57 of file oagFpgaOccGraph.h. |
|
Definition at line 58 of file oagFpgaOccGraph.h. |
|
Tests a reference to see if it is null.
Definition at line 79 of file oagFpgaOccGraph.h. |
|
Returns a reference in the given occurrence to the function that is always true.
Definition at line 85 of file oagFpgaOccGraph.h. |
|
Returns the set of nets and refs that are logically connected.
Definition at line 684 of file oagFpgaOccGraph.cpp. References getAllConnections(), getFanout(), getTerminalDriver(), isNull(), and isTerminal(). |
|
Returns the set of nets and refs that are logically connected.
Definition at line 532 of file oagFpgaOccGraph.cpp. References DEBUG_PRINTLN, and oagFpga::toBitNet(). Referenced by getAllConnections(). |
|
Gets all constant 0 refs in the hierarchy.
Definition at line 408 of file oagFpgaOccGraph.cpp. References isNull(). |
|
Returns the fan-out of a node that lies within the same occurrence. An error is generated if fanout is not being maintained.
Definition at line 82 of file oagFpgaOccGraph.cpp. References oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref. Referenced by getAllConnections(). |
|
Gets all input nets inside an occurrence. An input net is a net that is connected to an input oaTerm.
Definition at line 385 of file oagFpgaOccGraph.cpp. References oagFpga::toBitNet(). |
|
Gets all input terminals inside an occurrence. An input terminal is a TERMINAL node that is connected to an input oaTerm.
Definition at line 360 of file oagFpgaOccGraph.cpp. References oagFpga::ModRef::ref, and oagFpga::toBitNet(). |
|
Gets all state bits inside this occurrence.
Definition at line 505 of file oagFpgaOccGraph.cpp. |
|
|
|
|
|
Returns the OpenAccess net connected to a given graph TERMINAL.
Definition at line 243 of file oagFpgaOccGraph.cpp. References oagFpga::Manager::getNetToBBConnection(), oagFpga::OccNetIter, oagFpga::OccRef::occurrence, oagFpga::OccRef::ref, and oagFpga::toBitNet(). |
|
Tests if a reference is to a TERMINAL node. If the reference is not to a SEQUENTIAL node, an error will be generated.
Definition at line 136 of file oagFpgaOccGraph.h. References oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref. |
|
Definition at line 119 of file oagFpgaOccGraph.h. References oagFpga::OccRef::ref. |
|
There is a no global OccGraph null reference; one unique null reference exists for each occurrence. This function returns the unique null reference for the given occurrence.
Definition at line 63 of file oagFpgaOccGraph.h. |
|
Gets all output nets inside an occurrence. An output net is a net that is connected to an output oaTerm. If the bit net attached to the oaOccTerm does not have a connection to the graph, one is created in the corresponding module.
Definition at line 336 of file oagFpgaOccGraph.cpp. References oagFpga::toBitNet(). |
|
Gets all output terminals inside an occurrence. An output terminal is a TERMINAL node that is connected to an output oaOccTerm. If the bit net attached to the oaOccTerm does not have a connection to the graph, one is created in the corresponding module.
Definition at line 308 of file oagFpgaOccGraph.cpp. References oagFpga::ModRef::ref, and oagFpga::toBitNet(). |
|
Gets all state bits inside this occurrence and its subinstances.
Definition at line 463 of file oagFpgaOccGraph.cpp. |
|
Returns the driver of a TERMINAL node. If searchHierarchy is false, this function only returns the graph reference that is driving this terminal. If the node is driven by a connected OpenAccess net, a null reference is returned. If the reference is not to a TERMINAL node, an error will be generated.
Definition at line 782 of file oagFpgaOccGraph.cpp. References oagFpga::RtlGraph::getTerminalDriver(), isTerminal(), oagFpga::OccRef::occurrence, QUIT_ON_ERROR, and oagFpga::OccRef::ref. Referenced by getAllConnections(). |
|
Returns the transitive fan-in of a node that lies within the same occurrence. The transitive traversal is confined to the local occurrence. It does not follow OpenAccess structures outside of the graph. See RtlGraph::getTransitiveFanin for further details.
Definition at line 102 of file oagFpgaOccGraph.cpp. References oagFpga::RtlGraph::getTransitiveFanin(), oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref. |
|
Returns the transitive fan-out of a node that lies within the same occurrence. The transitive traversal is confined to the local occurrence. It does not follow OpenAccess structures outside of the graph. See RtlGraph::getTransitiveFanout for further details.
Definition at line 125 of file oagFpgaOccGraph.cpp. References oagFpga::RtlGraph::getTransitiveFanout(), oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref. |
|
An error is generated if fanout is not being maintained.
Definition at line 178 of file oagFpgaOccGraph.h. References oagFpga::OccRef::ref. |
|
Returns a null reference inside the given occurrence.
Definition at line 73 of file oagFpgaOccGraph.h. References oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref. Referenced by getAllConnections(), and getConstants(). |
|
Returns the next state input of a SEQUENTIAL node.
Definition at line 146 of file oagFpgaOccGraph.h. References oagFpga::OccRef::ref. |
|
Definition at line 129 of file oagFpgaOccGraph.h. References oagFpga::OccRef::ref. Referenced by getAllConnections(), and getTerminalDriver(). |