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

oagFpga::Manager Class Reference

This class manages the functional description of a design. More...

#include <oagFpgaManager.h>

Collaboration diagram for oagFpga::Manager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Informational queries
bool isStructural ()
 Returns true if a design is entirely structural.
void print (ostream &os)
 Dumps information about the managed graph.
Maintaining links between OA objects and the AI graph
oa::oaModBitNet * getNetToBBConnection (BBRef ref)
 Returns the net connected to a graph reference.
BBRef getNetToBBConnection (oa::oaModBitNet *net)
 Returns the BB graph reference connected to this net.
void setNetToBBConnection (oa::oaModBitNet *net, BBRef bbRef)
 Connects a net to an Black Box graph reference.
void setNetToAiConnection (oa::oaModBitNet *net, oagAi::Ref aiRef)
 Connects a net to an Ai graph reference.
oa::oaModBitNet * getNetToAiConnection (oagAi::Ref ref)
 Returns the net connected to a graph reference.
oagAi::Ref getNetToAiConnection (oa::oaModBitNet *net)
 Returns the BB graph reference connected to this net.
void removeNetToAiConnection (oa::oaModBitNet *net)
 Disconnections a net from the Ai graph.
const oagAi::Graph * getAiGraph () const
oagAi::Graph * getAiGraph ()

Static Public Member Functions

bool hasManager (oa::oaDesign *design)
Managerget (oa::oaModule *module)
Managerget (oa::oaDesign *design)
Managercreate (oa::oaDesign *design)
 Returns the preexisting Manager for the given design or creates a new one.
void destroy (oa::oaDesign *design)
 Destroys a manager object and the functional description of a design.
Database operations
int getSerializedSize (oa::oaDesign *design)
 Computes the number of bytes necessary for the serialized representation.
void serialize (void *buf, oa::oaDesign *design)
 Serializes the functional description of a design.
int unserialize (void *buf, oa::oaDesign *design)
 Unserializes the functional description of a design.

Protected Member Functions

 Manager (oa::oaDesign *design)
 ~Manager ()
 Destructor for Manager object.
BBRef prepareNetToBBConnection (oa::oaModBitNet *net)
 Creates an terminal node to represent the function of a net.
BBRef prepareNetToAiConnection (oa::oaModBitNet *net)
 Creates an terminal node to represent the function of a net.

Protected Attributes

oagAi::Graph ai
 USE WITH CAUTION. Returns the oagAi::Graph associated with the design that this Manager controls. Modifying the structure of this graph (and in particular the TERMINAL nodes) could invalid the links to OpenAccess design objects and result in errors or incorrect behavior. The const version of getGraph() is safer. Use with extreme caution.
RtlGraph bbg
oa::oaDesign * design

Static Protected Attributes

oa::oaDesign * lastManagerDesign
ManagerlastManagerObject

Friends

class Synthesis
class ModGraph
class OccGraph
class AiModGraph
class ModuleCompiler

Detailed Description

This class manages the functional description of a design.

Definition at line 28 of file oagFpgaManager.h.


Constructor & Destructor Documentation

oagFpga::Manager::Manager oa::oaDesign *  design  )  [protected]
 

Constructs a Manager for the given design. If it already has a Manager, an error is generated.

All information about the function behavior of a design is stored and managed by this class. A Manager is required to describe any functional relationships between OpenAccess objects other than simple equivalence. Conversely, objects that are purely structural in nature (that is, do not have any complex behavior, other than simple connections) do not require a Manager.

Parameters:
design 

Definition at line 41 of file oagFpgaManager.cpp.

References hasManager(), and oagFpga::managerAppDef.

Referenced by create(), and unserialize().

oagFpga::Manager::~Manager  )  [protected]
 

Destructor for Manager object.

The Manager should only be deleted from a destroy() call.

Definition at line 188 of file oagFpgaManager.cpp.


Member Function Documentation

Manager * oagFpga::Manager::create oa::oaDesign *  design  )  [static]
 

Returns the preexisting Manager for the given design or creates a new one.

Definition at line 73 of file oagFpgaManager.cpp.

