torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SharedFunctions.cpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL: https://svn.east.isi.edu/torc/trunk/src/torc/bitstream/assembler/lut/parser.yy $
3 // $Id: parser.yy 1303 2013-02-25 23:18:16Z nsteiner $
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 #include "SharedFunctions.hpp"
17 
20 const std::string kFamily = "Virtex5";
21 const std::string kConfigOff = "#OFF";
22 const std::string kArchitectureName = "Virtex5";
23 const std::string kXDLExtension = ".xdl";
24 
25 // Some elements affect the bitstream together with other element settings.
27 
28  CompoundSettingMap::const_iterator pElement = gCompoundSettingsMap.find(elementName);
29  // If element found in the compound settings map
30  if(pElement != gCompoundSettingsMap.end()) {
31  return true;
32  }
33  return false;
34 }
35 
36 bool DSPMaskOrPatternConfig(const std::string &siteType, const std::string &elementName) {
37 
38  if(siteType.compare("DSP48E") == 0) {
39  if(elementName.compare("PATTERN") == 0 || elementName.compare("MASK") == 0) {
40  return true;
41  }
42  }
43  return false;
44 }
45 
47 
48  std::vector<std::string> acascregCompound;
49  acascregCompound.push_back("AREG");
50  gCompoundSettingsMap["ACASCREG"] = acascregCompound;
51 
52  std::vector<std::string> bcascregCompound;
53  bcascregCompound.push_back("BREG");
54  gCompoundSettingsMap["BCASCREG"] = bcascregCompound;
55 }
const std::string kXDLExtension
std::map< const std::string, std::vector< std::string > > CompoundSettingMap
void InitializeCompoundSettingsMap()
const std::string kNameSeparator
const std::string kArchitectureName
CompoundSettingMap gCompoundSettingsMap
std::string string
const std::string kFamily
bool DSPMaskOrPatternConfig(const std::string &siteType, const std::string &elementName)
bool elementNeedsCompoundSetting(std::string elementName)
const std::string kConfigOff