torc::physical::Circuit Class Reference

Circuit composed of instances and nets. More...

#include <Circuit.hpp>

Inheritance diagram for torc::physical::Circuit:

Inheritance graph
[legend]
Collaboration diagram for torc::physical::Circuit:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
InstanceSharedPtrVector::const_iterator 
InstanceSharedPtrConstIterator
 Constant iterator to Instance shared pointers.
typedef
InstanceSharedPtrVector::iterator 
InstanceSharedPtrIterator
 Non-constant iterator to Instance shared pointers.
typedef
NetSharedPtrVector::const_iterator 
NetSharedPtrConstIterator
 Constant iterator to Net shared pointers.
typedef
NetSharedPtrVector::iterator 
NetSharedPtrIterator
 Non-constant iterator to Net shared pointers.

Public Member Functions

InstanceSharedPtrIterator findInstance (const string &inName)
 Find a circuit instance by name.
bool addInstance (InstanceSharedPtr &inInstancePtr)
 Add an instance to the circuit.
bool removeInstance (InstanceSharedPtr &inInstancePtr)
 Remove an instance from the circuit.
void unplace (void)
 Unplace the circuit by discarding placement information for each instance.
NetSharedPtrIterator findNet (const string &inName)
 Find a circuit net by name.
bool addNet (NetSharedPtr &inNetPtr)
 Add a net to the circuit.
bool removeNet (NetSharedPtr &inNetPtr)
 Remove a net from the circuit.
void unroute (void)
 Unroute the circuit by discarding routing information for each net.
InstanceSharedPtrConstIterator instancesBegin (void) const
 Returns the begin constant iterator for instances.
InstanceSharedPtrConstIterator instancesEnd (void) const
 Returns the end constant iterator for instances.
InstanceSharedPtrIterator instancesBegin (void)
 Returns the begin non-constant iterator for instances.
InstanceSharedPtrIterator instancesEnd (void)
 Returns the end non-constant iterator for instances.
size_t getInstanceCount (void) const
 Returns the number of instances in the circuit.
NetSharedPtrConstIterator netsBegin (void) const
 Returns the begin constant iterator for nets.
NetSharedPtrConstIterator netsEnd (void) const
 Returns the end constant iterator for nets.
NetSharedPtrIterator netsBegin (void)
 Returns the begin non-constant iterator for nets.
NetSharedPtrIterator netsEnd (void)
 Returns the end non-constant iterator for nets.
size_t getNetCount (void) const
 Returns the number of nets in the circuit.

Protected Types

typedef std::string string
 Imported type name.
typedef boost::int64_t int64_t
 Imported type name.
typedef std::map< std::string,
int64_t
NameToIndexMap
 Map from an element name to a vector index.

Protected Member Functions

 Circuit (const string &inName)
 Protected constructor. Circuit objects cannot be instantiated.

Protected Attributes

InstanceSharedPtrVector mInstances
 Vector of Instance shared pointers for the circuit.
NameToIndexMap mInstanceMap
 Instance name to index mapping for this circuit.
NetSharedPtrVector mNets
 Vector of Net shared pointers for the circuit.
NameToIndexMap mNetMap
 Net name to index mapping for this circuit.


Detailed Description

Circuit composed of instances and nets.

This class serves as a base class for Design and Module classes, and cannot be instantiated. A circuit is essentially a container for instances and their connecting nets.

Warning:
Do not attempt to sort or otherwise manipulate the order of the instances and nets. An internal container maps instance or net names to corresponding vector indexes for fast lookup, and those indexes updated whenever and instance or net is removed. Sorting or changing the order of the instances and nets will result in incorrect results from findInstance() and findNet(), along with data corruption if removeInstance() or removeNet() are subsequently called.
Todo:
May want to replace the instance and net vector and map combinations with a Boost multi-index.

Definition at line 46 of file Circuit.hpp.


Member Typedef Documentation

typedef std::string torc::physical::Circuit::string [protected]

Imported type name.

Reimplemented from torc::physical::ConfigMap.

Reimplemented in torc::physical::Design, and torc::physical::Module.

Definition at line 51 of file Circuit.hpp.

typedef boost::int64_t torc::physical::Circuit::int64_t [protected]

Imported type name.

Definition at line 53 of file Circuit.hpp.

typedef std::map<std::string, int64_t> torc::physical::Circuit::NameToIndexMap [protected]

Map from an element name to a vector index.

Definition at line 55 of file Circuit.hpp.

typedef InstanceSharedPtrVector::const_iterator torc::physical::Circuit::InstanceSharedPtrConstIterator

Constant iterator to Instance shared pointers.

Definition at line 72 of file Circuit.hpp.

typedef InstanceSharedPtrVector::iterator torc::physical::Circuit::InstanceSharedPtrIterator

Non-constant iterator to Instance shared pointers.

Definition at line 74 of file Circuit.hpp.

typedef NetSharedPtrVector::const_iterator torc::physical::Circuit::NetSharedPtrConstIterator

Constant iterator to Net shared pointers.