References ai, oagFpga::AiRefAppDef, bbg, oagFpga::bbRefAppDef, oagFpga::RtlGraph::constantOne(), oagFpga::RtlGraph::constantZero(), DEBUG_PRINTLN, hasManager(), Manager(), oagFpga::managerAppDef, prepareNetToAiConnection(), prepareNetToBBConnection(), and oagFpga::RtlGraph::setTerminalDriver().

void oagFpga::Manager::destroy oa::oaDesign *  design  )  [static]
 

Destroys a manager object and the functional description of a design.

Definition at line 151 of file oagFpgaManager.cpp.

References oagFpga::AiRefAppDef, oagFpga::bbRefAppDef, hasManager(), and oagFpga::managerAppDef.

Referenced by oagFpga::Synthesis::createModule().

Manager* oagFpga::Manager::get oa::oaDesign *  design  )  [inline, static]
 

Definition at line 51 of file oagFpgaManager.h.

References oagFpga::managerAppDef.

Manager* oagFpga::Manager::get oa::oaModule *  module  )  [inline, static]
 

Definition at line 48 of file oagFpgaManager.h.

Referenced by oagFpga::Synthesis::assignMultiRef(), oagFpga::ModuleCompiler::compileBBNode(), oagFpga::Synthesis::createModule(), and prepareNetToBBConnection().

oagAi::Graph* oagFpga::Manager::getAiGraph  )  [inline]
 

Definition at line 138 of file oagFpgaManager.h.

const oagAi::Graph* oagFpga::Manager::getAiGraph  )  const [inline]
 

Returns the oagAi::Graph associated with the design that this Manager controls.

Definition at line 134 of file oagFpgaManager.h.

oagAi::Ref oagFpga::Manager::getNetToAiConnection oa::oaModBitNet *  net  ) 
 

Returns the BB graph reference connected to this net.

A null BB graph reference is returned if this net is not connected to the graph.

Parameters:
net 
Returns:
the associated BB graph reference, or a null reference is there is none

Definition at line 654 of file oagFpgaManager.cpp.

References ai, oagFpga::AiRefAppDef, and oagFpga::RtlGraph::getNull().

oa::oaModBitNet * oagFpga::Manager::getNetToAiConnection oagAi::Ref  ref  ) 
 

Returns the net connected to a graph reference.

NULL is returned if this graph reference is not connected to any net.

Parameters:
ref a reference to an terminal node
Returns:
the associated net, or NULL if there is none

Definition at line 571 of file oagFpgaManager.cpp.

References ai, and oagFpga::RtlGraph::getExternalTerminalConnection().

Referenced by oagFpga::AiModGraph::getNetToAiConnection().

BBRef oagFpga::Manager::getNetToBBConnection oa::oaModBitNet *  net  ) 
 

Returns the BB graph reference connected to this net.

A null BB graph reference is returned if this net is not connected to the graph.

Parameters:
net 
Returns:
the associated BB graph reference, or a null reference is there is none

Definition at line 625 of file oagFpgaManager.cpp.

References bbg, oagFpga::BBRef, oagFpga::bbRefAppDef, oagFpga::RtlGraph::getNull(), oagFpga::RtlGraph::isNull(), and oagFpga::RtlGraph::isTerminal().

oa::oaModBitNet * oagFpga::Manager::getNetToBBConnection BBRef  ref  ) 
 

Returns the net connected to a graph reference.

NULL is returned if this graph reference is not connected to any net.

Parameters:
ref a reference to an terminal node
Returns:
the associated net, or NULL if there is none

Definition at line 544 of file oagFpgaManager.cpp.

References bbg, oagFpga::RtlGraph::getExternalTerminalConnection(), and oagFpga::RtlGraph::getNodeType().

Referenced by oagFpga::ModuleCompiler::compileBBNode(), oagFpga::OccGraph::getNetToBBConnection(), oagFpga::ModGraph::getNetToBBConnection(), and print().

int oagFpga::Manager::getSerializedSize oa::oaDesign *  design  )  [static]
 

Computes the number of bytes necessary for the serialized representation.

Returns:
the number of bytes

Definition at line 265 of file oagFpgaManager.cpp.

bool oagFpga::Manager::hasManager oa::oaDesign *  design  )  [inline, static]
 

Returns true if the given design has an associated Manager.

Definition at line 42 of file oagFpgaManager.h.

References oagFpga::managerAppDef.

