30 using namespace torc::architecture;
31 using namespace torc::packer;
32 using namespace torc::physical;
33 using namespace torc::bitstream;
63 const Sites &sites,
const Tiles & tiles, uint32_t &outWordOffset);
66 const Tiles & tiles, uint32_t &outWordOffset);
76 uint32_t blockIndex = 0);
97 uint32_t> &bitAddresses, uint32_t block);
101 return regex_match(configValue, kLUTConfigRegEx);
105 return regex_match(configVal, kLUTRAMorROMConfigRegEx);
109 return configName.length() == 7 && configName.substr(0, 5).compare(
"INIT_") == 0;
113 return configName.substr(0, 6).compare(
"INITP_") == 0;
117 TiletypeElementMap::iterator pLibrary = library.find(siteType);
118 return (pLibrary != library.end());
123 ElementConfigMap::iterator pElement = elementMap.find(elementName);
124 if(pElement != elementMap.end()) {
127 ConfigBitMap::iterator pConfig = pElement->second.find(configValue);
128 if(pConfig != pElement->second.end())
131 std::cout <<
"Element " << elementName <<
" with config " << configValue <<
" not found in library" << std::endl;
139 int main(
int argc,
char **argv) {
142 std::cerr <<
"Usage: " << argv[0] <<
" <XDL file path> <library path>" << std::endl;
151 std::fstream xdlFileStream(xdlFileName.c_str());
152 if(!xdlFileStream.good()) {
153 std::cout <<
"Could not open file " << xdlFileName << std::endl;
159 if(!boost::filesystem::exists(libraryPath)) {
160 std::cout <<
"Library folder - " << libraryPath.string() <<
" - does not exist "
170 importer(xdlFileStream, xdlFileName);
184 nullBTPath = nullBTPath / nullBitFileName;
185 if(!boost::filesystem::exists(nullBTPath)) {
186 std::cout <<
"Null bitstream file - " << nullBTPath.string() <<
" - does not exist."
194 if(!boost::filesystem::exists(libDBPath)) {
195 std::cout <<
"Library database file - " << libDBPath.string() <<
" - does not exist."
204 std::ifstream nullBitstream;
205 nullBitstream.open(nullBTPath.string().c_str());
208 bitstream.
read(nullBitstream);
220 std::ofstream customBitstreamFile(customBitstreamPath.c_str(), std::ios::binary);
221 std::cout <<
"Writing custom bitstream file " << customBitstreamPath << std::endl;
222 bitstream.
write(customBitstreamFile);
224 xdlFileStream.close();
225 customBitstreamFile.close();
235 assembleNets(inDesignPtr, outBitstream, sites, tiles, library);
238 Virtex5 *virtexBitstreamPtr =
dynamic_cast<Virtex5 *
>(&outBitstream);
239 if(virtexBitstreamPtr) {
250 std::cout <<
"Going through instances..." << std::endl;
252 InstanceSharedPtrVector::const_iterator pInstance = inDesignPtr->instancesBegin();
253 InstanceSharedPtrVector::const_iterator eInstance = inDesignPtr->instancesEnd();
256 while(pInstance != eInstance) {
259 const std::string &siteType = instancePtr->getType();
267 uint32_t wordOffset = 0;
269 sites, tiles, wordOffset);
271 std::cout <<
"Instance " << instancePtr->getName() <<
" placed on site "
272 << siteName <<
" has " << instancePtr->getConfigCount()
273 <<
" configs set." << std::endl;
278 wordOffset, library);
288 while(pConfig != eConfig) {
290 std::cout <<
"\tWorking on config " << pConfig->first <<
"::"
291 << pConfig->second.getValue() << std::endl;
295 mergeLutBits(pConfig->first, pConfig->second.getValue(), outBitstream,
296 frameBlocks, wordOffset, elementMap);
300 pConfig->second.getValue(), outBitstream, frameBlocks, wordOffset,
305 instancePtr, elementMap, frameBlocks, wordOffset, outBitstream);
309 instancePtr, elementMap, frameBlocks, wordOffset, outBitstream);
313 elementMap, frameBlocks, wordOffset, outBitstream);
315 std::cout <<
"\t------------------" << std::endl;
320 std::cout <<
"Site " << instancePtr->getType() <<
" not supported." << std::endl;
334 std::cout <<
" Instance " << instance->getName() <<
" has " << instance->getConfigCount()
335 <<
" configs set." << std::endl;
339 std::string rambBitFileName =
"library/memory/bram-map.bits";
340 std::ifstream rambBitFile(rambBitFileName.c_str(), std::ios::binary);
341 if(!rambBitFile.is_open()) {
342 std::cout <<
"Could not open file " << rambBitFileName << std::endl;
345 std::vector<uint32_t> bitAddresses;
346 uint32_t count = 0, bitAddress = 0;
347 while(!rambBitFile.eof()) {
349 rambBitFile.read((
char *) &count, 4);
350 rambBitFile.read((
char *) &bitAddress, 4);
351 bitAddress = ntohl(bitAddress);
352 bitAddresses.push_back(bitAddress);
357 std::string rambParityBitFileName =
"library/memory/bram-map-par.bits";
358 std::ifstream rambParityBitFile(rambParityBitFileName.c_str(), std::ios::binary);
359 if(!rambParityBitFile.is_open()) {
360 std::cout <<
"Could not open file " << rambParityBitFileName << std::endl;
363 std::vector<uint32_t> parityBitAddresses;
364 count = 0, bitAddress = 0;
365 while(!rambParityBitFile.eof()) {
366 rambParityBitFile.read((
char *) &count, 4);
367 rambParityBitFile.read((
char *) &bitAddress, 4);
368 bitAddress = ntohl(bitAddress);
369 parityBitAddresses.push_back(bitAddress);
371 rambParityBitFile.close();
375 frameBlocks, wordOffset);
380 while(pConfig != eConfig) {
382 std::cout <<
"\tBRAM Working on config " << pConfig->first <<
" value "
383 << pConfig->second.getValue() << std::endl;
390 std::stringstream ssRow;
391 uint32_t memoryInitRow;
392 ssRow << std::hex << pConfig->first.substr(pConfig->first.length() - 2, 2);
393 ssRow >> memoryInitRow;
396 outBitstream, frameBlocks, wordOffset, bitAddresses, 1);
400 std::stringstream ssRow;
401 uint32_t memoryInitRow;
402 ssRow << std::hex << pConfig->first.substr(pConfig->first.length() - 2, 2);
403 ssRow >> memoryInitRow;
405 outBitstream, frameBlocks, wordOffset, parityBitAddresses, 1);
409 frameBlocks, wordOffset, outBitstream);
411 std::cout <<
"------------------" << std::endl;
422 NetSharedPtrVector::const_iterator pNets = inDesignPtr->netsBegin();
423 NetSharedPtrVector::const_iterator eNets = inDesignPtr->netsEnd();
425 std::cout <<
"Working on NETs... count: " << inDesignPtr->getNetCount() << std::endl;
427 while(pNets != eNets) {
430 std::cout <<
"Net: " << netPtr->getName() << std::endl;
435 while(pPips != ePips) {
441 uint32_t wordOffset = 0;
446 std::cout <<
"\tTile " << tileInfo.
getName() <<
" Src: " << pPips->getSourceWireName()
449 elementMap, frameBlocks, wordOffset, outBitstream);
459 const Sites &sites,
const Tiles & tiles, uint32_t &outWordOffset) {
471 const Tiles & tiles, uint32_t &outWordOffset) {
477 Virtex5 *virtex5BitStream =
dynamic_cast<Virtex5 *
> (&inBitstream);
478 uint32_t bitIndexBegin = 0, bitIndexEnd = 0;
481 bitIndexBegin, bitIndexEnd);
487 if(bitIndexBegin != bitIndexEnd) {
488 outWordOffset = Virtex5::eFrameLength - (bitIndexEnd >> 5);
491 return returnFrameBlocks;
499 ElementConfigMap::const_iterator elementIter = elementMap.find(elementName);
501 if(elementIter != elementMap.end()) {
502 ConfigBitMap::const_iterator configIter = elementIter->second.find(configVal);
504 if(configIter != elementIter->second.end()) {
508 std::cout <<
"Config " << configVal <<
" for element " << elementName
509 <<
" not found in library." << std::endl;
512 std::cout <<
"Element " << elementName <<
" not found in library." << std::endl;
520 uint32_t blockIndex) {
522 int32_t numSetBits = bitAddresses.size();
523 std::cout <<
"\tNumber of bits set: " << numSetBits << std::endl;
526 if(!frameSet.empty()) {
527 for(
int i = 0; i < numSetBits; i++) {
528 uint32_t bitAddr = bitAddresses[i];
529 int32_t bitIndex = bitAddr & 0x000000FF;
530 int32_t wordIndex = (bitAddr & 0x0000FF00) >> 8;
532 wordIndex += wordOffset;
533 int32_t frameIndex = (bitAddr & 0xFFFF0000) >> 16;
534 std::cout <<
"\t Frame: " <<
Hex32(frameIndex) <<
" Word: " <<
Hex32(wordIndex)
535 <<
" bit: " <<
Hex32(bitIndex) << std::endl;
540 virtexFrame->setWord(wordIndex, word);
544 std::cout <<
"Unknown frame type." << std::endl;
556 std::vector<std::string> splitVector;
557 boost::algorithm::split(splitVector, configValue, boost::algorithm::is_any_of(
"="));
578 for(std::vector<uint32_t>::const_iterator bitIter = bitAddressesForOne.begin(); bitIter
579 != bitAddressesForOne.end(); bitIter++) {
580 int32_t bitIndex = (*bitIter) & 0x000000FF;
581 int32_t frameIndex = (*bitIter) >> 16;
582 uint32_t frameWord = 1 << (bitIndex - 1);
589 yy_scan_string(equationRight.c_str());
591 int parseResult = yyparse();
593 if(parseResult != 0) {
594 std::cout <<
"Error in parsing LUT equation " << configValue << std::endl;
600 std::vector<uint32_t> bitAddresses;
601 uint32_t frameOffset = 0;
602 for(std::vector<uint32_t>::const_iterator wordIter = combinedLUTWords.begin(); wordIter
603 != combinedLUTWords.end(); wordIter++, frameOffset++) {
605 uint32_t tempWord = *wordIter;
606 uint32_t bitIndex = 1;
607 while(tempWord != 0) {
615 tempWord = tempWord >> 1;
637 std::vector<std::string> splitVector;
638 boost::algorithm::split(splitVector, configVal, boost::algorithm::is_any_of(
"="));
640 std::string memoryValue = splitVector[1].substr(2);
642 if(memoryValue.length() != 8 && memoryValue.length() != 16) {
643 std::cout <<
"Error: Illegal configuration of element " << elementName << std::endl;
649 if(memoryValue.length() == 8) {
650 memoryValue =
"00000000" + memoryValue;
657 std::string elementNameForMemoryMode = elementName.substr(0, 1);
658 std::vector<uint32_t> bitAddressesForROM;
663 bitAddressesForROM = elementMap[elementNameForMemoryMode][
"ROM"];
664 std::vector<uint32_t> bitAddresses;
666 for(uint32_t charIndex = 0; charIndex < memoryValue.length(); charIndex++) {
668 std::stringstream sshexChar;
669 sshexChar << std::hex << memoryValue[charIndex];
671 sshexChar >> hexDigit;
673 for(
int bitIndex = 0; hexDigit != 0; bitIndex++) {
675 uint32_t memoryAddress = (charIndex << 2) + bitIndex;
676 std::stringstream ssConfigBitIndex;
677 ssConfigBitIndex << memoryAddress;
678 bitAddresses.push_back(bitAddressesForROM[memoryAddress]);
680 hexDigit = hexDigit << 1;
693 if(compoundElements.size() != 1) {
694 std::cout <<
"Compound setting with more than two elements not handled currently"
698 std::cout <<
"\tIt is a compound setting." << std::endl;
703 std::string compoundElementName = element1Name + element2Name;
707 instancePtr->getConfig(element2Name, config2Name, config2Val);
711 std::cout <<
"Illegal configuration. Element " << element2Name <<
" must be set "
712 <<
" along with element " << element1Name << std::endl;
717 std::string compoundConfigVal = config1Val + config2Val;
721 frameBlocks, wordOffset, outBitstream);
729 std::vector<uint32_t> bitAddresses;
732 for(uint32_t charIndex = 0; charIndex < configVal.length(); charIndex++) {
733 std::stringstream sshexChar;
734 sshexChar << std::hex << configVal[configVal.length() - charIndex - 1];
736 sshexChar >> hexDigit;
738 for(
int bitIndex = 0; hexDigit != 0; bitIndex++) {
740 int configBitIndex = (charIndex << 2) + bitIndex;
741 std::stringstream ssConfigBitIndex;
742 ssConfigBitIndex << configBitIndex;
744 frameBlocks, wordOffset, outBitstream);
746 hexDigit = hexDigit >> 1;
755 uint32_t> &ramBitAddress, uint32_t block) {
757 vector<uint32_t> bitAddresses;
759 uint32_t configValLength = configVal.length();
760 uint32_t numBitsPerConfig = configValLength << 2;
763 for(uint32_t charIndex = 0; charIndex < configValLength; charIndex++) {
764 std::stringstream sshexChar;
765 sshexChar << std::hex << configVal[configValLength - charIndex - 1];
767 sshexChar >> hexDigit;
769 for(
int bitIndex = 0; hexDigit != 0; bitIndex++) {
772 uint32_t configBitIndex = (charIndex << 2) + bitIndex;
773 uint32_t memoryAddress = memoryInitRow * numBitsPerConfig + configBitIndex;
775 bitAddresses.push_back(ramBitAddress[memoryAddress]);
777 hexDigit = hexDigit >> 1;
789 std::cout <<
"In PushFrameToStack " << literal << std::endl;
795 std::vector<uint32_t> lutWords(4, 0);
796 for(std::vector<uint32_t>::const_iterator bitIter = bitAddresses.begin(); bitIter
797 != bitAddresses.end(); bitIter++) {
798 int32_t bitIndex = (*bitIter) & 0x000000FF;
799 int32_t frameIndex = (*bitIter) >> 16;
800 uint32_t frameWord = 1 << (bitIndex - 1);
807 for(std::vector<uint32_t>::const_iterator iter = lutWords.begin(); iter != lutWords.end(); iter++) {
808 std::cout <<
" " <<
Hex32(*iter);
810 std::cout << std::endl;
822 std::cout <<
"In DoBinaryOperation " << operation << std::endl;
825 std::vector<uint32_t> lutWordsNew;
827 std::vector<uint32_t> lutWords2;
828 if(operation ==
"OR" || operation ==
"AND" || operation ==
"XOR") {
831 }
else if(operation ==
"NOT") {
834 cout <<
"Unknown operation " << operation << std::endl;
837 std::vector<uint32_t>::const_iterator pWord1 = lutWords1.begin();
838 std::vector<uint32_t>::const_iterator eWord1 = lutWords1.end();
839 std::vector<uint32_t>::const_iterator pWord2 = lutWords2.begin();
840 std::vector<uint32_t>::const_iterator eWord2 = lutWords2.end();
841 if(operation ==
"OR") {
842 while(pWord1 != eWord1 && pWord2 != eWord2) {
843 lutWordsNew.push_back((*pWord1 | *pWord2));
847 }
else if(operation ==
"AND") {
848 while(pWord1 != eWord1) {
849 lutWordsNew.push_back((*pWord1 & *pWord2));
853 }
else if(operation ==
"XOR" || operation ==
"NOT") {
854 while(pWord1 != eWord1) {
855 lutWordsNew.push_back((*pWord1 ^ *pWord2));
862 std::cout <<
"LUT frames after the logic " << std::endl;
863 for(std::vector<uint32_t>::const_iterator iter = lutWordsNew.begin(); iter
864 != lutWordsNew.end(); iter++) {
865 std::cout <<
" " <<
Hex32(*iter);
867 std::cout << std::endl;
876 return (siteType.compare(
"SLICEL") == 0 || siteType.compare(
"SLICEM") == 0 || siteType.compare(
877 "RAMB36_EXP") == 0 || siteType.compare(
"DSP48E") == 0);
882 if(siteType.length() > 3) {
883 return siteType.substr(0, 4).compare(
"RAMB") == 0;
891 std::ifstream libDB(libDBPath.string().c_str(), std::ios::binary);
893 std::cout <<
"Could not open DB file " << libDBPath.string() << std::endl;
894 libDB.exceptions(std::ios::failbit);
897 std::cout <<
"Opened DB file " << libDBPath.string() << std::endl;
899 libDB.read(buffer, 16);
902 std::cout <<
"Sanity string " << libDBSanity << std::endl;
903 if(libDBSanity !=
"<<<<BITLIBDB>>>>") {
904 std::cout <<
"This file seems to be currupt- " << libDBPath.string() << std::endl;
907 uint32_t tileTypeCount = 0;
908 libDB.read((
char *) &tileTypeCount,
sizeof(uint32_t));
909 std::cout <<
"Tile type count " << tileTypeCount << std::endl;
910 for(uint32_t tileIndex = 0; tileIndex < tileTypeCount; tileIndex++) {
911 uint32_t tileNameCharCount = 0;
912 libDB.read((
char *) &tileNameCharCount, 4);
913 libDB.read(buffer, tileNameCharCount);
914 buffer[tileNameCharCount] =
'\0';
916 uint32_t elementCount = 0;
917 libDB.read((
char *) &elementCount, 4);
923 for(uint32_t elementIndex = 0; elementIndex < elementCount; elementIndex++) {
925 uint32_t elementCharCount = 0;
926 libDB.read((
char *) &elementCharCount, 4);
927 libDB.read(buffer, elementCharCount);
928 buffer[elementCharCount] =
'\0';
931 uint32_t configCount = 0;
932 libDB.read((
char *) &configCount, 4);
939 for(uint32_t configIndex = 0; configIndex < configCount; configIndex++) {
940 uint32_t configCharCount = 0;
941 libDB.read((
char *) &configCharCount, 4);
943 libDB.read(buffer, configCharCount);
944 buffer[configCharCount] =
'\0';
949 uint32_t wordCount = 0;
950 libDB.read((
char *) &wordCount, 4);
951 std::vector<uint32_t> words;
953 for(uint32_t i = 0; i < wordCount; i++) {
954 libDB.read((
char *) &word, 4);
956 words.push_back(word);
958 configMap[config] = words;
960 elementMap[element] = configMap;
963 tileMap[tileType] = elementMap;
const std::string kConfigOff
virtual void initializeFrameMaps(void)
Initialize the maps between frame indexes and frame addresses.
void MergeCompressedBitToMainBits(const std::vector< uint32_t > &bitAddresses, Bitstream &outBitstream, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, uint32_t blockIndex=0)
Encapsulation of a tile index in an unsigned 32-bit integer.
const TileCol & getCol(void) const
Returns the column for this tile.
Encapsulation of a tile row in an unsigned 16-bit integer.
static vector< vector< uint32_t > > gStackOfFrames
const TileRow & getRow(void) const
Returns the row for this tile.
void assembleInstances(DesignSharedPtr inDesignPtr, Bitstream &outBitstream, const Sites &sites, const Tiles &tiles, TiletypeElementMap &library)
Encapsulation of a tile column in an unsigned 16-bit integer.
void mergeDspMaskOrPattern(std::string elementName, std::string configVal, InstanceSharedPtr instancePtr, const ElementConfigMap &elementMap, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, Bitstream &outBitstream)
bool siteExistsInLibrary(const std::string &siteType, TiletypeElementMap &library)
Device database, including complete wiring and logic support.
static std::string gLUTEquationLeft
static ConfigBitMap gcurrentConfigBitMap
const string & getFamilyName(void) const
Returns the family name.
Header for the Virtex5PrimitiveStructure class.
DesignSharedPtr getDesignPtr(void)
Returns a shared pointer for the design.
Header for the DirectoryTree class.
PipVector::const_iterator PipConstIterator
Constant iterator to Pip objects.
const Tiles & getTiles(void) const
Returns a constant reference to the family and device tile data.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
Main torc::bitstream namespace header.
static uint32_t gCUrrentReferenceWordIndex
void assembleNets(DesignSharedPtr inDesignPtr, Bitstream &outBitstream, const Sites &sites, const Tiles &tiles, TiletypeElementMap &library)
const string & getDeviceName(void) const
Return the device name.
void convertXdlToBitstream(DesignSharedPtr inDesignPtr, Bitstream &outBitstream, const Sites &sites, const Tiles &tiles, TiletypeElementMap &library)
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)
void InitializeCompoundSettingsMap()
void DoBinaryOperation(std::string operation)
const Sites & getSites(void) const
Returns a constant reference to the family and device site data.
bool DSPMaskOrPatternConfig(const std::string &siteType, const std::string &elementName)
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.
void setDesignName(const string &inDesignName)
Set the design name.
bool isMemoryInitSetting(const std::string &configName)
static uint32_t gCurrentReferenceFrameIndex
Xilinx bitstream base class.
VirtexFrameBlocks GetFrameBlocksFromTileIndex(Bitstream &inBitstream, TileIndex tileIndex, const Tiles &tiles, uint32_t &outWordOffset)
Encapsulation of a device logic site.
Main torc::physical namespace header.
Site type and population data for the family and the device.
std::map< const std::string, std::vector< uint32_t > > ConfigBitMap
int main(int argc, char **argv)
Converts XDL file to bitstream by merging primitive bitstreams from library.
void assembleRambInstance(InstanceSharedPtr instance, Bitstream &outBitstream, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, TiletypeElementMap &library)
Tile map, tile type, and wire information for the family and device.
Encapsulation of filesystem paths that are used by the library.
DEPRECATED void updateFullFrameBlocks(void)
Transfers frame block data into the full bitstream frame packet.
FrameSet< FRAME_TYPE > mBlock[Bitstream::eBlockTypeCount]
FrameSets for each of the eight block types.
Encapsulation of a tile within a device tile map.
boost::shared_ptr< Net > NetSharedPtr
Shared pointer encapsulation of a Net.
static std::vector< uint32_t > gLUTWordsForOne(4, 0xFFFFFFFF)
const char * getTileTypeName(TileTypeIndex inTileTypeIndex) const
Returns the tile type name for the given tile type index.
void mergeLutBits(const std::string &elementName, const std::string &configValue, Bitstream &outBitstream, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, ElementConfigMap &elementMap)
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.
boost::filesystem::path path
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
VirtexFrameBlocks getXdlFrames(uint32_t inXdlRow, uint32_t inXdlCol, uint32_t &outBeginBit, uint32_t &outEndBit, uint32_t inBlockCount=eBlockTypeCount)
Returns frames for specified XDL tile coordinates. inXldRow The XDL row coordinate. inXdlCol The XDL column coordinate. outBeginBit The bit index of the beginning of the requested tile. outEndBit The bit index of the end of the requested tile. inBlockCount The highest block type requested (8 for Xilinx architectures).
void mergeLutRamOrRomBits(const std::string &elementName, const std::string &configVal, Bitstream &outBitstream, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, TiletypeElementMap &library)
boost::shared_ptr< Design > DesignSharedPtr
Shared pointer encapsulation of a Design.
const Site & getSite(SiteIndex inSiteIndex) const
Returns the site for the specified index.
std::map< const std::string, ElementConfigMap > TiletypeElementMap
TileIndex findTileIndex(const string &inName) const
Returns the tile index for the given tile name.
void PushFrameToStack(std::string literal)
bool isLutRamOrRomSetting(const std::string &configVal)
DEPRECATED void initializeFullFrameBlocks(void)
Loads full bitstream frames into block data structure.
void write(std::ostream &inStream, uint8_t inVal)
Write a uint8_t to the stream.
CompoundSettingMap gCompoundSettingsMap
boost::shared_ptr< VirtexFrame > VirtexFrameSharedPtr
Virtex frame type.
Encapsulation of a site index in an unsigned 32-bit integer.
bool isSiteTypeSupported(const std::string &siteType)
bool isRambSite(const std::string &siteType)
const char * getName(void) const
Returns the name for this tile.
bool isLutEquationSetting(const std::string &configValue)
Header for the DDB class.
Importer from XDL format into a physical design.
bool elementAndConfigExistInLibrary(const std::string &elementName, const std::string &configValue, ElementConfigMap &elementMap)
VirtexFrameBlocks GetFrameBlocksFromSiteName(Bitstream &inBitstream, const std::string &siteName, const Sites &sites, const Tiles &tiles, uint32_t &outWordOffset)
virtual void read(std::istream &inStream, bool inCleanDateAndTime=true)
Read the bitstream header and packets from a stream.
bool elementNeedsCompoundSetting(std::string elementName)
uint32_t getPrimaryXdlColumn(uint32_t inXdlCol)
Returns the primary column corresponding to the given column. If immediately to the left of a BRAM...
static TiletypeElementMap populateLibraryMap(boost::filesystem::path libDBPath)
void checkValidityAndMergeBitstream(std::string elementName, std::string configVal, const ElementConfigMap &elementMap, VirtexFrameBlocks &frameBlocks, uint32_t wordOffset, Bitstream &outBitstream)
WORD_TYPE word_t
Frame word type.
std::map< const std::string, ConfigBitMap > ElementConfigMap
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the device information.