OpenASIP 2.2
Loading...
Searching...
No Matches
ProGeUI.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2011 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 ProGeUI.hh
26 *
27 * Declaration of ProGeUI class.
28 *
29 * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30 * @author Esa Määttä 2007 (esa.maatta-no.spam-tut.fi)
31 * @author Otto Esko 2008 (otto.esko-no.spam-tut.fi)
32 * @author Pekka Jääskeläinen 2011
33 * @note rating: red
34 */
35
36#ifndef TTA_PROGE_UI_HH
37#define TTA_PROGE_UI_HH
38
39#include <string>
40
41#include "TCEString.hh"
42#include "ProcessorGenerator.hh"
43#include "ProGeTypes.hh"
45#include "Exception.hh"
46#include "PluginTools.hh"
47#include "MemoryGenerator.hh"
48#include "ProGeOptions.hh"
49
50
51namespace TTAMachine {
52 class Machine;
53}
54
55namespace IDF {
56 class MachineImplementation;
57}
58
59class BinaryEncoding;
60
61namespace ProGe {
62
63/**
64 * Base class for user intefaces of ProGe.
65 */
66class ProGeUI {
67public:
68 virtual ~ProGeUI();
69
70 ProGeUI();
72 const ProGeOptions& options, int imemWidthInMAUs,
73 std::ostream& errorStream, std::ostream& warningStream,
74 std::ostream& verboseStream);
76 const ProGe::HDL language,
77 const std::string& dstDir,
78 const std::string& progeOutDir);
79 void generateScripts(
80 const ProGe::HDL language,
81 const std::string& dstDir,
82 const std::string& progeOutDir,
83 const std::string& sharedOutDir,
84 const std::string& testBenchDir,
85 const std::string& simulationRuntime);
86 void loadMachine(const TTAMachine::Machine& adf);
87 void loadBinaryEncoding(const BinaryEncoding& bem);
89protected:
90 void loadMachine(const std::string& adfFile);
91 void loadBinaryEncoding(const std::string& bemFile);
92 void loadMachineImplementation(const std::string& idfFile);
93 void loadProcessorConfiguration(const std::string& configurationFile);
95 const std::string& pluginFile, const std::string& pluginName);
96
98 std::ostream& warningStream, std::ostream& errorStream,
99 std::string progeOutDir, std::string sharedOutputDir,
100 const std::string& platformIntegrator,
101 const std::string& coreEntityName, const std::string& programName,
102 const std::string& deviceFamily, const std::string& deviceName,
103 MemType imem, MemType dmem, HDL language, int fmax, bool syncReset,
104 bool generateIntegratedTestbench);
105
106 /// The loaded machine.
108
109private:
110 void checkIfNull(void* nullPointer, const std::string& errorMsg);
111
112 void readLSUParameters(MemInfo& dmem) const;
113
114 void readImemParameters(MemInfo& imem) const;
115
116 void generateIDF(const ProGeOptions& options,
117 std::ostream& verboseStream);
118
119 /// The loaded binary encoding map.
121 /// The loaded machine implementation.
123 /// Tool for loading plugin.
125 /// The loaded IC/decoder generator plugin.
127 /// The plugin file.
128 std::string pluginFile_;
129 /// Name of the toplevel entity
130 std::string entityName_;
131
133
134 static const std::string DEFAULT_ENTITY_STR;
135};
136}
137
138#endif
static MachInfoCmdLineOptions options
Definition MachInfo.cc:46
TTAMachine::Machine * machine_
The loaded machine.
Definition ProGeUI.hh:107
void readLSUParameters(MemInfo &dmem) const
void generateIDF(const ProGeOptions &options, std::ostream &verboseStream)
Definition ProGeUI.cc:527
static const std::string DEFAULT_ENTITY_STR
Definition ProGeUI.hh:134
void loadBinaryEncoding(const BinaryEncoding &bem)
Definition ProGeUI.cc:170
ProcessorGenerator generator_
Definition ProGeUI.hh:132
std::string entityName_
Name of the toplevel entity.
Definition ProGeUI.hh:130
void generateScripts(const ProGe::HDL language, const std::string &dstDir, const std::string &progeOutDir, const std::string &sharedOutDir, const std::string &testBenchDir, const std::string &simulationRuntime)
Definition ProGeUI.cc:416
void loadICDecoderGeneratorPlugin(const std::string &pluginFile, const std::string &pluginName)
Definition ProGeUI.cc:239
void readImemParameters(MemInfo &imem) const
Definition ProGeUI.cc:514
BinaryEncoding * bem_
The loaded binary encoding map.
Definition ProGeUI.hh:120
void loadMachineImplementation(const IDF::MachineImplementation &idf)
Definition ProGeUI.cc:175
std::string pluginFile_
The plugin file.
Definition ProGeUI.hh:128
PluginTools pluginTool_
Tool for loading plugin.
Definition ProGeUI.hh:124
void generateProcessor(const ProGeOptions &options, int imemWidthInMAUs, std::ostream &errorStream, std::ostream &warningStream, std::ostream &verboseStream)
Definition ProGeUI.cc:298
virtual ~ProGeUI()
Definition ProGeUI.cc:103
void generateTestBench(const ProGe::HDL language, const std::string &dstDir, const std::string &progeOutDir)
Definition ProGeUI.cc:375
IDF::MachineImplementation * idf_
The loaded machine implementation.
Definition ProGeUI.hh:122
void integrateProcessor(std::ostream &warningStream, std::ostream &errorStream, std::string progeOutDir, std::string sharedOutputDir, const std::string &platformIntegrator, const std::string &coreEntityName, const std::string &programName, const std::string &deviceFamily, const std::string &deviceName, MemType imem, MemType dmem, HDL language, int fmax, bool syncReset, bool generateIntegratedTestbench)
Definition ProGeUI.cc:443
void loadProcessorConfiguration(const std::string &configurationFile)
Definition ProGeUI.cc:190
ICDecoderGeneratorPlugin * plugin_
The loaded IC/decoder generator plugin.
Definition ProGeUI.hh:126
void loadMachine(const TTAMachine::Machine &adf)
Definition ProGeUI.cc:165
void checkIfNull(void *nullPointer, const std::string &errorMsg)
Definition ProGeUI.cc:436
Definition FUGen.hh:54
HDL
HDLs supported by ProGe.
Definition ProGeTypes.hh:40