Referenced by create(), oagFpga::Synthesis::createModule(), destroy(), and Manager().

bool oagFpga::Manager::isStructural  ) 
 

Returns true if a design is entirely structural.

A structural module involves only interconnections between components. There are no non-equivalence functional relationships between any nets in the module.

Returns:
true, if the module is structural

Definition at line 599 of file oagFpgaManager.cpp.

References bbg, design, and oagFpga::RtlGraph::getBBNodeNum().

BBRef oagFpga::Manager::prepareNetToAiConnection oa::oaModBitNet *  net  )  [protected]
 

Creates an terminal node to represent the function of a net.

If an terminal node is already associated with the net, then the existing one is returned.

If a new terminal node is created, it will implement a null function.

Parameters:
net 
Returns:
the terminal node attached to this net

Definition at line 239 of file oagFpgaManager.cpp.

References ai, oagFpga::AiRefAppDef, oagFpga::RtlGraph::newTerminal(), and setNetToAiConnection().

Referenced by create(), and oagFpga::AiModGraph::prepareNetToAiConnection().

BBRef oagFpga::Manager::prepareNetToBBConnection oa::oaModBitNet *  net  )  [protected]
 

Creates an terminal node to represent the function of a net.

If an terminal node is already associated with the net, then the existing one is returned.

If a new terminal node is created, it will implement a null function.

Parameters:
net 
Returns:
the terminal node attached to this net

Definition at line 207 of file oagFpgaManager.cpp.

References bbg, oagFpga::BBRef, oagFpga::bbRefAppDef, get(), oagFpga::RtlGraph::getNull(), oagFpga::RtlGraph::isTerminal(), oagFpga::RtlGraph::newTerminal(), and setNetToBBConnection().

Referenced by create(), and oagFpga::ModGraph::prepareNetToBBConnection().

void oagFpga::Manager::print ostream &  os  ) 
 

Dumps information about the managed graph.

Prints the graph node that every ModBitNet in the design is connected to (or if it is not connected), and prints information about every node in the graph.

Definition at line 1073 of file oagFpgaManager.cpp.

References bbg, oagFpga::BBRef, design, getNetToBBConnection(), oagFpga::RtlGraph::isNull(), oagFpga::RtlGraph::print(), and oagFpga::toBitNet().

Referenced by oagFpga::ModuleCompiler::compileModules(), and oagFpga::VerilogSynthesis::synthesizeModule().

void oagFpga::Manager::removeNetToAiConnection oa::oaModBitNet *  net  ) 
 

Disconnections a net from the Ai graph.

Parameters:
net a net

Definition at line 461 of file oagFpgaManager.cpp.

References ai, oagFpga::AiRefAppDef, and oagFpga::RtlGraph::setExternalTerminalConnection().

Referenced by oagFpga::AiModGraph::removeNetToAiConnection().

void oagFpga::Manager::serialize void *  buf,
oa::oaDesign *  design
[static]
 

Serializes the functional description of a design.

Parameters:
buf the pre-allocated buffer into which the serialized data is placed
design the design to serialize.

Definition at line 302 of file oagFpgaManager.cpp.

References DEBUG_PRINTLN.

void oagFpga::Manager::setNetToAiConnection oa::oaModBitNet *  net,
oagAi::Ref  ref
 

Connects a net to an Ai graph reference.

Parameters:
ref a reference to an terminal node
net a net

Definition at line 514 of file oagFpgaManager.cpp.

References ai, oagFpga::AiRefAppDef, oagFpga::RtlGraph::print(), and oagFpga::RtlGraph::setExternalTerminalConnection().

Referenced by oagFpga::ModuleCompiler::busNet2Ai(), prepareNetToAiConnection(), oagFpga::ModuleCompiler::scalarNet2Ai(), and oagFpga::AiModGraph::setNetToAiConnection().

void oagFpga::Manager::setNetToBBConnection oa::oaModBitNet *  net,
BBRef  bbRef
 

Connects a net to an Black Box graph reference.

Parameters:
ref a reference to an black box node
net a net

Definition at line 487 of file oagFpgaManager.cpp.

References bbg, oagFpga::bbRefAppDef, DEBUG_PRINTLN, oagFpga::RtlGraph::getNodeType(), and oagFpga::RtlGraph::setExternalTerminalConnection().

