19 #ifndef TORC_PHYSICAL_CIRCUIT_HPP
20 #define TORC_PHYSICAL_CIRCUIT_HPP
85 NameToIndexMap::iterator result =
mInstanceMap.find(inName);
99 if(result != e)
return false;
111 const std::string& name = inInstancePtr->getName();
112 NameToIndexMap::iterator result =
mInstanceMap.find(name);
114 if(result == e)
return false;
115 inInstancePtr->resetParentWeakPtr();
117 NameToIndexMap::mapped_type target = result->second;
121 NameToIndexMap::mapped_type& index = mp->second;
122 if(index > target) index--;
135 while(p < e) (*p++)->
unplace();
142 NameToIndexMap::iterator result =
mNetMap.find(inName);
143 NameToIndexMap::iterator e =
mNetMap.end();
144 if(result == e)
return netsEnd();
156 if(result != e)
return false;
159 mNets.push_back(inNetPtr);
169 NameToIndexMap::iterator result =
mNetMap.find(name);
170 NameToIndexMap::iterator e =
mNetMap.end();
171 if(result == e)
return false;
172 inNetPtr->resetParentWeakPtr();
174 NameToIndexMap::mapped_type target = result->second;
175 NameToIndexMap::iterator mp =
mNetMap.begin();
176 NameToIndexMap::iterator me =
mNetMap.end();
178 NameToIndexMap::mapped_type& index = mp->second;
179 if(index > target) index--;
192 while(p < e) (*p++)->
unroute();
230 #endif // TORC_PHYSICAL_CIRCUIT_HPP
boost::weak_ptr< Circuit > CircuitWeakPtr
Weak pointer encapsulation of a Circuit.
Header for the ConfigMap class.
std::vector< InstanceSharedPtr > InstanceSharedPtrVector
Vector of Instance shared pointers.
InstanceSharedPtrIterator instancesEnd(void)
Returns the end non-constant iterator for instances.
NetSharedPtrVector mNets
Vector of Net shared pointers for the circuit.
std::vector< CircuitSharedPtr > CircuitSharedPtrVector
Vector of Circuit shared pointers.
size_t getNetCount(void) const
Returns the number of nets in the circuit.
Header for the Instance class.
InstanceSharedPtrVector::const_iterator InstanceSharedPtrConstIterator
Constant iterator to Instance shared pointers.
NameToIndexMap mInstanceMap
Instance name to index mapping for this circuit.
size_t getInstanceCount(void) const
Returns the number of instances in the circuit.
bool addNet(NetSharedPtr &inNetPtr)
Add a net to the circuit.
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
Concept for any object that can be named.
Header for the Progenitor class.
Header for the Annotated class.
InstanceSharedPtrIterator findInstance(const string &inName)
Find a circuit instance by name.
Header for the Named class.
Circuit(const string &inName)
Protected constructor. Circuit objects cannot be instantiated.
NetSharedPtrConstIterator netsEnd(void) const
Returns the end constant iterator for nets.
std::vector< NetSharedPtr > NetSharedPtrVector
Vector of Net shared pointers.
boost::shared_ptr< Net > NetSharedPtr
Shared pointer encapsulation of a Net.
NetSharedPtrIterator findNet(const string &inName)
Find a circuit net by name.
boost::shared_ptr< Circuit > CircuitSharedPtr
Shared pointer encapsulation of a Circuit.
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
Concept for any object that may have children.
NetSharedPtrVector::iterator NetSharedPtrIterator
Non-constant iterator to Net shared pointers.
Concept for any object that may have a parent.
Header for the Progeny class.
bool addInstance(InstanceSharedPtr &inInstancePtr)
Add an instance to the circuit.
bool removeNet(NetSharedPtr &inNetPtr)
Remove a net from the circuit.
bool removeInstance(InstanceSharedPtr &inInstancePtr)
Remove an instance from the circuit.
Configuration setting map.
Header for the Net class.
InstanceSharedPtrIterator instancesBegin(void)
Returns the begin non-constant iterator for instances.
NetSharedPtrIterator netsBegin(void)
Returns the begin non-constant iterator for nets.
Circuit composed of instances and nets.
boost::int64_t int64_t
Imported type name.
void unroute(void)
Unroute the circuit by discarding routing information for each net.
std::map< std::string, int64_t > NameToIndexMap
Map from an element name to a vector index.
void unplace(void)
Unplace the circuit by discarding placement information for each instance.
InstanceSharedPtrConstIterator instancesBegin(void) const
Returns the begin constant iterator for instances.
NetSharedPtrIterator netsEnd(void)
Returns the end non-constant iterator for nets.
std::string string
Imported type name.
InstanceSharedPtrVector mInstances
Vector of Instance shared pointers for the circuit.
Concept for any object that can be annotated.
NetSharedPtrVector::const_iterator NetSharedPtrConstIterator
Constant iterator to Net shared pointers.
InstanceSharedPtrVector::iterator InstanceSharedPtrIterator
Non-constant iterator to Instance shared pointers.
NameToIndexMap mNetMap
Net name to index mapping for this circuit.
NetSharedPtrConstIterator netsBegin(void) const
Returns the begin constant iterator for nets.
InstanceSharedPtrConstIterator instancesEnd(void) const
Returns the end constant iterator for instances.