19 #ifndef TORC_PLACER_PLACERNETLIST_HPP
20 #define TORC_PLACER_PLACERNETLIST_HPP
71 for ( ; p != e; p++) {
79 for ( ; q != f; q++) {
82 addNet(netName, (*q)->getNetType());
86 r = (*q)->sourcesBegin();
87 g = (*q)->sourcesEnd();
88 for ( ; r != g; r++) {
90 addNetTerminal(netName, instance->getName(), (*r)->getPinName(),
true);
92 r = (*q)->sinksBegin();
94 for ( ; r != g; r++) {
96 addNetTerminal(netName, instance->getName(), (*r)->getPinName(),
false);
102 std::cout <<
"### PlacerNetlist Instances ###" << std::endl;
103 std::vector<NetlistInstance*>::iterator p =
mInstances.begin();
104 std::vector<NetlistInstance*>::iterator e =
mInstances.end();
105 for ( ; p != e; p++) {
106 std::cout << (*p)->getInstance()->getName() <<
" : "
107 << (*p)->getInstance()->getType() <<
" ";
108 if ((*p)->getSite() == NULL)
109 std::cout <<
"UNPLACED!!!" << std::endl;
111 std::cout << (*p)->getSite()->getName() << std::endl;
115 throw "getInstanceType(string) not used";
124 mInstanceLookup.insert(std::pair<std::string, uint32>(inInstance->getName(), index));
146 mNetLookup.insert(std::pair<std::string, uint32>(inName, index));
153 mPins.push_back(pin);
163 std::cout <<
"BAD PIN DEFINITION!!! " << pin->
getName() <<
" " << net->
getName() << std::endl;
199 std::cout <<
"### INSTANCES ###" << std::endl;
202 std::cout <<
"\t" << instance->
getInstance()->getName()
203 <<
" type: " << instance->
getType() << std::endl;
206 std::cout <<
"\t\tpin: " << pin->
getName() << std::endl;
209 std::cout <<
"### NETS ###" << std::endl;
212 std::cout <<
"\t" << net->
getName() <<
" type: " << net->
getType() << std::endl;
225 std::vector<NetlistNet*> newNets;
230 bool killnet =
false;
250 newNets.push_back(net);
252 std::cout <<
"KILL NET: " << net->
getName() << std::endl;
255 std::cout <<
"PRUNE: " <<
mNets.size() <<
" " << newNets.size() << std::endl;
257 for (
uint32 i = 0; i < newNets.size(); i++) {
258 mNets.push_back(newNets[i]);
264 #endif // TORC_PLACER_PLACERNETLIST_HPP
NetlistInstance * getInstance(uint32 i)
ENetType
Enumeration of net power types.
physical::ENetType ENetType
std::map< std::string, uint32 > mInstanceLookup
physical::DesignSharedPtr DesignSharedPtr
std::vector< InstanceSharedPtr > InstanceSharedPtrVector
Vector of Instance shared pointers.
Wrapper of the device database for placing the design.
std::vector< NetlistInstance * > mInstances
uint32 addSink(NetlistPin *newPin)
physical::InstanceSharedPtr InstanceSharedPtr
NetlistInstance * getInstance()
std::vector< std::vector< NetlistInstance * > > mInstancesByType
InstanceSharedPtrVector::const_iterator InstanceSharedPtrConstIterator
Constant iterator to Instance shared pointers.
InstanceSharedPtr getInstance()
NetlistPin * getSink(uint32 i)
NetlistNet * getNet(std::string inName)
uint32 getInstanceType(std::string &inType)
std::vector< NetlistPin * > mPins
void setInstance(NetlistInstance *inInstance)
uint32 addNet(std::string inName, ENetType inType)
std::vector< NetlistNet * > mNets
uint32 addNetTerminal(std::string inNetName, std::string inInstanceName, std::string inPortName, bool isNetSource)
Header for the Design class.
NetlistPin * getSource(uint32 i)
NetlistInstance * getInstance(std::string inName)
void setNet(NetlistNet *inNet)
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
boost::shared_ptr< Design > DesignSharedPtr
Shared pointer encapsulation of a Design.
uint32 addInstance(InstanceSharedPtr inInstance)
InstancePinSharedPtrVector::const_iterator InstancePinSharedPtrConstIterator
Constant iterator to InstancePin shared pointer objects.
physical::Circuit::InstanceSharedPtrConstIterator InstanceSharedPtrConstIterator
void addPin(NetlistPin *pin)
NetlistNet * getNet(uint32 i)
NetlistPin * getPin(uint32 index)
physical::Circuit::NetSharedPtrConstIterator NetSharedPtrConstIterator
std::map< std::string, uint32 > mNetLookup
NetlistInstance * getInstance(uint32 type, uint32 index)
uint32 getTypeIndex(const std::string &inType)
Get the type index for a given type name, creates a new entry if not found.
uint32 addSource(NetlistPin *newPin)
PlacementSiteTypeMapping & mTypeMapping
uint32 getNumInstancesByType(uint32 type)
Header for the DeviceWrapper class.
physical::Net::InstancePinSharedPtrConstIterator InstancePinSharedPtrConstIterator
NetSharedPtrVector::const_iterator NetSharedPtrConstIterator
Constant iterator to Net shared pointers.
PlacerNetlist(DesignSharedPtr inDesign, DeviceWrapper &inDevice)
physical::InstanceSharedPtrVector InstanceSharedPtrVector