OpenASIP  2.0
ProGeOptions.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2017 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /*
25  * @file ProGeOptions.hh
26  *
27  * Declaration of ProGeOptions class.
28  *
29  * @author Lasse Lehtonen 2017.
30  */
31 
32 #pragma once
33 
34 #include "FileSystem.hh"
35 #include "ProGeCmdLineOptions.hh"
36 #include "ProGeTypes.hh"
37 #include <string>
38 #include <utility>
39 #include <vector>
40 
41 struct ProGeOptions {
42 
48  validate();
49  }
50 
53  bemFile(cmd.bemFile()), idfFile(cmd.idfFile()),
54  languageStr(cmd.hdl()), outputDirectory(cmd.outputDirectory()),
60  tpefName(cmd.tpefName()), entityName(cmd.entityName()),
64  deviceName(cmd.deviceName()),
75  validate();
76  }
77 
78  std::string processorToGenerate;
79  std::string bemFile;
80  std::string idfFile;
81  std::string languageStr;
83  std::string outputDirectory;
84  std::string sharedOutputDirectory;
85  std::string pluginParametersQuery;
87 
88  std::string integratorName;
89  std::string imemType;
90  std::string dmemType;
92  std::string tpefName;
93  std::string entityName;
96  std::string deviceFamilyName;
97  std::string deviceName;
98  std::string simulationRuntime;
100 
102  bool syncReset;
103  std::vector<std::string> hdbList;
104  std::vector<std::string> rfIcGateList;
105  std::vector<std::string> fuIcGateList;
106  std::vector<std::pair<std::string, std::string>> icdArgList;
109  std::vector<std::string> fuBackRegistered;
110  std::vector<std::string> fuFrontRegistered;
111  std::vector<std::string> fuMiddleRegistered;
112 
113 
114  void validate() {
115  if (outputDirectory.empty()) {
116  outputDirectory = "proge-output";
117  }
118  if (sharedOutputDirectory.empty()) {
120  }
124  if (entityName.empty()) {
125  entityName = "tta0";
126  }
127  if (languageStr == "verilog") {
129  } else {
131  }
132  if (hdbList.empty()) {
133  hdbList.emplace_back("generate_base32.hdb");
134  hdbList.emplace_back("generate_lsu_32.hdb");
135  hdbList.emplace_back("generate_rf_iu.hdb");
136  hdbList.emplace_back("asic_130nm_1.5V.hdb");
137 
138  }
139  }
140 };
ProGeOptions::fuIcGateList
std::vector< std::string > fuIcGateList
Definition: ProGeOptions.hh:105
ProGeCmdLineOptions.hh
FileSystem.hh
ProGeOptions::fuBackRegistered
std::vector< std::string > fuBackRegistered
Definition: ProGeOptions.hh:109
ProGe::Verilog
@ Verilog
Verilog.
Definition: ProGeTypes.hh:42
ProGeOptions::bemFile
std::string bemFile
Definition: ProGeOptions.hh:79
ProGeOptions
Definition: ProGeOptions.hh:41
ProGeOptions::outputDirectory
std::string outputDirectory
Definition: ProGeOptions.hh:83
ProGeOptions::syncReset
bool syncReset
Definition: ProGeOptions.hh:102
FileSystem::absolutePathOf
static std::string absolutePathOf(const std::string &pathName)
Definition: FileSystem.cc:303
ProGeOptions::preferHDLGeneration
bool preferHDLGeneration
Definition: ProGeOptions.hh:107
ProGeCmdLineOptions
Definition: ProGeCmdLineOptions.hh:43
ProGeOptions::dmemType
std::string dmemType
Definition: ProGeOptions.hh:90
ProGeOptions::idfFile
std::string idfFile
Definition: ProGeOptions.hh:80
ProGe::VHDL
@ VHDL
VHDL.
Definition: ProGeTypes.hh:41
ProGeOptions::fuMiddleRegistered
std::vector< std::string > fuMiddleRegistered
Definition: ProGeOptions.hh:111
ProGeOptions::language
ProGe::HDL language
Definition: ProGeOptions.hh:82
ProGeOptions::validate
void validate()
Definition: ProGeOptions.hh:114
ProGeOptions::fuFrontRegistered
std::vector< std::string > fuFrontRegistered
Definition: ProGeOptions.hh:110
ProGeOptions::ProGeOptions
ProGeOptions()
Definition: ProGeOptions.hh:43
ProGeOptions::forceOutputDirectory
bool forceOutputDirectory
Definition: ProGeOptions.hh:99
ProGeOptions::entityName
std::string entityName
Definition: ProGeOptions.hh:93
ProGeOptions::asyncReset
bool asyncReset
Definition: ProGeOptions.hh:101
ProGeOptions::generateTestbench
bool generateTestbench
Definition: ProGeOptions.hh:86
ProGeTypes.hh
FileSystem::expandTilde
static std::string expandTilde(const std::string &stringWithTilde)
Definition: FileSystem.cc:217
ProGeOptions::ProGeOptions
ProGeOptions(const ProGeCmdLineOptions &cmd)
Definition: ProGeOptions.hh:51
ProGeOptions::pluginParametersQuery
std::string pluginParametersQuery
Definition: ProGeOptions.hh:85
ProGeOptions::useAbsolutePaths
bool useAbsolutePaths
Definition: ProGeOptions.hh:94
ProGeOptions::imemType
std::string imemType
Definition: ProGeOptions.hh:89
ProGeOptions::listAvailableIntegrators
bool listAvailableIntegrators
Definition: ProGeOptions.hh:95
ProGeOptions::deviceName
std::string deviceName
Definition: ProGeOptions.hh:97
false
find Finds info of the inner loops in the false
Definition: InnerLoopFinder.cc:81
ProGeOptions::deviceFamilyName
std::string deviceFamilyName
Definition: ProGeOptions.hh:96
ProGeOptions::resetAllRegisters
bool resetAllRegisters
Definition: ProGeOptions.hh:108
ProGeOptions::icdArgList
std::vector< std::pair< std::string, std::string > > icdArgList
Definition: ProGeOptions.hh:106
ProGe::HDL
HDL
HDLs supported by ProGe.
Definition: ProGeTypes.hh:40
ProGeOptions::rfIcGateList
std::vector< std::string > rfIcGateList
Definition: ProGeOptions.hh:104
ProGeOptions::simulationRuntime
std::string simulationRuntime
Definition: ProGeOptions.hh:98
ProGeOptions::clockFrequency
int clockFrequency
Definition: ProGeOptions.hh:91
ProGeOptions::integratorName
std::string integratorName
Definition: ProGeOptions.hh:88
ProGeOptions::languageStr
std::string languageStr
Definition: ProGeOptions.hh:81
ProGeOptions::tpefName
std::string tpefName
Definition: ProGeOptions.hh:92
ProGeOptions::hdbList
std::vector< std::string > hdbList
Definition: ProGeOptions.hh:103
ProGeOptions::processorToGenerate
std::string processorToGenerate
Definition: ProGeOptions.hh:78
ProGeOptions::sharedOutputDirectory
std::string sharedOutputDirectory
Definition: ProGeOptions.hh:84