torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
build/SharedFunctions.cpp
Go to the documentation of this file.
1 /*
2  * SharedFunctions.cpp
3  *
4  * Created on: Aug 9, 2012
5  * Author: rsoni
6  */
7 
8 #include "SharedFunctions.hpp"
9 
12 const std::string kFamily = "Virtex5";
13 const std::string kConfigOff = "#OFF";
14 const std::string kArchitectureName = "Virtex5";
15 const std::string kXDLExtension = ".xdl";
16 
17 // Some elements affect the bitstream together with other element settings.
19 
20  CompoundSettingMap::const_iterator pElement = gCompoundSettingsMap.find(elementName);
21  // If element found in the compound settings map
22  if(pElement != gCompoundSettingsMap.end()) {
23  return true;
24  }
25  return false;
26 }
27 
28 bool DSPMaskOrPatternConfig(const std::string &siteType, const std::string &elementName) {
29 
30  if(siteType.compare("DSP48E") == 0) {
31  if(elementName.compare("PATTERN") == 0 || elementName.compare("MASK") == 0) {
32  return true;
33  }
34  }
35  return false;
36 }
37 
39 
40  std::vector<std::string> acascregCompound;
41  acascregCompound.push_back("AREG");
42  gCompoundSettingsMap["ACASCREG"] = acascregCompound;
43 
44  std::vector<std::string> bcascregCompound;
45  bcascregCompound.push_back("BREG");
46  gCompoundSettingsMap["BCASCREG"] = bcascregCompound;
47 }
const std::string kConfigOff
const std::string kXDLExtension
std::map< const std::string, std::vector< std::string > > CompoundSettingMap
bool ElementNeedsCompoundSetting(std::string elementName)
const std::string kArchitectureName
void InitializeCompoundSettingsMap()
bool DSPMaskOrPatternConfig(const std::string &siteType, const std::string &elementName)
std::string string
const std::string kNameSeparator
const std::string kFamily
CompoundSettingMap gCompoundSettingsMap