27 #include <boost/regex.hpp>
30 using namespace torc::architecture;
31 using namespace torc::physical;
32 using namespace torc::bitstream;
37 const string Assembler::sLibraryRelativePath =
"torc/bitstream/assembler/libraries";
38 const string Assembler::sConfigOff =
"#OFF";
39 const string Assembler::sLibraryExtension =
".ldb";
40 const boost::regex Assembler::sLutConfigRegEx(
"^(#LUT).*");
41 const boost::regex Assembler::sLutRamOrRomConfigRegEx(
"^(#RAM:|#ROM).*");
42 const boost::regex Assembler::sRoutethroughRegEx(
"^_ROUTETHROUGH.*");
46 void Assembler::initialize(
void) {
48 mUnsupportedTileCount = 0;
49 mUnsupportedTileTypeCount = 0;
50 mUnsupportedPipCount = 0;
53 if(!boost::filesystem::exists(mLibraryPath)) {
54 std::cerr <<
"ERROR: Library folder " << mLibraryPath <<
" does not exist." << std::endl;
58 mBigEndian = isBigEndianMachine();
65 const path inTargetBitstreamPath,
67 path baseBitstreamPath) {
69 mDesignPtr = inDesignPtr;
70 mMergeMode = inMergeMode;
71 mTargetBitstreamPath = inTargetBitstreamPath;
73 if(mDesignPtr->getDevice() != mDB.getDeviceName()) {
74 std::cout <<
"Xdl device differs from database device" << std::endl;
78 if(baseBitstreamPath.empty()) {
81 const string partNumber = mDesignPtr->getDevice();
82 string nullBitFileName = partNumber +
".bit";
83 baseBitstreamPath = mLibraryPath /
"null_bitstreams" / nullBitFileName;
85 if(!boost::filesystem::exists(baseBitstreamPath)) {
86 std::cout <<
"Base bitstream file - " << baseBitstreamPath.string()
87 <<
" - does not exist." << std::endl;
91 std::cout <<
"Loading base bitstream " << baseBitstreamPath << std::endl;
92 std::ifstream baseBitstream;
93 baseBitstream.open(baseBitstreamPath.string().c_str());
96 mBitstreamPtr->setDesignName(mDesignPtr->getName());
97 mBitstreamPtr->initializeDeviceInfo(mBitstreamPtr->getDeviceName());
98 mBitstreamPtr->initializeFrameMaps();
109 std::cout <<
"Unsupported tile type count " << mUnsupportedTileTypeSet.size() << std::endl;
110 for(std::set<std::string>::iterator iter = mUnsupportedTileTypeSet.begin(); iter != mUnsupportedTileTypeSet.end(); iter++) {
111 std::cout <<
" " << *iter << std::endl;
113 std::cout <<
"Unsupported tile count : " << mUnsupportedTileCount << std::endl;
114 std::cout <<
"Unsupported pip count : " << mUnsupportedPipCount << std::endl;
115 std::cout <<
"Missing configs of supported tiles : " << mMissingConfigs << std::endl;
125 std::cout <<
"Assembling micro-bitstream for instances... count: " << mDesignPtr->getInstanceCount() <<
128 InstanceSharedPtrVector::const_iterator pInstance = mDesignPtr->instancesBegin();
129 InstanceSharedPtrVector::const_iterator eInstance = mDesignPtr->instancesEnd();
132 while(pInstance != eInstance) {
135 string siteType = instancePtr->getType();
139 const string &siteName = instancePtr->getSite();
140 if(siteName.empty()) {
141 std::cout <<
" WARNING: Unplaced instance " << instancePtr->getName() << endl;
144 const string &tileType = getTiletypeFromSitename(siteName);
145 std::cout <<
" Processing instance " << instancePtr->getName() <<
" placed on site "
146 << siteName <<
" in tile " << tileType <<
" with " << instancePtr->getConfigCount() <<
" configs set."
149 getAnnotatedSiteTypeForSlicel(siteType, siteName);
150 if(!tileAndSiteExistInLibrary(tileType, siteType))
153 initializeFrameDataForSite(siteName);
157 assembleRamb(instancePtr);
168 while(pConfig != eConfig) {
171 if(isRoutethrough(pConfig->first)) {
181 mergeLutEquationBits(pConfig->first, pConfig->second.getValue(), configSettingToValuesMap);
186 else if(isCompoundSetting(pConfig->first)) {
188 instancePtr, configSettingToValuesMap);
190 else if(isConfigValHexString(instancePtr->getType(), pConfig->first)) {
191 mergeHexConfigBits(pConfig->first, pConfig->second.getValue(), configSettingToValuesMap);
195 configSettingToValuesMap);
212 NetSharedPtrVector::const_iterator pNets = mDesignPtr->netsBegin();
213 NetSharedPtrVector::const_iterator eNets = mDesignPtr->netsEnd();
215 std::cout <<
"Assembling micro-bitstreams for Nets... count: " << mDesignPtr->getNetCount()
218 while(pNets != eNets) {
226 while(pPips != ePips) {
230 initializeFrameDataForTile(tileIndex);
232 const TileInfo& tileInfo = mTiles.getTileInfo(tileIndex);
233 string tileType = mTiles.getTileTypeName(tileInfo.
getTypeIndex());
234 if(!tileAndSiteExistInLibrary(tileType,
"routing")) {
235 mUnsupportedPipCount++;
242 configSettingToValuesMap);
262 const string &tileType = getTiletypeFromSitename(inInstancePtr->getSite());
267 string memoryMapFileName = mParentFamilyName +
"-" + tileType +
"-map.bits";
268 string rambMemoryMapFilePath = mLibraryPath.string() +
"/memory/" + memoryMapFileName;
269 std::ifstream rambMemoryBitFile(rambMemoryMapFilePath.c_str(), std::ios::binary);
270 if(!rambMemoryBitFile.is_open()) {
271 std::cout <<
"Could not open bram memory map file " << rambMemoryMapFilePath << std::endl;
275 std::vector<uint32_t> bitAddresses;
276 uint32_t count = 0, bitAddress = 0;
277 while(!rambMemoryBitFile.eof()) {
279 rambMemoryBitFile.read((
char *) &count, 4);
280 rambMemoryBitFile.read((
char *) &bitAddress, 4);
281 bitAddress = ntohl(bitAddress);
282 bitAddresses.push_back(bitAddress);
284 rambMemoryBitFile.close();
287 string parMapFileName = mParentFamilyName +
"-" + tileType +
"-map-par.bits";
288 string rambParityBitFilePath = mLibraryPath.string() +
"/memory/" + parMapFileName;
289 std::ifstream rambParityBitFile(rambParityBitFilePath.c_str(), std::ios::binary);
290 if(!rambParityBitFile.is_open()) {
291 std::cerr <<
"ERROR: Could not open file " << rambParityBitFilePath << std::endl;
294 std::vector<uint32_t> parityBitAddresses;
295 count = 0, bitAddress = 0;
296 while(!rambParityBitFile.eof()) {
297 rambParityBitFile.read((
char *) &count, 4);
298 rambParityBitFile.read((
char *) &bitAddress, 4);
299 bitAddress = ntohl(bitAddress);
300 parityBitAddresses.push_back(bitAddress);
302 rambParityBitFile.close();
305 mergeWithBaseBitstream(configSettingToValuesMap[inInstancePtr->getType()][
"BASE"], 0);
310 while(pConfig != eConfig) {
312 std::cout <<
"\tWorking on config " << pConfig->first <<
"::"
313 << pConfig->second.getValue() << std::endl;
322 uint32_t memoryInitRow;
323 ssRow << std::hex << pConfig->first.substr(pConfig->first.length() - 2, 2);
324 ssRow >> memoryInitRow;
331 uint32_t memoryInitRow;
332 ssRow << std::hex << pConfig->first.substr(pConfig->first.length() - 2, 2);
333 ssRow >> memoryInitRow;
334 mergeRambInitBits(pConfig->second.getValue(), memoryInitRow, parityBitAddresses, 1);
345 string Assembler::getTiletypeFromSitename(
const string &inSiteName) {
346 SiteIndex siteIndex = mSites.findSiteIndex(inSiteName);
347 const Site& site = mSites.getSite(siteIndex);
349 const TileInfo& tileInfo = mTiles.getTileInfo(tileIndex);
350 string tileType = mTiles.getTileTypeName(tileInfo.
getTypeIndex());
360 ConfigSettingsToValues::const_iterator pConfigSettings = inConfigSettingToValues.find(inElementName);
362 if(pConfigSettings != inConfigSettingToValues.end()) {
363 ConfigValuesToBits::const_iterator pConfigValues = pConfigSettings->second.find(inConfigVal);
365 if(pConfigValues != pConfigSettings->second.end()) {
367 mergeWithBaseBitstream(pConfigValues->second, 0);
370 std::cout <<
"WARNING: Config value " << inConfigVal <<
" for setting " << inElementName
371 <<
" not found in library." << std::endl;
375 std::cout <<
"WARNING: Config setting " << inElementName <<
" not found in library." << std::endl;
382 ConfigSettingsToValues::iterator pConfigSettings = inConfigSettingToValues.find(inElementName);
383 if(pConfigSettings != inConfigSettingToValues.end()) {
386 ConfigValuesToBits::iterator pConfigValues = pConfigSettings->second.find(inConfigValue);
387 if(pConfigValues != pConfigSettings->second.end())
390 std::cout <<
"WARNING: Config setting " << inElementName <<
" with value " << inConfigValue
391 <<
" not found in library" << std::endl;
396 void Assembler::getAnnotatedSiteTypeForSlicel(
string &inOutSiteType,
const string &siteLocation) {
398 if(boost::regex_search(inOutSiteType.begin(), inOutSiteType.end(), boost::regex(
"SLICEL"))){
400 boost::smatch matchResults;
401 boost::regex columnExpr(
"_X(\\d+)Y");
402 if(boost::regex_search(siteLocation, matchResults, columnExpr)) {
404 int column = boost::lexical_cast<
int>(matchResults[1]);
406 inOutSiteType = inOutSiteType +
"E";
408 inOutSiteType = inOutSiteType +
"O";
420 void Assembler::mergeLutEquationBits(
const string &inElementName,
const string &inConfigValue,
424 std::vector<string> splitVector;
425 boost::algorithm::split(splitVector, inConfigValue, boost::algorithm::is_any_of(
"="));
429 mLutCurrentEquationLhs = splitVector[0];
430 string equationRight = splitVector[1];
433 string lutEquationForOne = mLutCurrentEquationLhs +
"=1";
438 mCurrentConfigToBitMap = inConfigSettingToValues[inElementName];
439 std::vector<uint32_t> bitAddressesForOne = mCurrentConfigToBitMap[lutEquationForOne];
441 mLutCurrentReferenceFrameIndex = bitAddressesForOne[0] >> 16;
442 mCurrentReferenceWordIndex = (bitAddressesForOne[0] & 0x0000FF00) >> 8;
444 mLutFrameSetForOne.clear();
445 mLutFrameSetForOne.resize(4, uint32_t(0));
446 for(std::vector<uint32_t>::const_iterator bitIter = bitAddressesForOne.begin(); bitIter
447 != bitAddressesForOne.end(); bitIter++) {
448 int32_t bitIndex = (*bitIter) & 0x000000FF;
449 int32_t frameIndex = (*bitIter) >> 16;
450 uint32_t frameWord = 1 << (bitIndex - 1);
452 mLutFrameSetForOne[frameIndex - mLutCurrentReferenceFrameIndex]
453 = mLutFrameSetForOne[frameIndex - mLutCurrentReferenceFrameIndex] | frameWord;
456 if(!processLut(equationRight.c_str(), inConfigValue)) {
457 std::cout <<
"ERROR: Error in parsing LUT equation " << inConfigValue << std::endl;
463 std::vector<uint32_t> combinedLUTWords = mLutFrameSetStack[0];
464 std::vector<uint32_t> bitAddresses;
465 uint32_t frameOffset = 0;
466 for(std::vector<uint32_t>::const_iterator wordIter = combinedLUTWords.begin(); wordIter
467 != combinedLUTWords.end(); wordIter++, frameOffset++) {
469 uint32_t tempWord = *wordIter;
470 uint32_t bitIndex = 1;
471 while(tempWord != 0) {
476 bitAddresses.push_back(((mLutCurrentReferenceFrameIndex + frameOffset) << 16)
477 | (mCurrentReferenceWordIndex << 8) | bitIndex);
479 tempWord = tempWord >> 1;
484 mergeWithBaseBitstream(bitAddresses, 0);
485 mLutFrameSetStack.clear();
499 std::vector<string> splitVector;
500 boost::algorithm::split(splitVector, inConfigVal, boost::algorithm::is_any_of(
"="));
502 string memoryValue = splitVector[1].substr(2);
504 if(memoryValue.length() != 8 && memoryValue.length() != 16) {
505 std::cout <<
"WARNING: Illegal configuration of element " << inElementName << std::endl;
511 if(memoryValue.length() == 8) {
512 memoryValue =
"00000000" + memoryValue;
519 string elementNameForMemoryMode = inElementName.substr(0, 1);
520 std::vector<uint32_t> bitAddressesForROM;
525 bitAddressesForROM = inConfigSettingToValues[elementNameForMemoryMode][
"ROM"];
526 std::vector<uint32_t> bitAddresses;
528 for(uint32_t charIndex = 0; charIndex < memoryValue.length(); charIndex++) {
530 stringstream sshexChar;
531 sshexChar << std::hex << memoryValue[charIndex];
533 sshexChar >> hexDigit;
535 for(
int bitIndex = 0; hexDigit != 0; bitIndex++) {
537 uint32_t memoryAddress = (charIndex << 2) + bitIndex;
538 stringstream ssConfigBitIndex;
539 ssConfigBitIndex << memoryAddress;
540 bitAddresses.push_back(bitAddressesForROM[memoryAddress]);
542 hexDigit = hexDigit << 1;
545 mergeWithBaseBitstream(bitAddresses, 0);
553 std::vector<string> compoundElements = getDependantConfigs(inElement1Name);
556 if(compoundElements.size() != 1) {
558 <<
"WARNING: Compound setting with more than two configurations not handled currently"
565 std::string compoundElementName = inElement1Name + element2Name;
569 inInstancePtr->getConfig(element2Name, config2Name, config2Val);
572 if(config2Val.compare(sConfigOff) == 0) {
573 std::cout <<
"Illegal configuration. Element " << element2Name <<
" must be set "
574 <<
" along with element " << inElement1Name << std::endl;
579 std::string compoundConfigVal = inConfig1Val + config2Val;
590 void Assembler::mergeHexConfigBits(
string inElementName,
string inConfigVal,
592 std::vector<uint32_t> inBitAddresses;
595 for(uint32_t charIndex = 0; charIndex < inConfigVal.length(); charIndex++) {
596 stringstream sshexChar;
597 sshexChar << std::hex << inConfigVal[inConfigVal.length() - charIndex - 1];
599 sshexChar >> hexDigit;
601 for(
int bitIndex = 0; hexDigit != 0; bitIndex++) {
603 int configBitIndex = (charIndex << 2) + bitIndex;
604 stringstream ssConfigBitIndex;
605 ssConfigBitIndex << configBitIndex;
608 hexDigit = hexDigit >> 1;
615 const vector<uint32_t> &inRamBitAddress, uint32_t inBlock) {
617 vector<uint32_t> bitAddresses;
619 uint32_t configValLength = inConfigVal.length();
620 uint32_t numBitsPerConfig = configValLength << 2;
623 for(uint32_t charIndex = 0; charIndex < configValLength; charIndex++) {
627 hexDigit = hexCharacterToDec(inConfigVal[configValLength - charIndex - 1]);
630 for(
int bitIndex = 0; hexDigit != 0; bitIndex++) {
633 uint32_t configBitIndex = (charIndex << 2) + bitIndex;
634 uint32_t memoryAddress = inMemoryInitRow * numBitsPerConfig + configBitIndex;
636 bitAddresses.push_back(inRamBitAddress[memoryAddress]);
638 hexDigit = hexDigit >> 1;
641 mergeWithBaseBitstream(bitAddresses, inBlock);
648 std::ifstream libDB(inLibDBPath.string().c_str(), std::ios::binary);
650 std::cout <<
"Could not open micro-bitstream DB file " << inLibDBPath.string() << std::endl;
651 libDB.exceptions(std::ios::failbit);
654 std::cout <<
"Opened micro-bitstream DB file " << inLibDBPath.string() << std::endl;
656 libDB.read(buffer, 16);
658 string libDBSanity(buffer);
659 std::cout <<
"Sanity string " << libDBSanity << std::endl;
660 if(libDBSanity !=
"<<<<BITLIBDB>>>>") {
661 std::cout <<
"This file seems to be currupt- " << inLibDBPath.string() << std::endl;
664 uint32_t tileTypeCount = 0;
665 readWord(libDB, tileTypeCount);
666 std::cout <<
"Tile type count " << tileTypeCount << std::endl;
668 for(uint32_t tileIndex = 0; tileIndex < tileTypeCount; tileIndex++) {
669 uint32_t tileNameCharCount = 0;
670 readWord(libDB, tileNameCharCount);
671 libDB.read(buffer, tileNameCharCount);
672 buffer[tileNameCharCount] =
'\0';
673 string tileType(buffer);
674 uint32_t sitetypeCount = 0;
675 readWord(libDB, sitetypeCount);
676 std::cout <<
"Tile type: " << tileType <<
". Site count: " << sitetypeCount << std::endl;
681 for(uint32_t sitetypeIndex = 0; sitetypeIndex < sitetypeCount; sitetypeIndex++) {
683 uint32_t sitetypeCharCount = 0;
684 readWord(libDB, sitetypeCharCount);
685 libDB.read(buffer, sitetypeCharCount);
686 buffer[sitetypeCharCount] =
'\0';
687 string sitetype(buffer);
689 uint32_t configSettingCount = 0;
690 readWord(libDB, configSettingCount);
696 for(uint32_t configSettingIndex = 0; configSettingIndex < configSettingCount; configSettingIndex++) {
697 uint32_t configSettingCharCount = 0;
698 readWord(libDB, configSettingCharCount);
700 libDB.read(buffer, configSettingCharCount);
701 buffer[configSettingCharCount] =
'\0';
702 string configSetting(buffer);
705 uint32_t configValuesCount = 0;
706 readWord(libDB, configValuesCount);
710 for(uint32_t configValueIndex = 0; configValueIndex < configValuesCount; configValueIndex++) {
711 uint32_t configValueCharCount = 0;
712 readWord(libDB, configValueCharCount);
713 libDB.read(buffer, configValueCharCount);
714 buffer[configValueCharCount] = 0;
715 string configValue(buffer);
717 uint32_t wordCount = 0;
718 readWord(libDB, wordCount);
719 std::vector<uint32_t> addresses;
721 for(uint32_t i = 0; i < wordCount; i++) {
722 readWord(libDB, word);
723 addresses.push_back(word);
725 configMap[configValue] = addresses;
728 configSettingToValues[configSetting] = configMap;
730 sitetypeToSettingsMap[sitetype] = configSettingToValues;
732 mLibrary[tileType] = sitetypeToSettingsMap;
737 void Assembler::saveBitstream() {
739 std::ofstream customBitstreamFile(mTargetBitstreamPath.string().c_str(), std::ios::binary);
740 std::cout <<
"Writing custom bitstream file " << mTargetBitstreamPath << std::endl;
741 mBitstreamPtr->write(customBitstreamFile);
743 customBitstreamFile.close();
751 std::cout <<
"In DoBinaryOperation " << inOperation << std::endl;
753 std::vector<uint32_t> lutWords1 = mLutFrameSetStack.back();
754 std::vector<uint32_t> lutWordsNew;
755 mLutFrameSetStack.pop_back();
756 std::vector<uint32_t> lutWords2;
757 if(inOperation == eOR || inOperation == eAND || inOperation == eXOR) {
758 lutWords2 = mLutFrameSetStack.back();
759 mLutFrameSetStack.pop_back();
760 }
else if(inOperation == eNOT) {
761 lutWords2 = mLutFrameSetForOne;
763 cout <<
"WARNING: Unknown LUT operation " << inOperation << std::endl;
766 std::vector<uint32_t>::const_iterator pWord1 = lutWords1.begin();
767 std::vector<uint32_t>::const_iterator eWord1 = lutWords1.end();
768 std::vector<uint32_t>::const_iterator pWord2 = lutWords2.begin();
769 std::vector<uint32_t>::const_iterator eWord2 = lutWords2.end();
770 if(inOperation == eOR) {
771 while(pWord1 != eWord1 && pWord2 != eWord2) {
772 lutWordsNew.push_back((*pWord1 | *pWord2));
776 }
else if(inOperation == eAND) {
777 while(pWord1 != eWord1) {
778 lutWordsNew.push_back((*pWord1 & *pWord2));
782 }
else if(inOperation == eXOR || inOperation == eNOT) {
783 while(pWord1 != eWord1) {
784 lutWordsNew.push_back((*pWord1 ^ *pWord2));
791 std::cout <<
"LUT frames after the logic " << std::endl;
792 for(std::vector<uint32_t>::const_iterator iter = lutWordsNew.begin(); iter
793 != lutWordsNew.end(); iter++) {
794 std::cout <<
" " <<
Hex32(*iter);
796 std::cout << std::endl;
799 mLutFrameSetStack.push_back(lutWordsNew);
803 void Assembler::pushLutFrame(
string inLiteral) {
807 std::cout <<
"In PushFrameToStack " << inLiteral << std::endl;
810 std::vector<uint32_t> bitAddresses = mCurrentConfigToBitMap[mLutCurrentEquationLhs +
"="
815 std::vector<uint32_t> lutWords(4, 0);
816 for(std::vector<uint32_t>::const_iterator bitIter = bitAddresses.begin(); bitIter
817 != bitAddresses.end(); bitIter++) {
818 int32_t bitIndex = (*bitIter) & 0x000000FF;
819 int32_t frameIndex = (*bitIter) >> 16;
820 uint32_t frameWord = 1 << (bitIndex - 1);
822 lutWords[frameIndex - mLutCurrentReferenceFrameIndex] |= frameWord;
826 for(std::vector<uint32_t>::const_iterator iter = lutWords.begin(); iter != lutWords.end(); iter++) {
827 std::cout <<
" " <<
Hex32(*iter);
829 std::cout << std::endl;
832 mLutFrameSetStack.push_back(lutWords);
835 bool Assembler::processLut(
const string& in,
const string& name) {
837 istringstream iss(in);
842 this->lexer = &scanner;
845 bool result = parser.
parse() == 0;
846 return mSuccess && result;
849 void Assembler::error(
const location& l,
const string& m) {
851 cerr << l <<
": " << m << std::endl;
854 void Assembler::error(
const string& m) {
856 cerr << m << std::endl;
Encapsulation of a tile index in an unsigned 32-bit integer.
void assembleInstances(DesignSharedPtr inDesignPtr, Bitstream &outBitstream, const Sites &sites, const Tiles &tiles, TiletypeElementMap &library)
torc::physical::DesignSharedPtr DesignSharedPtr
Imported type name.
std::map< const string, ConfigValuesToBits > ConfigSettingsToValues
Map from config setting to config values. ConfigSettingsToValues.
Header for the DirectoryTree class.
PipVector::const_iterator PipConstIterator
Constant iterator to Pip objects.
Main torc::bitstream namespace header.
void assembleNets(DesignSharedPtr inDesignPtr, Bitstream &outBitstream, const Sites &sites, const Tiles &tiles, TiletypeElementMap &library)
void convertXdlToBitstream(DesignSharedPtr inDesignPtr, Bitstream &outBitstream, const Sites &sites, const Tiles &tiles, TiletypeElementMap &library)
Header for the LutScanner class.
bool isMemoryParityInitSetting(const std::string &configName)
void mergeRambInitBits(const std::string &configVal, uint32_t memoryInitRow, Bitstream &outBitstream, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, const vector< uint32_t > &bitAddresses, uint32_t block)
Base class for Xdl to bitstream conversion. This class is abstract but still contains lot of architec...
void mergeCompoundSettingBits(std::string element1Name, std::string config1Val, InstanceSharedPtr instancePtr, const ElementConfigMap &elementMap, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, Bitstream &outBitstream)
const_iterator const_iterator
Constant iterator to {setting,Config} pairs.
EOperation
Permissible operations on LUT frames.
const WireName & getSinkWireName(void) const
Returns the pip sink wire.
bool isMemoryInitSetting(const std::string &configName)
Encapsulation of a device logic site.
Main torc::physical namespace header.
boost::filesystem::path path
Imported type name.
torc::physical::InstanceSharedPtr InstanceSharedPtr
Imported type name.
Encapsulation of a tile within a device tile map.
boost::shared_ptr< Net > NetSharedPtr
Shared pointer encapsulation of a Net.
TileIndex getTileIndex(void) const
Returns the index of the containing tile.
boost::filesystem::path path
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
void mergeLutRamOrRomBits(const std::string &elementName, const std::string &configVal, Bitstream &outBitstream, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, TiletypeElementMap &library)
const TileName & getTileName(void) const
Returns the pip tile.
static BitstreamSharedPtr newBitstreamPtr(const boost::filesystem::path &inPath)
bool isLutRamOrRomSetting(const std::string &configVal)
Physical design programmable interconnect point.
std::map< const string, ConfigSettingsToValues > SiteTypeToConfigSettings
Map from site type to config settings. SiteTypeToConfigSettings.
const WireName & getSourceWireName(void) const
Returns the pip source wire.
Encapsulation of a site index in an unsigned 32-bit integer.
bool isSiteTypeSupported(const std::string &siteType)
bool isRambSite(const std::string &siteType)
bool isLutEquationSetting(const std::string &configValue)
Header for the DDB class.
void set_debug(bool b)
Enables or disables debugging output.
bool elementAndConfigExistInLibrary(const std::string &elementName, const std::string &configValue, ElementConfigMap &elementMap)
static TiletypeElementMap populateLibraryMap(boost::filesystem::path libDBPath)
void set_debug_level(debug_level_type l)
Set the current debugging level.
static const boost::filesystem::path & getExecutablePath(void)
Returns the absolute path to the executable directory.
void checkValidityAndMergeBitstream(std::string elementName, std::string configVal, const ElementConfigMap &elementMap, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, Bitstream &outBitstream)
std::map< const string, std::vector< uint32_t > > ConfigValuesToBits
Map from config value to vector of config bits. ConfigValuesToBits.