Definition at line 76 of file Circuit.hpp.

typedef NetSharedPtrVector::iterator torc::physical::Circuit::NetSharedPtrIterator

Non-constant iterator to Net shared pointers.

Definition at line 78 of file Circuit.hpp.


Constructor & Destructor Documentation

torc::physical::Circuit::Circuit ( const string inName  )  [inline, protected]

Protected constructor. Circuit objects cannot be instantiated.

Parameters:
inName The circuit name.

Definition at line 68 of file Circuit.hpp.


Member Function Documentation

InstanceSharedPtrIterator torc::physical::Circuit::findInstance ( const string inName  )  [inline]

Find a circuit instance by name.

Parameters:
inName The instance name to look for.
Returns:
an iterator for the specified instance, or instancesEnd() if the name was not found.

Definition at line 84 of file Circuit.hpp.

bool torc::physical::Circuit::addInstance ( InstanceSharedPtr inInstancePtr  )  [inline]

Add an instance to the circuit.

Parameters:
inInstancePtr The instance to add.
Returns:
true if the instance was added, or false if an instance with the same name already exists in the circuit.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 94 of file Circuit.hpp.

bool torc::physical::Circuit::removeInstance ( InstanceSharedPtr inInstancePtr  )  [inline]

Remove an instance from the circuit.

Parameters:
inInstancePtr The instance to remove.
Returns:
true if the instance was removed, or false if the instance did not exist.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 109 of file Circuit.hpp.

void torc::physical::Circuit::unplace ( void   )  [inline]

Unplace the circuit by discarding placement information for each instance.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 131 of file Circuit.hpp.

NetSharedPtrIterator torc::physical::Circuit::findNet ( const string inName  )  [inline]

Find a circuit net by name.

Parameters:
inName The net name to look for.
Returns:
an iterator to the specified net, or netsEnd() if the name was not found.

Definition at line 141 of file Circuit.hpp.

bool torc::physical::Circuit::addNet ( NetSharedPtr inNetPtr  )  [inline]

Add a net to the circuit.

Parameters:
inNetPtr The net to add.
Returns:
true if the net was added, or false if a net with the same name already exists in the circuit.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 151 of file Circuit.hpp.

bool torc::physical::Circuit::removeNet ( NetSharedPtr inNetPtr  )  [inline]

Remove a net from the circuit.

Parameters:
inNetPtr The net to remove.
Returns:
true if the net was removed, or false if the net did not exist.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 166 of file Circuit.hpp.

void torc::physical::Circuit::unroute ( void   )  [inline]

Unroute the circuit by discarding routing information for each net.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 188 of file Circuit.hpp.

InstanceSharedPtrConstIterator torc::physical::Circuit::instancesBegin ( void   )  const [inline]

Returns the begin constant iterator for instances.

Definition at line 197 of file Circuit.hpp.

InstanceSharedPtrConstIterator torc::physical::Circuit::instancesEnd ( void   )  const [inline]

Returns the end constant iterator for instances.

Definition at line 199 of file Circuit.hpp.

InstanceSharedPtrIterator torc::physical::Circuit::instancesBegin ( void   )  [inline]

Returns the begin non-constant iterator for instances.

Definition at line 201 of file Circuit.hpp.

InstanceSharedPtrIterator torc::physical::Circuit::instancesEnd ( void   )  [inline]

Returns the end non-constant iterator for instances.

Definition at line 203 of file Circuit.hpp.

size_t torc::physical::Circuit::getInstanceCount ( void   )  const [inline]

Returns the number of instances in the circuit.

Definition at line 205 of file Circuit.hpp.

NetSharedPtrConstIterator torc::physical::Circuit::netsBegin ( void   )  const [inline]

Returns the begin constant iterator for nets.

Definition at line 207 of file Circuit.hpp.

NetSharedPtrConstIterator torc::physical::Circuit::netsEnd ( void   )  const [inline]

Returns the end constant iterator for nets.

Definition at line 209 of file Circuit.hpp.

NetSharedPtrIterator torc::physical::Circuit::netsBegin ( void   )  [inline]

Returns the begin non-constant iterator for nets.

Definition at line 211 of file Circuit.hpp.

NetSharedPtrIterator torc::physical::Circuit::netsEnd ( void   )  [inline]

Returns the end non-constant iterator for nets.

Definition at line 213 of file Circuit.hpp.

size_t torc::physical::Circuit::getNetCount ( void   )  const [inline]

Returns the number of nets in the circuit.

Definition at line 215 of file Circuit.hpp.


Member Data Documentation

Vector of Instance shared pointers for the circuit.

Definition at line 58 of file Circuit.hpp.

Instance name to index mapping for this circuit.

Definition at line 60 of file Circuit.hpp.

Vector of Net shared pointers for the circuit.

Definition at line 62 of file Circuit.hpp.

Net name to index mapping for this circuit.

Definition at line 64 of file Circuit.hpp.


The documentation for this class was generated from the following file:

Generated on Thu Oct 13 16:50:45 2011 for TORC by  doxygen 1.5.6