27 #include "../Assembler.hpp"
40 std::cout <<
"Initializing AssemblerLibGen object for family " <<
mDB.
getFamilyName() <<
"... " << std::endl;
44 std::cerr <<
"ERROR: Folder " <<
mHarnessFolder.string() <<
" does not exist" << std::endl;
57 std::cout <<
"Harness folder - " <<
mHarnessFolder.string() << std::endl;
63 std::cout <<
"Generating micro Xdls for Logic element..." << std::endl;
70 TileTypeToSiteTypeSet::const_iterator pTileTypes = tileTypeToSiteType.begin();
71 TileTypeToSiteTypeSet::const_iterator eTileTypes = tileTypeToSiteType.end();
74 while(pTileTypes != eTileTypes) {
77 std::set<std::string>::iterator pSites = pTileTypes->second.begin();
78 std::set<std::string>::iterator eSites = pTileTypes->second.end();
80 while(pSites != eSites) {
85 primitiveStructures[primitiveDefName];
95 if(!harnessDesignPtr) {
96 std::cout <<
"WARNING: No harness design for site type " << primitiveDefName << std::endl;
100 std::cout <<
"Tile: " <<
mCurTileType <<
" Site: " << primitiveDefName << std::endl;
104 std::stringstream ssXdlFileNamePartial;
122 primitiveStructurePtr->getPrimitiveDefPtr();
129 while(pElements != eElements) {
136 harnessInstancePtr = *(harnessDesignPtr->instancesBegin());
137 harnessInstancePtr->getConfig(element.
getName(), harnessConfigName, harnessConfigVal);
140 if(!primitiveStructurePtr->isRoutethrough(element)) {
143 if(element.
getCfgs().size() > 0) {
148 ssXdlFileNamePartial.str());
157 harnessInstancePtr->setConfig(element.
getName(), harnessConfigName, harnessConfigVal);
168 std::cout <<
"Generating micro XDLs for routing PIPs..." << std::endl;
173 std::vector<std::string>::const_iterator pTiles = tilesSupported.begin();
174 std::vector<std::string>::const_iterator eTiles = tilesSupported.end();
175 while(pTiles != eTiles) {
178 bool firstTile =
true;
183 if(tileTypeName.compare(currTileName) == 0) {
205 std::cout <<
" Tile name: " << tileInfo.
getName() <<
", Tile type: "
213 Tilewire source(inTileIndex, wireIndex);
220 torc::architecture::TilewireVector::iterator p = sinks.begin();
221 torc::architecture::TilewireVector::iterator e = sinks.end();
236 std::stringstream ss;
246 string dummyInstSiteLocation =
"SLICE_X1Y1";
248 dummyInstName, dummyInstSiteType,
"DUMMY", dummyInstSiteLocation);
250 designPtr->addInstance(instancePtr);
261 net->addSource(sourcePin);
262 net->addSink(sinkPin);
264 designPtr->addNet(net);
268 std::fstream xdlExport(xdlFilePath.string().c_str(), std::ios_base::out);
270 fileExporter(designPtr);
282 for(uint i = 0; i < allSites.
getSize(); i++) {
297 if(tileTypeToSiteTypeMap.find(tileType) == tileTypeToSiteTypeMap.end()) {
298 std::set<std::string> siteTypeSet;
302 siteTypeSet.insert(siteType);
304 string sliceEven = siteType +
"E";
305 string sliceOdd = siteType +
"O";
306 siteTypeSet.insert(sliceEven);
307 siteTypeSet.insert(sliceOdd);
309 tileTypeToSiteTypeMap.insert(std::pair<
std::string, std::set<std::string> >(tileType,
314 tileTypeToSiteTypeMap[tileType].insert(siteType);
316 string sliceEven = siteType +
"E";
317 string sliceOdd = siteType +
"O";
318 tileTypeToSiteTypeMap[tileType].insert(sliceEven);
319 tileTypeToSiteTypeMap[tileType].insert(sliceOdd);
323 return tileTypeToSiteTypeMap;
328 TileTypeToSiteTypeSet::const_iterator p = tileTypeToSiteType.begin();
329 TileTypeToSiteTypeSet::const_iterator e = tileTypeToSiteType.end();
330 std::cout <<
"Tile type to Site type info:" << std::endl;
332 std::cout <<
" Tile: " << p->first << std::endl;
333 std::set<std::string>::iterator pSites = p->second.begin();
334 std::set<std::string>::iterator eSites = p->second.end();
335 while(pSites != eSites) {
336 std::cout <<
"\t" << *pSites;
339 std::cout << std::endl;
354 std::ifstream fileStream(harnessFilePath.string().c_str());
355 if(!fileStream.good()) {
356 std::cerr <<
"Could not open file " << harnessFilePath.string() << std::endl;
357 return harnessDesignPtr;
360 importer(fileStream, harnessFilePath.string());
366 return harnessDesignPtr;
372 std::map<std::string, std::string>::const_iterator pElementConfigMap;
373 std::map<std::string, std::string>::const_iterator eElementConfigMap =
376 if(pElementConfigMap != eElementConfigMap) {
377 return pElementConfigMap->second;
385 inDesignPtr->getDevice(), inDesignPtr->getPackage(), inDesignPtr->getSpeedGrade(),
386 inDesignPtr->getXdlVersion());
393 const string &inXdlFileNamePartial,
DesignSharedPtr inHarnessDesignPtr) {
418 torc::architecture::PrimitiveElement::StringSet::const_iterator pConfigs = configs.begin();
419 torc::architecture::PrimitiveElement::StringSet::const_iterator eConfigs = configs.end();
422 while(pConfigs != eConfigs) {
424 if(inPrimitiveStructurePtr->isLUT(inElement, *pConfigs)) {
438 std::stringstream ssXDLFileName;
442 std::fstream xdlExport(xdlFilePath.string().c_str(), std::ios::out);
450 instancePtr->getType(), instancePtr->getTile(), instancePtr->getSite(),
451 instancePtr->getBonding());
453 emptyDesignPtr->addInstance(emptyInstance);
455 fileExporter(emptyDesignPtr);
464 long long configValNumber = 1;
468 std::stringstream xdlReferenceFileName;
472 for(
int bitPosition = 0; bitPosition < inNumHexChars*4; bitPosition++) {
473 std::stringstream ssConfigVal;
474 ssConfigVal << std::setfill(
'0') << std::setw(inNumHexChars) << std::hex << configValNumber;
476 std::stringstream xdlFileName;
481 configValNumber = configValNumber << 1;
495 if(compoundElements.size() != 1) {
496 std::cerr <<
"WARNING: Compound setting with more than two elements not handled currently"
505 std::string compoundElementName = element1Name + element2Name;
510 if(elementIndex == -1) {
511 std::cerr <<
"WARNING: Compound setting " << element2Name <<
" not found" << std::endl;
515 const PrimitiveElement &element2 = inPrimitiveStructurePtr->getPrimitiveDefPtr()->getElements()[elementIndex];
522 instancePtr->getConfig(element2Name, harnessConfig2Name, harnessConfig2Val);
531 std::ofstream fileStream(referenceXDLFilePath.string().c_str());
532 if(!fileStream.good()) {
533 std::cerr <<
"Could not open file " << referenceXDLFilePath.string() << std::endl;
539 exporter(inHarnessDesignPtr);
544 PrimitiveElement::StringSet::const_iterator pConfigs1 = configs1.begin();
545 PrimitiveElement::StringSet::const_iterator eConfigs1 = configs1.end();
547 while(pConfigs1 != eConfigs1) {
551 PrimitiveElement::StringSet::const_iterator pConfigs2 = configs2.begin();
552 PrimitiveElement::StringSet::const_iterator eConfigs2 = configs2.end();
554 while(pConfigs2 != eConfigs2) {
557 std::string compoundConfigName = *pConfigs1 + *pConfigs2;
562 instancePtr->setConfig(element1Name,
"", *pConfigs1);
571 instancePtr->setConfig(element2Name, harnessConfig2Name, harnessConfig2Val);
577 const string &inXdlFileNamePartial,
582 std::cout <<
"Found Orphan Element " << elementName << std::endl;
590 instancePtr->getType(), instancePtr->getTile(), instancePtr->getSite(),
591 instancePtr->getBonding());
593 emptyDesign->addInstance(emptyInstance);
599 PrimitiveElement::StringSet::const_iterator pConfigs = configs.begin();
600 PrimitiveElement::StringSet::const_iterator eConfigs = configs.end();
604 while(pConfigs != eConfigs) {
623 instancePtr->getType(), instancePtr->getTile(), instancePtr->getSite(),
624 instancePtr->getBonding());
625 emptyDesign->addInstance(emptyInstance);
629 string xdlFileNameSetting = inXdlFileNameSitetype +
sNameSeparator + configSetting;
635 while(pPinsOut != ePinsOut) {
638 if(pPinsOut->isOutput() && boost::iequals(pPinsOut->getName().substr(0, 1),
"O")) {
643 while(pPinsIn != ePinsIn && boost::iequals(pPinsIn->getName().substr(0, 1),
"A")) {
644 if(pPinsIn->isInput()) {
646 std::string configVal =
"#LUT:" + pPinsOut->getName() +
"=" + pPinsIn->getName();
654 std::string configVal =
"#LUT:" + pPinsOut->getName() +
"=" +
"1";
655 std::stringstream xdlFileName1;
659 configVal =
"#LUT:" + pPinsOut->getName() +
"=" +
"0";
660 std::stringstream xdlFileName0;
670 const string &inXdlFileNamePartial) {
675 std::cerr <<
"No instance found in the harness " << inHarnessDesignPtr->getName()
682 instancePtr->setConfig(inConfigSetting,
"", referenceConfigValue);
685 std::stringstream ssReferenceXdlFileName;
690 std::ofstream fileStream(referenceXDLFilePath.string().c_str());
691 if(!fileStream.good()) {
692 std::cerr <<
"Could not open file " << referenceXDLFilePath.string() << std::endl;
698 exporter(inHarnessDesignPtr);
708 instancePtr->setConfig(inConfigSetting,
"", inConfigValue);
713 std::fstream xdlExport(xdlFilePath.string().c_str(), std::ios_base::out);
715 fileExporter(inOutDesignPtr);
723 string systemCommand =
"perl " + buildFolder.string() +
"/xdl2bit.pl " +
mXdlGenerationFolder.string();
724 int systemReturn = system(systemCommand.c_str());
725 if(systemReturn != 0) {
726 std::cerr <<
"Error calling perl script xdl2bit.pl " << std::endl;
729 systemReturn = system(systemCommand.c_str());
730 if(systemReturn != 0) {
731 std::cerr <<
"Error calling perl script xdl2bit.pl " << std::endl;
739 boost::filesystem::directory_iterator eFiles;
741 while(pFiles != eFiles) {
743 path filePath = pFiles->path();
745 if(filePath.extension() ==
".bit") {
748 path cBitPath = filePath;
749 cBitPath.replace_extension(
".cbit");
750 if(boost::filesystem::exists(cBitPath)) {
751 std::time_t bitFileModTime = boost::filesystem::last_write_time(filePath);
752 std::time_t cBitFileModTime = boost::filesystem::last_write_time(cBitPath);
754 if(cBitFileModTime > bitFileModTime)
760 string referenceBitFileName
763 if(!boost::filesystem::exists(referenceBitFilePath)) {
765 unsigned position = referenceBitFileName.find_last_of(
'-');
766 referenceBitFileName.replace(position, string::npos,
".bit");
768 if(!boost::filesystem::exists(referenceBitFilePath)) {
771 referenceBitFilePath.replace_extension(
".bit");
803 std::cout <<
"Stitching micro bitstream files..." << std::endl;
805 std::vector<ConfigValuesToBits> configMapVector;
806 std::vector<ConfigSettingsToValues> settingsToValuesMap;
807 std::vector<SiteTypeToConfigSettings> siteToSettingsMap;
811 boost::filesystem::directory_iterator eFiles;
813 while(pFiles != eFiles) {
816 if(pFiles->path().extension() ==
".cbit") {
818 std::ifstream libBitFile(pFiles->path().string().c_str(), std::ios::binary);
819 if(!libBitFile.good()) {
820 std::cerr <<
"ERROR: Could not open micro-bitstream file " << pFiles->path().string() << std::endl;
825 int32_t numSetBits, bitAddr;
826 libBitFile.read((
char *) &numSetBits, 4);
827 std::cout <<
"\t" << pFiles->path().filename() <<
" opened. Bit count " << numSetBits << std::endl;
828 std::vector<uint32_t> bitAddresses;
829 for(
int i = 0; i < numSetBits && !libBitFile.eof(); i++) {
830 libBitFile.read((
char *) &bitAddr, 4);
831 bitAddresses.push_back(bitAddr);
839 std::vector<std::string> splitVector;
840 boost::algorithm::split(splitVector, fileName, boost::algorithm::is_any_of(
sNameSeparator));
843 string tileType(splitVector[1]);
844 string siteType(splitVector[2]);
845 string configSetting(splitVector[3]);
846 string configValue(splitVector[4]);
850 if(library.find(tileType) == library.end()) {
852 siteToSettingsMap.push_back(siteToSettings);
853 library[tileType] = siteToSettingsMap.back();
857 if(library[tileType].find(siteType) == library[tileType].end()) {
859 settingsToValuesMap.push_back(settingToValues);
860 library[tileType][siteType] = settingsToValuesMap.back();
864 if(library[tileType][siteType].find(configSetting) == library[tileType][siteType].end()) {
866 configMapVector.push_back(valuesToBits);
867 library[tileType][siteType][configSetting] = configMapVector.back();
871 library[tileType][siteType][configSetting][configValue] = bitAddresses;
885 path xdlFilePath = inBitstreamPath.replace_extension(
".xdl");
886 std::ifstream xdlStream(xdlFilePath.string().c_str());
887 if(!xdlStream.good()) {
888 std::cout <<
"File " << xdlFilePath.string() <<
" not found" << std::endl;
892 xdlImporter(xdlFilePath);
898 const Tiles &tiles = ddb.getTiles();
903 bool pipDesign =
false;
905 if(designPtr->netsBegin() != designPtr->netsEnd()) {
907 if(netPtr->pipsBegin() != netPtr->pipsEnd()) {
908 std::cout <<
"\tProcessing NET" << std::endl;
913 tileRow = tileInfo.
getRow();
914 tileCol = tileInfo.
getCol();
919 if(pipDesign ==
false) {
927 const TileInfo& tileInfo = tiles.getTileInfo(tileIndex);
928 tileRow = tileInfo.
getRow();
929 tileCol = tileInfo.
getCol();
938 int elementIndex = -1, index = 0;
939 const PrimitiveElementArray& elementsArray = inPrimitiveStructurePtr->getPrimitiveDefPtr()->getElements();
944 while(pElements != eElements) {
945 if(pElements->getName().compare(inElementName) == 0) {
946 elementIndex = index;
949 pElements++; index++;
959 std::ofstream dbFile(dbFilePath.string().c_str(), std::ofstream::binary);
960 if(!dbFile.is_open()) {
961 std::cout <<
"Could not open file " << dbFilePath.string() <<
" to write" << std::endl;
965 std::cout <<
"Storing combined micro-bitstream in " << dbFilePath.string() << std::endl;
966 dbFile.write(
"<<<<BITLIBDB>>>>", 16);
969 dataSize = inLibrary.size();
970 dbFile.write((
char *) (&dataSize),
sizeof(dataSize));
971 std::cout <<
"Total tiles " << dataSize << std::endl;
975 TileTypeToSiteType::const_iterator pTiletypes = inLibrary.begin();
976 TileTypeToSiteType::const_iterator eTiletypes = inLibrary.end();
977 while(pTiletypes != eTiletypes) {
979 dataSize = pTiletypes->first.size();
980 dbFile.write((
const char *) &dataSize,
sizeof(dataSize));
981 dbFile.write((
const char *) pTiletypes->first.c_str(), pTiletypes->first.size());
982 dataSize = pTiletypes->second.size();
983 dbFile.write((
const char*) &dataSize,
sizeof(dataSize));
984 std::cout <<
"Tile type " << pTiletypes->first <<
" has " << pTiletypes->second.size()
985 <<
" sites." << std::endl;
988 SiteTypeToConfigSettings::const_iterator pSiteTypes = pTiletypes->second.begin();
989 SiteTypeToConfigSettings::const_iterator eSiteTypes = pTiletypes->second.end();
990 while(pSiteTypes != eSiteTypes) {
993 dataSize = pSiteTypes->first.size();
994 dbFile.write((
const char *) &dataSize,
sizeof(dataSize));
995 dbFile.write((
const char *) pSiteTypes->first.c_str(), pSiteTypes->first.size());
996 dataSize = pSiteTypes->second.size();
997 dbFile.write((
const char *) &dataSize,
sizeof(dataSize));
1002 ConfigSettingsToValues::const_iterator pConfigSettings = pSiteTypes->second.begin();
1003 ConfigSettingsToValues::const_iterator eConfigSettings = pSiteTypes->second.end();
1004 while(pConfigSettings != eConfigSettings) {
1006 dataSize = pConfigSettings->first.size();
1007 dbFile.write((
const char *) &dataSize,
sizeof(dataSize));
1008 dbFile.write(pConfigSettings->first.c_str(), pConfigSettings->first.size());
1009 dataSize = pConfigSettings->second.size();
1010 dbFile.write((
const char *) &dataSize,
sizeof(dataSize));
1012 ConfigValuesToBits::const_iterator pConfigValues = pConfigSettings->second.begin();
1013 ConfigValuesToBits::const_iterator eConfigValues = pConfigSettings->second.end();
1015 while(pConfigValues != eConfigValues) {
1017 dataSize = pConfigValues->first.size();
1018 dbFile.write((
const char *) &dataSize,
sizeof(dataSize));
1019 dbFile.write(pConfigValues->first.c_str(), pConfigValues->first.size());
1020 dataSize = pConfigValues->second.size();
1021 dbFile.write((
const char *) &dataSize,
sizeof(dataSize));
1023 for(std::vector<uint32_t>::const_iterator iter = pConfigValues->second.begin(); iter
1024 != pConfigValues->second.end(); iter++) {
1025 dbFile.write((
char *) &*iter,
sizeof(uint32_t));
void generateWireXdls()
Generate Xdls for routing pips.
std::string string
Imported type name.
const char * mTileTypeName
The tile type name.
Encapsulation of a tile index in an unsigned 32-bit integer.
const TileCol & getCol(void) const
Returns the column for this tile.
torc::physical::InstanceSharedPtr InstanceSharedPtr
Imported type name.
const std::string dummyInstName
Encapsulation of a tile row in an unsigned 16-bit integer.
path mXdlGenerationFolder
Folder in which Xdls will be generated.
const const PrimitiveElement * const_iterator
Constant T iterator type.
torc::bitstream::Assembler::ConfigValuesToBits ConfigValuesToBits
std::vector< Tilewire > TilewireVector
Vector of Tilewire objects.
const TileRow & getRow(void) const
Returns the row for this tile.
static const char * sLibExtension
.ldb
void createXdlForOrphanElements(const torc::architecture::PrimitiveElement &inElement, const string &inXdlFileNamePartial, DesignSharedPtr inHarnessDesignPtr)
Create Xdls for orphan elements with empty reference Xdl.
Encapsulation of a tile column in an unsigned 16-bit integer.
const string & getDeviceName(void) const
Returns the device name.
const PrimitiveDef * getPrimitiveDefPtr(void) const
Returns a pointer to the associated primitive definition.
std::map< string, string > getDeviceToPackageMap()
Get a map from device to default package.
Device database, including complete wiring and logic support.
void printTileTypeToSiteTypeMapInfo(TileTypeToSiteTypeSet tileTypeToSiteType)
Print the tile type to site type information.
bool isRambSite(const string &inSiteType)
Returns true if input is a RAMB site.
const string & getFamilyName(void) const
Returns the family name.
const Sites & mSites
Sites from the database object.
Header for the Virtex5PrimitiveStructure class.
DesignSharedPtr getDesignPtr(void)
Returns a shared pointer for the design.
Header for the DirectoryTree class.
const char * mWireName
The wire name.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
Encapsulation of primitive site definition, with associated connections, elements, and pins.
T * end(void)
Returns the non-constant end iterator.
const std::string dummyInstSiteType
void createXdlForGeneralConfigSetting(const string &inConfigSetting, const string &inConfigVal, const string &inXdlFileNamePartial, DesignSharedPtr inHarnessDesignPtr)
Set config value and create Xdl.
Main torc::bitstream namespace header.
void exportTileSinks(TileIndex inTileIndex)
Export all pips within the specified tile.
static NetSharedPtr newNetPtr(const string &inName, ENetType inNetType=eNetTypeNormal)
Create and return a new Net share pointer.
path mXdlGenerationReferenceFolder
Folder in which reference Xdls will be genered.
bool isSlicelType(const string &inSiteType)
Return true if site type is SLICEL.
Encapsulation of a wire index in an unsigned 16-bit integer.
static const char * sNameSeparator
Symbol to separate out parts of file name.
boost::shared_ptr< class InstancePin > InstancePinSharedPtr
Shared pointer encapsulation of an InstancePin.
path mHarnessFolder
Harness folder.
TileCount getTileCount(void) const
Returns the tile count for this device.
void setConfigAndGenerateXdl(const string &inConfigSetting, const string &inConfigValue, const string &inXdlFileName, DesignSharedPtr inOutDesignPtr)
Set given config and generate Xdl.
virtual void generateMemoryMicroBitstream()=0
Generate micro-bitstreams for memory elements like LUT in RAM mode.
int getElementIndexFromName(const string inElementName, PrimitiveStructureSharedPtr inPrimitiveStructurePtr)
Get index in Element array.
uint32_t getWordOffsetFromXdlFile(path inBitstreamPath, BitstreamSharedPtr inBitstreamPtr)
Get word offset in frame for the site/pip in corresponding Xdl.
const string & getName(void) const
Returns the name of the element.
std::map< std::string, std::set< std::string > > TileTypeToSiteTypeSet
Typedef of map from tile type to set of site type.
void saveLibraryMapToFile(TileTypeToSiteType &inLibrary)
Save library map to file.
void expandTilewireSinks(const Tilewire &inTilewire, TilewireVector &outSinks, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands the given tilewire's arc sinks.
virtual void compressBitFile(path primaryFile, path referenceFile)=0
Compress the diff of primary bitstream and reference bitstream.
PrimitiveElementPinArray & getPins(void)
Returns a non-constant array of element pins. This function should only be used by the Sites class d...
string getReferenceConfigValue(const string &inConfigSetting)
Return config value which results in off bit in bitstream.
void createRambBaseXdl(const string &inSiteType, DesignSharedPtr inHarnessDesignPtr)
Create Xdl with a Ramb instane and no configuration.
void exportSink(Tilewire &inSource, Tilewire &inSink)
Export a single pip.
virtual uint32_t getWordOffsetFromTileLocation(TileRow tileRow, TileCol tileCol, BitstreamSharedPtr inBitstreamPtr)=0
Get word offset from tile location.
const char * mTileName
The tile name.
Encapsulation of a device logic site.
std::map< string, string > mReferenceConfigMap
Map from config setting to reference config value.
Main torc::physical namespace header.
CompoundSettingMap mCompoundSettingMap
Map from one compound setting to vector of other related settings.
string mCurTileType
Tile type for which Xdl are being generated currently.
Site type and population data for the family and the device.
static const char * sConfigValueOff
Config value to switch off element (#OFF)
Encapsulation of a device tile and wire pair.
const Tiles & mTiles
Tiles from the database object.
Tile map, tile type, and wire information for the family and device.
const Array< const Site > & getSites(void) const
Returns the sites for this family.
virtual bool isSiteTypeSupported(const string &inSiteType)=0
Returns true if site type is supported.
Encapsulation of a wire count in an unsigned 16-bit integer.
Encapsulation of a tile count in an unsigned 32-bit integer.
Encapsulation of a tile within a device tile map.
static torc::physical::Pip newPip(const string &inTileName, const string &inSourceWireName, const string &inSinkWireName, EPipDirection inPipDirection, RoutethroughSharedPtr inRoutethroughPtr=RoutethroughSharedPtr())
Construct a pip and return it.
boost::shared_ptr< Net > NetSharedPtr
Shared pointer encapsulation of a Net.
const char * getTileTypeName(TileTypeIndex inTileTypeIndex) const
Returns the tile type name for the given tile type index.
Verbose encapsulation of a wire's information.
SiteIndex findSiteIndex(const string &inName) const
Returns the site index for the given site name.
TileIndex getTileIndex(void) const
Returns the index of the containing tile.
static InstanceSharedPtr newInstancePtr(const string &inName, const string &inType, const string &inTile, const string &inSite, EInstanceBonding inBonding=eInstanceBondingUnknown, InstanceReferenceSharedPtr inInstanceReferencePtr=InstanceReferenceSharedPtr())
Construct and return a new Instance shared pointer.
void createXdlsForConfigSetting(const torc::architecture::PrimitiveElement &inElement, PrimitiveStructureSharedPtr const inPrimitiveStructurePtr, const string &inSiteType, DesignSharedPtr inHarnessDesignPtr)
Create Xdls for each config value of the config setting
boost::filesystem::path path
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
virtual std::string getRambPrimaryPrimitive()=0
Returns primary primitivie for RAMB site type
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
void createXdlForCompoundSettings(const PrimitiveElement &inElement, const string &inSiteType, PrimitiveStructureSharedPtr inPrimitiveStructurePtr, DesignSharedPtr inHarnessDesignPtr)
Create Xdls for compound settings.
TileTypeToSiteTypeSet getTileTypeToSiteTypeMap(void)
Populate map of tile type to set of include site types.
std::map< std::string, PrimitiveStructureSharedPtr > PrimitiveStructuresSharedPtrMap
Typedef of map from primitive name to primitive structure shared pointer.
bool isCompoundSettingHead(const string &inSetting)
Is given setting head of compound setting group.
DDB & mDB
Database object.
torc::bitstream::Assembler::ConfigSettingsToValues ConfigSettingsToValues
boost::shared_ptr< Design > DesignSharedPtr
Shared pointer encapsulation of a Design.
const Site & getSite(SiteIndex inSiteIndex) const
Returns the site for the specified index.
const PrimitiveElementArray & getElements(void) const
Returns a constant array of primitive elements.
DesignSharedPtr getHarnessDesignForSiteType(const string &inSiteType)
Returns harness design pointer for the given site type.
const TileName & getTileName(void) const
Returns the pip tile.
torc::bitstream::Assembler::SiteTypeToConfigSettings SiteTypeToConfigSettings
bool isDspSite(const string &inSiteType)
Returns true is input is a DSP site.
Physical design programmable interconnect point.
void createReferenceXdlForConfigSetting(const string &inConfigSetting, DesignSharedPtr outHarnessDesignPtr, const string &inXdlFileNamePartial)
Create reference Xdl for given config setting.
torc::physical::NetSharedPtr NetSharedPtr
Imported type name.
static const char * sXdlExtension
.xdl
Encapsulation of a primitive site element. Primitive elements are subcomponents of logic primitive s...
void stitchMicroBitstreams()
Stitch micro-bitstreams in mXdlGenerationFolder.
Encapsulation of a site index in an unsigned 32-bit integer.
void createHexConfigXdl(const string &inConfigSetting, const string &inSiteType, int numHexChars, DesignSharedPtr inHarnessDesignPtr)
Create Xdl for configurations which hex string values.
Encapsulation of a tile type index in an unsigned 16-bit integer.
void compressBitFiles()
Compress all Xilinx bitfiles in mXdlGenerationFolder.
T * begin(void)
Returns the non-constant begin iterator.
void generateBitstreams()
Generate bitstream for all Xdls in mXdlGenerationFolder and mXdlGenerationReferenceFolder.
std::set< std::string > StringSet
A set of configuration values.
path mLibraryFolder
Path to library folder.
const char * getName(void) const
Returns the name for this tile.
const StringSet & getCfgs(void) const
Returns the set of allowable configuration values.
torc::bitstream::Assembler::TileTypeToSiteType TileTypeToSiteType
static InstancePinSharedPtr newInstancePinPtr(InstanceSharedPtr inInstancePtr, const string &inPinName)
Construct and return a new InstancePin shared pointer.
Importer from XDL format into a physical design.
void generateLogicXdls()
Generrate Xdls for logic sites.
static DesignSharedPtr newDesignPtr(const string &inName, const string &inDevice, const string &inPackage, const string &inSpeedGrade, const string &inXdlVersion)
Create and return a new Design shared pointer.
void initialize()
Initialize object of this class.
std::map< string, string > mDeviceToPackageMap
Map from device to pakcage.
virtual string getParentFamilyName()
Returns parent family name.
torc::bitstream::BitstreamSharedPtr BitstreamSharedPtr
Imported type name.
void createXdlForLut(const torc::architecture::PrimitiveElement &inElement, const string &inXdlFileNamePartial, DesignSharedPtr inHarnessDesignPtr)
Create Xdl for Lut.
WireCount getWireCount(TileTypeIndex inTileTypeIndex) const
Returns the wire count for the specified tile type.
virtual std::vector< std::string > getTilesSupportedForPips()=0
Returns vector of supported tiles.
static const boost::filesystem::path & getExecutablePath(void)
Returns the absolute path to the executable directory.
DesignSharedPtr createEmptyDesignWithSameMetadata(DesignSharedPtr inDesignPtr)
Create an empty design with same metadata. Does not copy configurations.
boost::filesystem::path path
Imported type name.
uint32_t getSize(void) const
Returns the array size.
Physical design exporter for XDL.
torc::physical::DesignSharedPtr DesignSharedPtr
Imported type name.
torc::packer::PrimitiveStructureSharedPtr PrimitiveStructureSharedPtr
Imported type name.
virtual PrimitiveStructuresSharedPtrMap getPrimitiveNameToStructreMap()=0
Populate primitive name to primitive structure map.
const string & getName(void) const
Returns the name of the primitive.