Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

oagFpga::OccGraph Class Reference

Object for manipulating graphs in the occurrence domain view. More...

#include <oagFpgaOccGraph.h>

List of all members.

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< OccRefCut
typedef list< CutCutSet

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.


Detailed Description

Object for manipulating graphs in the occurrence domain view.

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.


Member Typedef Documentation

typedef set<OccRef> oagFpga::OccGraph::Cut
 

Definition at line 57 of file oagFpgaOccGraph.h.

typedef list<Cut> oagFpga::OccGraph::CutSet
 

Definition at line 58 of file oagFpgaOccGraph.h.


Member Function Documentation

OccRef oagFpga::OccGraph::constantOne oa::oaOccurrence *  occurrence  )  [inline, static]
 

Tests a reference to see if it is null.

Parameters:
occurrence 
Returns:
a reference to a function that is always true

Definition at line 79 of file oagFpgaOccGraph.h.

OccRef oagFpga::OccGraph::constantZero oa::oaOccurrence *  occurrence  )  [inline, static]
 

Returns a reference in the given occurrence to the function that is always true.

Parameters:
occurrence 
Returns:
a reference to a function that is always false

Definition at line 85 of file oagFpgaOccGraph.h.

void oagFpga::OccGraph::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
[static]
 

Returns the set of nets and refs that are logically connected.

Parameters:
x 
connectedNets the resulting list of connected nets
connectedRefs the resulting list of connected refs
searchForwardThroughGraph follow TERMINAL fan-out to functionally identical refs
searchBackwardThroughGraph follow TERMINAL drivers to functionally identical refs
searchThroughHierarchy traverse OpenAccess object hierarchy
searchThroughEquivNets search all nets that are marked equivalent in the database
searchThroughEquivRefs follow all Refs that are marked equivalent in the graph
includeSelf include the starting node

Definition at line 684 of file oagFpgaOccGraph.cpp.

References getAllConnections(), getFanout(), getTerminalDriver(), isNull(), and isTerminal().

void oagFpga::OccGraph::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
[static]
 

Returns the set of nets and refs that are logically connected.

Parameters:
net 
connectedNets the resulting list of connected nets
connectedRefs the resulting list of connected refs
searchForwardThroughGraph follow TERMINAL fan-out to functionally identical refs
searchBackwardThroughGraph follow TERMINAL drivers to functionally identical refs
searchThroughHierarchy traverse OpenAccess object hierarchy
searchThroughEquivNets search all nets that are marked equivalent in the database
searchThroughEquivRefs follow all Refs that are marked equivalent in the graph
includeSelf include the starting node

Definition at line 532 of file oagFpgaOccGraph.cpp.

References DEBUG_PRINTLN, and oagFpga::toBitNet().

Referenced by getAllConnections().

void oagFpga::OccGraph::getConstants oa::oaOccurrence *  occurrence,
list< OccRef > &  zeros,
list< OccRef > &  ones
[static]
 

Gets all constant 0 refs in the hierarchy.

Parameters:
occurrence 
zeros constant zeros
ones constant ones

Definition at line 408 of file oagFpgaOccGraph.cpp.

References isNull().

void oagFpga::OccGraph::getFanout OccRef  x,
list< OccRef > &  result
[static]
 

Returns the fan-out of a node that lies within the same occurrence.

An error is generated if fanout is not being maintained.

Parameters:
x 
result the fanout list

Definition at line 82 of file oagFpgaOccGraph.cpp.

References oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref.

Referenced by getAllConnections().

void oagFpga::OccGraph::getInputs oa::oaOccurrence *  top,
list< oa::oaOccBitNet * > &  result
[static]
 

Gets all input nets inside an occurrence.

An input net is a net that is connected to an input oaTerm.

Parameters:
top the occurrence
result the list of all input nets inside the occurrence

Definition at line 385 of file oagFpgaOccGraph.cpp.

References oagFpga::toBitNet().

void oagFpga::OccGraph::getInputs oa::oaOccurrence *  top,
list< OccRef > &  result
[static]
 

Gets all input terminals inside an occurrence.

An input terminal is a TERMINAL node that is connected to an input oaTerm.

Parameters:
top the occurrence
result the list of all input terminals inside the occurrence

Definition at line 360 of file oagFpgaOccGraph.cpp.

References oagFpga::ModRef::ref, and oagFpga::toBitNet().

void oagFpga::OccGraph::getLocalStates oa::oaOccurrence *  occurrence,
list< OccRef > &  result
[static]
 

Gets all state bits inside this occurrence.

Parameters:
occurrence 
result the list of all state bits inside the occurrence

Definition at line 505 of file oagFpgaOccGraph.cpp.

void oagFpga::OccGraph::getNetToBBAllEquivConnections OccRef  ref,
list< oa::oaOccBitNet * > &  result
[static]
 

OccRef oagFpga::OccGraph::getNetToBBConnection oa::oaOccBitNet *  net  )  [static]
 

oa::oaOccBitNet * oagFpga::OccGraph::getNetToBBConnection OccRef  x  )  [static]
 

Returns the OpenAccess net connected to a given graph TERMINAL.

Parameters:
x 
Returns:
the occurrence net, or NULL if there is none

Definition at line 243 of file oagFpgaOccGraph.cpp.

References oagFpga::Manager::getNetToBBConnection(), oagFpga::OccNetIter, oagFpga::OccRef::occurrence, oagFpga::OccRef::ref, and oagFpga::toBitNet().

OccRef oagFpga::OccGraph::getNextState OccRef  sequential  )  [inline, static]
 

Tests if a reference is to a TERMINAL node.

If the reference is not to a SEQUENTIAL node, an error will be generated.

Parameters:
sequential 
Returns:
the reference to the next state, or null if none exists

Definition at line 136 of file oagFpgaOccGraph.h.

References oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref.

RtlNode::Type oagFpga::OccGraph::getNodeType OccRef  x  )  [inline, static]
 

Parameters:
x an Ref
Returns:
the type of the referenced node

Definition at line 119 of file oagFpgaOccGraph.h.

References oagFpga::OccRef::ref.

OccRef oagFpga::OccGraph::getNull oa::oaOccurrence *  occurrence  )  [inline, static]
 

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.

Parameters:
occurrence 
Returns:
a null reference inside the given module

Definition at line 63 of file oagFpgaOccGraph.h.

void oagFpga::OccGraph::getOutputs oa::oaOccurrence *  top,
list< oa::oaOccBitNet * > &  result
[static]
 

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.

Parameters:
top the occurrence
result the list of all output nets inside the occurrence

Definition at line 336 of file oagFpgaOccGraph.cpp.

References oagFpga::toBitNet().

void oagFpga::OccGraph::getOutputs oa::oaOccurrence *  top,
list< OccRef > &  result
[static]
 

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.

Parameters:
top the occurrence
result the list of all output terminals inside the occurrence

Definition at line 308 of file oagFpgaOccGraph.cpp.

References oagFpga::ModRef::ref, and oagFpga::toBitNet().

void oagFpga::OccGraph::getStates oa::oaOccurrence *  occurrence,
list< OccRef > &  result
[static]
 

Gets all state bits inside this occurrence and its subinstances.

Parameters:
occurrence 
result the list of all state bits inside the occurrence

Definition at line 463 of file oagFpgaOccGraph.cpp.

OccRef oagFpga::OccGraph::getTerminalDriver OccRef  terminal,
bool  searchHierarchy = false
[static]
 

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.

Parameters:
terminal 
searchHierarchy 
Returns:
the reference to the driver, or null if none exists

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().

void oagFpga::OccGraph::getTransitiveFanin OccRef  x,
list< OccRef > &  transitiveFanin
[static]
 

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.

Parameters:
x 
transitiveFanin the resulting list of nodes in the transitive fan-in

Definition at line 102 of file oagFpgaOccGraph.cpp.

References oagFpga::RtlGraph::getTransitiveFanin(), oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref.

void oagFpga::OccGraph::getTransitiveFanout OccRef  x,
list< OccRef > &  transitiveFanout
[static]
 

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.

Parameters:
x 
transitiveFanout the resulting list of nodes in the transitive fan-out

Definition at line 125 of file oagFpgaOccGraph.cpp.

References oagFpga::RtlGraph::getTransitiveFanout(), oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref.

bool oagFpga::OccGraph::hasFanout OccRef  x  )  [inline, static]
 

An error is generated if fanout is not being maintained.

Parameters:
x 
Returns:
true, if the node has any fanout, false otherwise

Definition at line 178 of file oagFpgaOccGraph.h.

References oagFpga::OccRef::ref.

bool oagFpga::OccGraph::isNull OccRef  x  )  [inline, static]
 

Returns a null reference inside the given occurrence.

Parameters:
x an Ref
Returns:
true, if the reference is to a null function

Definition at line 73 of file oagFpgaOccGraph.h.

References oagFpga::OccRef::occurrence, and oagFpga::OccRef::ref.

Referenced by getAllConnections(), and getConstants().

bool oagFpga::OccGraph::isSequential OccRef  sequential  )  [inline, static]
 

Returns the next state input of a SEQUENTIAL node.

Parameters:
sequential 
Returns:
true, if the reference is to a SEQUENTIAL node

Definition at line 146 of file oagFpgaOccGraph.h.

References oagFpga::OccRef::ref.

bool oagFpga::OccGraph::isTerminal OccRef  terminal  )  [inline, static]
 

Parameters:
terminal 
Returns:
true, if the reference is to a TERMINAL node

Definition at line 129 of file oagFpgaOccGraph.h.

References oagFpga::OccRef::ref.

Referenced by getAllConnections(), and getTerminalDriver().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 14:17:22 2007 for OA Gear Fpga by  doxygen 1.3.9.1