#include <PlacerNetlist.hpp>
Definition at line 34 of file PlacerNetlist.hpp.
Definition at line 63 of file 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);
physical::InstanceSharedPtr InstanceSharedPtr
uint32 addNet(std::string inName, ENetType inType)
uint32 addNetTerminal(std::string inNetName, std::string inInstanceName, std::string inPortName, bool isNetSource)
uint32 addInstance(InstanceSharedPtr inInstance)
physical::Circuit::InstanceSharedPtrConstIterator InstanceSharedPtrConstIterator
physical::Circuit::NetSharedPtrConstIterator NetSharedPtrConstIterator
physical::Net::InstancePinSharedPtrConstIterator InstancePinSharedPtrConstIterator
torc::placer::PlacerNetlist::~PlacerNetlist |
( |
| ) |
|
|
inline |
Definition at line 121 of file PlacerNetlist.hpp.
124 mInstanceLookup.insert(std::pair<std::string, uint32>(inInstance->getName(), index));
135 NetlistInstance* instance =
new NetlistInstance(inInstance,
std::map< std::string, uint32 > mInstanceLookup
std::vector< NetlistInstance * > mInstances
uint32 getTypeIndex(const std::string &inType)
Get the type index for a given type name, creates a new entry if not found.
PlacementSiteTypeMapping & mTypeMapping
uint32 torc::placer::PlacerNetlist::addNet |
( |
std::string |
inName, |
|
|
ENetType |
inType |
|
) |
| |
|
inline |
Definition at line 143 of file PlacerNetlist.hpp.
145 mNets.push_back(
new NetlistNet(inName, inType, index));
146 mNetLookup.insert(std::pair<std::string, uint32>(inName, index));
std::vector< NetlistNet * > mNets
std::map< std::string, uint32 > mNetLookup
uint32 torc::placer::PlacerNetlist::addNetTerminal |
( |
std::string |
inNetName, |
|
|
std::string |
inInstanceName, |
|
|
std::string |
inPortName, |
|
|
bool |
isNetSource |
|
) |
| |
|
inline |
Definition at line 149 of file PlacerNetlist.hpp.
150 NetlistPin* pin =
new NetlistPin(inPortName, isNetSource);
151 NetlistNet* net =
getNet(inNetName);
152 NetlistInstance* instance =
getInstance(inInstanceName);
153 mPins.push_back(pin);
154 pin->setInstance(instance);
156 instance->addPin(pin);
158 return net->addSource(pin);
160 return net->addSink(pin);
162 if (pin->getInstance() == NULL) {
163 std::cout <<
"BAD PIN DEFINITION!!! " << pin->getName() <<
" " << net->getName() << std::endl;
NetlistNet * getNet(std::string inName)
std::vector< NetlistPin * > mPins
NetlistInstance * getInstance(std::string inName)
NetlistInstance* torc::placer::PlacerNetlist::getInstance |
( |
std::string |
inName | ) |
|
|
inline |
Definition at line 167 of file PlacerNetlist.hpp.
std::map< std::string, uint32 > mInstanceLookup
std::vector< NetlistInstance * > mInstances
Definition at line 173 of file PlacerNetlist.hpp.
std::vector< std::vector< NetlistInstance * > > mInstancesByType
uint32 torc::placer::PlacerNetlist::getInstanceType |
( |
std::string & |
inType | ) |
|
|
inline |
NetlistNet* torc::placer::PlacerNetlist::getNet |
( |
std::string |
inName | ) |
|
|
inline |
Definition at line 177 of file PlacerNetlist.hpp.
std::vector< NetlistNet * > mNets
std::map< std::string, uint32 > mNetLookup
uint32 torc::placer::PlacerNetlist::getNumInstances |
( |
| ) |
|
|
inline |
uint32 torc::placer::PlacerNetlist::getNumInstancesByType |
( |
uint32 |
type | ) |
|
|
inline |
Definition at line 189 of file PlacerNetlist.hpp.
std::vector< std::vector< NetlistInstance * > > mInstancesByType
uint32 torc::placer::PlacerNetlist::getNumNets |
( |
| ) |
|
|
inline |
uint32 torc::placer::PlacerNetlist::getNumTypes |
( |
| ) |
|
|
inline |
Definition at line 195 of file PlacerNetlist.hpp.
std::vector< std::vector< NetlistInstance * > > mInstancesByType
void torc::placer::PlacerNetlist::print |
( |
| ) |
|
|
inline |
Definition at line 198 of file PlacerNetlist.hpp.
199 std::cout <<
"### INSTANCES ###" << std::endl;
202 std::cout <<
"\t" << instance->getInstance()->getName()
203 <<
" type: " << instance->getType() << std::endl;
204 for (
uint32 j = 0; j < instance->getNumPins(); j++) {
205 NetlistPin* pin = instance->getPin(j);
206 std::cout <<
"\t\tpin: " << pin->getName() << std::endl;
209 std::cout <<
"### NETS ###" << std::endl;
211 NetlistNet* net =
mNets[i];
212 std::cout <<
"\t" << net->getName() <<
" type: " << net->getType() << std::endl;
213 for (
uint32 j = 0; j < net->getNumSources(); j++) {
214 NetlistPin* pin = net->getSource(j);
215 std::cout <<
"\t\tsource: " << pin->getInstance()->getInstance()->getName() <<
" pin " << pin->getName() << std::endl;
217 for (
uint32 j = 0; j < net->getNumSinks(); j++) {
218 NetlistPin* pin = net->getSink(j);
219 std::cout <<
"\t\tsink: " << pin->getInstance()->getInstance()->getName() <<
" pin " << pin->getName() << std::endl;
std::vector< NetlistInstance * > mInstances
std::vector< NetlistNet * > mNets
void torc::placer::PlacerNetlist::printInstances |
( |
| ) |
|
|
inline |
Definition at line 101 of file PlacerNetlist.hpp.
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;
std::vector< NetlistInstance * > mInstances
void torc::placer::PlacerNetlist::temporaryPrune |
( |
| ) |
|
|
inline |
Definition at line 224 of file PlacerNetlist.hpp.
225 std::vector<NetlistNet*> newNets;
228 NetlistNet* net =
mNets[i];
230 bool killnet =
false;
232 for (
uint32 j = 0; j < net->getNumSources(); j++) {
233 pin = net->getSource(j);
240 for (
uint32 j = 0; j < net->getNumSinks(); j++) {
241 pin = net->getSink(j);
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]);
std::vector< NetlistNet * > mNets
std::map<std::string, uint32> torc::placer::PlacerNetlist::mInstanceLookup |
|
protected |
std::vector<std::vector<NetlistInstance*> > torc::placer::PlacerNetlist::mInstancesByType |
|
protected |
std::map<std::string, uint32> torc::placer::PlacerNetlist::mNetLookup |
|
protected |
std::vector<NetlistNet*> torc::placer::PlacerNetlist::mNets |
|
protected |
std::vector<NetlistPin*> torc::placer::PlacerNetlist::mPins |
|
protected |
The documentation for this class was generated from the following file: