00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "torc/common/Devices.hpp"
00020
00021
00022 #if 0
00023 #include <boost/assign/list_of.hpp>
00024 #include <boost/assign/list_inserter.hpp>
00025 #include <boost/bimap/bimap.hpp>
00026 #include <boost/bimap/multiset_of.hpp>
00027 #include <boost/bimap/list_of.hpp>
00028
00029 using namespace boost::bimaps;
00030 using namespace boost;
00031
00032
00033 void populate(void);
00034 void populate(void) {
00035 typedef bimap< multiset_of< EDevice >, list_of< std::string > > bm_type;
00036 bm_type bm = assign::list_of< bm_type::relation >
00037 (eXCV50, "xcv50") (eXCV100, "xcv100") (eXCV150, "xcv150") (eXCV200, "xcv200")
00038 (eXCV300, "xcv300") (eXCV400, "xcv400") (eXCV600, "xcv600") (eXCV800, "xcv800")
00039 (eXCV1000, "xcv1000");
00040 }
00041 #endif
00042
00043
00044 namespace torc {
00045 namespace common {
00046
00047
00048 class DeviceFamilyHelper {
00049 protected:
00050
00051
00052 friend class Devices;
00053
00054
00055 typedef std::string string;
00056
00057
00058 DeviceNameMap& mDeviceMap;
00059
00060 DeviceVector& mDeviceVector;
00061
00062 DeviceVector& mCombinedDeviceVector;
00063
00064 static string sDevice;
00065
00066
00067 DeviceFamilyHelper(DeviceNameMap& inDeviceMap, DeviceVector& inDeviceVector,
00068 DeviceVector& inCombinedDeviceVector) : mDeviceMap(inDeviceMap),
00069 mDeviceVector(inDeviceVector), mCombinedDeviceVector(inCombinedDeviceVector) {}
00070
00071
00072 DeviceFamilyHelper& operator<< (const string& rhs) { sDevice = rhs; return *this; }
00073
00074
00075 DeviceFamilyHelper& operator<< (enum EDevice rhs) {
00076 mDeviceMap[sDevice] = rhs;
00077 mDeviceVector.push_back(sDevice);
00078 mCombinedDeviceVector[rhs] = sDevice;
00079 return *this;
00080 }
00081 };
00082
00083 std::string DeviceFamilyHelper::sDevice;
00084 Devices Devices::sDevices;
00085
00086 Devices::Devices(void) {
00087
00088 mDeviceNames.resize(eDeviceCount);
00089
00090 DeviceFamilyHelper virtexHelper(mDeviceNameMap, mVirtexDevices, mDeviceNames);
00091 virtexHelper
00092
00093 << "xcv50" << eXCV50 << "xcv100" << eXCV100 << "xcv150" << eXCV150
00094 << "xcv200" << eXCV200 << "xcv300" << eXCV300 << "xcv400" << eXCV400
00095 << "xcv600" << eXCV600 << "xcv800" << eXCV800 << "xcv1000" << eXCV1000;
00096
00097 DeviceFamilyHelper virtexEHelper(mDeviceNameMap, mVirtexEDevices, mDeviceNames);
00098 virtexEHelper
00099
00100 << "xcv50e" << eXCV50E << "xcv100e" << eXCV100E << "xcv200e" << eXCV200E
00101 << "xcv300e" << eXCV300E << "xcv400e" << eXCV400E << "xcv405e" << eXCV405E
00102 << "xcv600e" << eXCV600E << "xcv812e" << eXCV812E << "xcv1000e" << eXCV1000E
00103 << "xcv1600e" << eXCV1600E << "xcv2000e" << eXCV2000E << "xcv2600e" << eXCV2600E
00104 << "xcv3200e" << eXCV3200E;
00105
00106 DeviceFamilyHelper virtex2Helper(mDeviceNameMap, mVirtex2Devices, mDeviceNames);
00107 virtex2Helper
00108
00109 << "xc2v40" << eXC2V40 << "xc2v80" << eXC2V80 << "xc2v250" << eXC2V250
00110 << "xc2v500" << eXC2V500 << "xc2v1000" << eXC2V1000 << "xc2v1500" << eXC2V1500
00111 << "xc2v2000" << eXC2V2000 << "xc2v3000" << eXC2V3000 << "xc2v4000" << eXC2V4000
00112 << "xc2v6000" << eXC2V6000 << "xc2v8000" << eXC2V8000;
00113
00114 DeviceFamilyHelper virtex2PHelper(mDeviceNameMap, mVirtex2PDevices, mDeviceNames);
00115 virtex2PHelper
00116
00117 << "xc2vp2" << eXC2VP2 << "xc2vp4" << eXC2VP4 << "xc2vp7" << eXC2VP7
00118 << "xc2vp20" << eXC2VP20 << "xc2vp30" << eXC2VP30 << "xc2vp40" << eXC2VP40
00119 << "xc2vp50" << eXC2VP50 << "xc2vp70" << eXC2VP70 << "xc2vp100" << eXC2VP100
00120
00121 << "xc2vpx20" << eXC2VPX20 << "xc2vpx70" << eXC2VPX70;
00122
00123 DeviceFamilyHelper virtex4Helper(mDeviceNameMap, mVirtex4Devices, mDeviceNames);
00124 virtex4Helper
00125
00126 << "xc4vfx12" << eXC4VFX12 << "xc4vfx20" << eXC4VFX20 << "xc4vfx40" << eXC4VFX40
00127 << "xc4vfx60" << eXC4VFX60 << "xc4vfx100" << eXC4VFX100 << "xc4vfx140" << eXC4VFX140
00128
00129 << "xc4vlx15" << eXC4VLX15 << "xc4vlx25" << eXC4VLX25 << "xc4vlx40" << eXC4VLX40
00130 << "xc4vlx60" << eXC4VLX60 << "xc4vlx80" << eXC4VLX80 << "xc4vlx100" << eXC4VLX100
00131 << "xc4vlx160" << eXC4VLX160 << "xc4vlx200" << eXC4VLX200
00132
00133 << "xc4vsx25" << eXC4VSX25 << "xc4vsx35" << eXC4VSX35 << "xc4vsx55" << eXC4VSX55;
00134
00135 DeviceFamilyHelper virtex5Helper(mDeviceNameMap, mVirtex5Devices, mDeviceNames);
00136 virtex5Helper
00137
00138 << "xc5vfx30t" << eXC5VFX30T << "xc5vfx70t" << eXC5VFX70T
00139 << "xc5vfx100t" << eXC5VFX100T << "xc5vfx130t" << eXC5VFX130T
00140 << "xc5vfx200t" << eXC5VFX200T
00141
00142 << "xc5vlx30" << eXC5VLX30 << "xc5vlx50" << eXC5VLX50 << "xc5vlx85" << eXC5VLX85
00143 << "xc5vlx110" << eXC5VLX110 << "xc5vlx155" << eXC5VLX155 << "xc5vlx220" << eXC5VLX220
00144 << "xc5vlx330" << eXC5VLX330
00145
00146 << "xc5vlx20t" << eXC5VLX20T << "xc5vlx30t" << eXC5VLX30T << "xc5vlx50t" << eXC5VLX50T
00147 << "xc5vlx85t" << eXC5VLX85T << "xc5vlx110t" << eXC5VLX110T
00148 << "xc5vlx155t" << eXC5VLX155T << "xc5vlx220t" << eXC5VLX220T
00149 << "xc5vlx330t" << eXC5VLX330T
00150
00151 << "xc5vsx35t" << eXC5VSX35T << "xc5vsx50t" << eXC5VSX50T << "xc5vsx95t" << eXC5VSX95T
00152 << "xc5vsx240t" << eXC5VSX240T
00153
00154 << "xc5vtx150t" << eXC5VTX150T << "xc5vtx240t" << eXC5VTX240T;
00155
00156 DeviceFamilyHelper virtex6Helper(mDeviceNameMap, mVirtex6Devices, mDeviceNames);
00157 virtex6Helper
00158
00159 << "xc6vcx75t" << eXC6VCX75T << "xc6vcx130t" << eXC6VCX130T
00160 << "xc6vcx195t" << eXC6VCX195T << "xc6vcx240t" << eXC6VCX240T
00161
00162 << "xc6vhx250t" << eXC6VHX250T << "xc6vhx255t" << eXC6VHX255T
00163 << "xc6vhx380t" << eXC6VHX380T << "xc6vhx565t" << eXC6VHX565T
00164
00165 << "xc6vlx75t" << eXC6VLX75T << "xc6vlx130t" << eXC6VLX130T
00166 << "xc6vlx195t" << eXC6VLX195T << "xc6vlx240t" << eXC6VLX240T
00167 << "xc6vlx365t" << eXC6VLX365T << "xc6vlx550t" << eXC6VLX550T
00168 << "xc6vlx760" << eXC6VLX760
00169
00170 << "xc6vsx315t" << eXC6VSX315T << "xc6vsx475t" << eXC6VSX475T;
00171
00172 DeviceFamilyHelper virtex6LHelper(mDeviceNameMap, mVirtex6Devices, mDeviceNames);
00173 virtex6LHelper
00174
00175 << "xc6vlx75tl" << eXC6VLX75TL << "xc6vlx130tl" << eXC6VLX130TL
00176 << "xc6vlx195tl" << eXC6VLX195TL << "xc6vlx240tl" << eXC6VLX240TL
00177 << "xc6vlx365tl" << eXC6VLX365TL << "xc6vlx550tl" << eXC6VLX550TL
00178 << "xc6vlx760l" << eXC6VLX760L
00179
00180 << "xc6vsx315tl" << eXC6VSX315TL << "xc6vsx475tl" << eXC6VSX475TL;
00181
00182 DeviceFamilyHelper virtex7Helper(mDeviceNameMap, mVirtex7Devices, mDeviceNames);
00183 virtex7Helper
00184
00185 << "xc7v285t" << eXC7V285T << "xc7v450t" << eXC7V450T << "xc7v585t" << eXC7V585T
00186 << "xc7v855t" << eXC7V855T << "xc7v1500t" << eXC7V1500T << "xc7v2000t" << eXC7V2000T
00187
00188 << "xc7vx485t" << eXC7VX485T;
00189
00190 DeviceFamilyHelper virtex7LHelper(mDeviceNameMap, mVirtex7LDevices, mDeviceNames);
00191 virtex7LHelper
00192
00193 << "xc7v285tl" << eXC7V285TL << "xc7v450tl" << eXC7V450TL << "xc7v585tl" << eXC7V585TL
00194 << "xc7v855tl" << eXC7V855TL << "xc7v1500tl" << eXC7V1500TL
00195 << "xc7v2000tl" << eXC7V2000TL;
00196
00197 DeviceFamilyHelper kintex7Helper(mDeviceNameMap, mKintex7Devices, mDeviceNames);
00198 kintex7Helper
00199
00200 << "xc7k30t" << eXC7K30T << "xc7k70t" << eXC7K70T << "xc7k160t" << eXC7K160T
00201 << "xc7k325t" << eXC7K325T << "xc7k410t" << eXC7K410T;
00202
00203 DeviceFamilyHelper kintex7LHelper(mDeviceNameMap, mKintex7LDevices, mDeviceNames);
00204 kintex7LHelper
00205
00206 << "xc7k30tl" << eXC7K30TL << "xc7k70tl" << eXC7K70TL << "xc7k160tl" << eXC7K160TL
00207 << "xc7k325tl" << eXC7K325TL << "xc7k410tl" << eXC7K410TL;
00208
00209 DeviceFamilyHelper spartan3EHelper(mDeviceNameMap, mSpartan3EDevices, mDeviceNames);
00210 spartan3EHelper
00211
00212 << "xc3s100e" << eXC3S100E << "xc3s250e" << eXC3S250E << "xc3s500e" << eXC3S500E
00213 << "xc3s1200e" << eXC3S1200E << "xc3s1600e" << eXC3S1600E;
00214
00215 DeviceFamilyHelper spartan6Helper(mDeviceNameMap, mSpartan6Devices, mDeviceNames);
00216 spartan6Helper
00217
00218 << "xc6slx4" << eXC6SLX4 << "xc6slx9" << eXC6SLX9 << "xc6slx16" << eXC6SLX16
00219 << "xc6slx25" << eXC6SLX25 << "xc6slx45" << eXC6SLX45 << "xc6slx75" << eXC6SLX75
00220 << "xc6slx100" << eXC6SLX100 << "xc6slx150" << eXC6SLX150
00221
00222 << "xc6slx25t" << eXC6SLX25T << "xc6slx45t" << eXC6SLX45T << "xc6slx75t" << eXC6SLX75T
00223 << "xc6slx100t" << eXC6SLX100T << "xc6slx150t" << eXC6SLX150T;
00224
00225 DeviceFamilyHelper spartan6LHelper(mDeviceNameMap, mSpartan6LDevices, mDeviceNames);
00226 spartan6LHelper
00227
00228 << "xc6slx4l" << eXC6SLX4L << "xc6slx9l" << eXC6SLX9L << "xc6slx16l" << eXC6SLX16L
00229 << "xc6slx25l" << eXC6SLX25L << "xc6slx45l" << eXC6SLX45L << "xc6slx75l" << eXC6SLX75L
00230 << "xc6slx100l" << eXC6SLX100L << "xc6slx150l" << eXC6SLX150L;
00231
00232
00233 addToSupportedDevices(mVirtexDevices);
00234 addToSupportedDevices(mVirtexEDevices);
00235 addToSupportedDevices(mVirtex2Devices);
00236 addToSupportedDevices(mVirtex2PDevices);
00237 addToSupportedDevices(mVirtex4Devices);
00238 addToSupportedDevices(mVirtex5Devices);
00239 addToSupportedDevices(mVirtex6Devices);
00240 addToSupportedDevices(mVirtex6LDevices);
00241 addToSupportedDevices(mVirtex7Devices);
00242
00243 addToSupportedDevices(mKintex7Devices);
00244
00245 addToSupportedDevices(mSpartan3EDevices);
00246 addToSupportedDevices(mSpartan6Devices);
00247 addToSupportedDevices(mSpartan6LDevices);
00248
00249
00250 mUnitTestDevices.push_back(mVirtexDevices.front());
00251 mUnitTestDevices.push_back(mVirtexEDevices.front());
00252 mUnitTestDevices.push_back(mVirtex2Devices.front());
00253 mUnitTestDevices.push_back(mVirtex2PDevices.front());
00254 mUnitTestDevices.push_back(mVirtex4Devices.front());
00255 mUnitTestDevices.push_back(mVirtex5Devices.front());
00256 mUnitTestDevices.push_back(mVirtex6Devices.front());
00257
00258 mUnitTestDevices.push_back(mVirtex7Devices.front());
00259
00260 mUnitTestDevices.push_back(mKintex7Devices.front());
00261
00262 mUnitTestDevices.push_back(mSpartan3EDevices.front());
00263 mUnitTestDevices.push_back(mSpartan6Devices.front());
00264
00265 }
00266
00267 }
00268 }