torc::physical::Module Class Reference

Hierarchical module. More...

#include <Module.hpp>

Inheritance diagram for torc::physical::Module:

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

Collaboration graph
[legend]

List of all members.

Public Types

typedef
PortSharedPtrVector::const_iterator 
PortSharedPtrConstIterator
 Constant iterator to Port shared pointers.
typedef
PortSharedPtrVector::iterator 
PortSharedPtrIterator
 Non-constant iterator to Port shared pointers.

Public Member Functions

PortSharedPtrIterator findPort (const string &inName)
 Find a port by name.
bool addPort (PortSharedPtr &inPortPtr)
 Add a port to the module.
bool removePort (PortSharedPtr &inPortPtr)
const stringgetAnchor (void) const
 Returns the anchor instance name for this module.
void setAnchor (const string &inAnchor)
 Sets the anchor instance name for this module.
PortSharedPtrConstIterator portsBegin (void) const
 Returns the begin constant iterator for ports.
PortSharedPtrConstIterator portsEnd (void) const
 Returns the end constant iterator for ports.
PortSharedPtrIterator portsBegin (void)
 Returns the begin non-constant iterator for ports.
PortSharedPtrIterator portsEnd (void)
 Returns the end non-constant iterator for ports.
size_t getPortCount (void) const
 Returns the number of ports in the module.
bool operator== (const Module &rhs) const
 Equality operator.

Protected Types

typedef std::string string
 Imported type name.

Protected Member Functions

 Module (const string &inName, const string &inAnchor)
 Protected constructor.

Protected Attributes

string mAnchor
 The module anchor instance name.
PortSharedPtrVector mPorts
 Vector of Port shared pointers for the module.

Friends

class Factory
 The Factory class has direct access to our internals.


Detailed Description

Hierarchical module.

Modules are used for hard macros in the Xilinx tool flow. For most users, modules never appear in XDL netlists, either because the design did not use hard macros, or because those hard macros were flattened as instances and nets directly in the design.

Definition at line 33 of file Module.hpp.


Member Typedef Documentation

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

Imported type name.

Reimplemented from torc::physical::Circuit.

Definition at line 40 of file Module.hpp.

typedef PortSharedPtrVector::const_iterator torc::physical::Module::PortSharedPtrConstIterator

Constant iterator to Port shared pointers.

Definition at line 55 of file Module.hpp.

typedef PortSharedPtrVector::iterator torc::physical::Module::PortSharedPtrIterator

Non-constant iterator to Port shared pointers.

Definition at line 57 of file Module.hpp.


Constructor & Destructor Documentation

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

Protected constructor.

Parameters:
inName The module name.
inAnchor The anchor instance name for the module. The anchor designates the instance in the module relative to which the module will be placed.

Definition at line 51 of file Module.hpp.


Member Function Documentation

PortSharedPtrIterator torc::physical::Module::findPort ( const string inName  )  [inline]

Find a port by name.

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

Definition at line 62 of file Module.hpp.

bool torc::physical::Module::addPort ( PortSharedPtr inPortPtr  )  [inline]

Add a port to the module.

Parameters:
inPortPtr The port 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 70 of file Module.hpp.

bool torc::physical::Module::removePort ( PortSharedPtr inPortPtr  )  [inline]

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 80 of file Module.hpp.

const string& torc::physical::Module::getAnchor ( void   )  const [inline]

Returns the anchor instance name for this module.

Definition at line 91 of file Module.hpp.

void torc::physical::Module::setAnchor ( const string inAnchor  )  [inline]

Sets the anchor instance name for this module.

Definition at line 93 of file Module.hpp.

PortSharedPtrConstIterator torc::physical::Module::portsBegin ( void   )  const [inline]

Returns the begin constant iterator for ports.

Definition at line 96 of file Module.hpp.

PortSharedPtrConstIterator torc::physical::Module::portsEnd ( void   )  const [inline]

Returns the end constant iterator for ports.

Definition at line 98 of file Module.hpp.

PortSharedPtrIterator torc::physical::Module::portsBegin ( void   )  [inline]

Returns the begin non-constant iterator for ports.

Definition at line 100 of file Module.hpp.

PortSharedPtrIterator torc::physical::Module::portsEnd ( void   )  [inline]

Returns the end non-constant iterator for ports.

Definition at line 102 of file Module.hpp.

size_t torc::physical::Module::getPortCount ( void   )  const [inline]

Returns the number of ports in the module.

Definition at line 104 of file Module.hpp.

bool torc::physical::Module::operator== ( const Module rhs  )  const [inline]

Equality operator.

This function deems modules equal if their names are identical.

Parameters:
rhs The module to compare against.
Returns:
true if both module names are identical, or false otherwise.

Definition at line 110 of file Module.hpp.


Friends And Related Function Documentation

friend class Factory [friend]

The Factory class has direct access to our internals.

Reimplemented from torc::physical::Progenitor< T >.

Definition at line 36 of file Module.hpp.


Member Data Documentation

The module anchor instance name.

Definition at line 43 of file Module.hpp.

Vector of Port shared pointers for the module.

Definition at line 45 of file Module.hpp.


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

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