00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_PLACER_DEVICESITE_HPP
00017 #define TORC_PLACER_DEVICESITE_HPP
00018
00019 #include <string>
00020 #include "DeviceSiteType.hpp"
00021 #include "DeviceSitePin.hpp"
00022 #include "NetlistInstance.hpp"
00023
00024 namespace torc {
00025 namespace placer {
00026 class NetlistInstance;
00027 class DeviceSitePin;
00028
00029 class DeviceSite {
00030 typedef std::vector<DeviceSitePin*> DeviceSitePinPtrVector;
00031 protected:
00032 NetlistInstance* mInstance;
00033 const std::string& mName;
00034 int mSiteTypeIndex;
00035 int mTileIndex;
00036
00037 DeviceSitePinPtrVector mPins;
00038
00039
00040 int mRow;
00041 int mCol;
00042
00043
00044
00045
00046
00047
00048
00049
00050 public:
00051
00052 DeviceSite(const std::string& inName, int inSiteTypeIndex, int inTileIndex, int inRow,
00053 int inCol) : mInstance(NULL),
00054 mName(inName), mSiteTypeIndex(inSiteTypeIndex), mTileIndex(inTileIndex), mRow(inRow),
00055 mCol(inCol) {}
00056 ~DeviceSite() {}
00057 void setInstance(NetlistInstance* instptr) {
00058 mInstance = instptr;
00059 }
00060 NetlistInstance* getInstance() {
00061 return mInstance;
00062 }
00063 const std::string& getName() {
00064 return mName;
00065 }
00066 int getSiteTypeIndex() {
00067 return mSiteTypeIndex;
00068 }
00069 int getTileIndex() {
00070 return mTileIndex;
00071 }
00072 int getRow() {
00073 return mRow;
00074 }
00075 int getCol() {
00076 return mCol;
00077 }
00078 void addPin(std::string inName, int inRow, int inCol) {
00079 DeviceSitePin* pin = new DeviceSitePin(inName, inRow, inCol);
00080 mPins.push_back(pin);
00081
00082 }
00083 int getNumPins() {
00084 return mPins.size();
00085 }
00086 DeviceSitePin* getPin(int i) {
00087 return mPins[i];
00088 }
00089
00090 };
00091 }
00092 }
00093 #endif // TORC_PLACER_DEVICESITE_HPP