Referenced by oagFpga::Synthesis::createBusNet(), oagFpga::Synthesis::createScalarNet(), prepareNetToBBConnection(), and oagFpga::ModGraph::setNetToBBConnection().

int oagFpga::Manager::unserialize void *  buf,
oa::oaDesign *  design
[static]
 

Unserializes the functional description of a design.

Parameters:
buf a pointer to a buffer containing a serialized functional description.
design the design to annotate with this functional description.
Returns:
the number of bytes read from the buffer

Definition at line 359 of file oagFpgaManager.cpp.

References DEBUG_PRINTLN, and Manager().


Friends And Related Function Documentation

friend class AiModGraph [friend]
 

Definition at line 32 of file oagFpgaManager.h.

friend class ModGraph [friend]
 

Definition at line 30 of file oagFpgaManager.h.

friend class ModuleCompiler [friend]
 

Definition at line 33 of file oagFpgaManager.h.

friend class OccGraph [friend]
 

Definition at line 31 of file oagFpgaManager.h.

friend class Synthesis [friend]
 

Definition at line 29 of file oagFpgaManager.h.


Member Data Documentation

oagAi::Graph oagFpga::Manager::ai [protected]
 

USE WITH CAUTION. Returns the oagAi::Graph associated with the design that this Manager controls. Modifying the structure of this graph (and in particular the TERMINAL nodes) could invalid the links to OpenAccess design objects and result in errors or incorrect behavior. The const version of getGraph() is safer. Use with extreme caution.

Definition at line 152 of file oagFpgaManager.h.

Referenced by oagFpga::ModuleCompiler::andOf(), oagFpga::ModuleCompiler::annotateAsynchronousSignal(), oagFpga::ModuleCompiler::arithmeticAdd(), oagFpga::ModuleCompiler::arithmeticDivide(), oagFpga::ModuleCompiler::arithmeticMultiply(), oagFpga::ModuleCompiler::arithmeticSubtract(), oagFpga::ModuleCompiler::busNet2Ai(), oagFpga::ModuleCompiler::compileBBNode(), oagFpga::ModuleCompiler::compileModules(), create(), getNetToAiConnection(), oagFpga::ModuleCompiler::lessThan(), oagFpga::ModuleCompiler::multiBitConstant(), oagFpga::ModuleCompiler::notOf(), oagFpga::ModuleCompiler::orOf(), prepareNetToAiConnection(), removeNetToAiConnection(), oagFpga::ModuleCompiler::scalarNet2Ai(), oagFpga::ModuleCompiler::seq(), setNetToAiConnection(), oagFpga::ModuleCompiler::xorOf(), and oagFpga::ModuleCompiler::zeroExpand().

RtlGraph oagFpga::Manager::bbg [protected]
 

Definition at line 153 of file oagFpgaManager.h.

Referenced by oagFpga::Synthesis::assignMultiRef(), oagFpga::ModuleCompiler::BBRef2AiRef(), oagFpga::Synthesis::binaryBusInputOutputOpt(), oagFpga::Synthesis::binaryBusOpt(), oagFpga::Synthesis::binaryOpt(), oagFpga::ModuleCompiler::compileBBNode(), oagFpga::ModuleCompiler::compileFunctionalBBNode(), oagFpga::ModuleCompiler::compileModules(), create(), oagFpga::Synthesis::createBusNet(), oagFpga::Synthesis::createScalarNet(), getNetToBBConnection(), isStructural(), oagFpga::Synthesis::latch(), oagFpga::Synthesis::mux(), oagFpga::Synthesis::notOf(), prepareNetToBBConnection(), print(), oagFpga::Synthesis::seq(), setNetToBBConnection(), oagFpga::Synthesis::unaryBusInputOutputOpt(), and oagFpga::Synthesis::unaryBusOpt().

oa::oaDesign* oagFpga::Manager::design [protected]
 

Definition at line 154 of file oagFpgaManager.h.

Referenced by isStructural(), and print().

oa::oaDesign * oagFpga::Manager::lastManagerDesign [static, protected]
 

Definition at line 20 of file oagFpgaManager.cpp.

Manager * oagFpga::Manager::lastManagerObject [static, protected]
 

Definition at line 21 of file oagFpgaManager.cpp.


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