OpenASIP  2.0
ProGeContext.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2015 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 ProGeContext.hh
26  *
27  * Declaration of ProGeContext class.
28  *
29  * Created on: 9.6.2015
30  * @author Henry Linjamäki 2015 (henry.linjamaki-no.spam-tut.fi)
31  * @note rating: red
32  */
33 
34 #ifndef PROGECONTEXT_HH
35 #define PROGECONTEXT_HH
36 
37 #include <string>
38 #include <memory>
39 
40 #include "ProGeTypes.hh"
41 
42 #include "Machine.hh"
43 #include "MachineImplementation.hh"
44 
45 namespace TTAMachine {
46  class Machine;
47 }
48 
49 namespace IDF {
50  class MachineImplementation;
51 }
52 
53 namespace ProGe {
54 
55 class GlobalPackage;
56 
57 /*
58  * Class that bundles all information that are needed to processor generation.
59  */
60 class ProGeContext {
61 public:
62  ProGeContext() = delete;
64  const TTAMachine::Machine& adf,
66  const std::string& progeOutputDirectory,
67  const std::string& sharedOutputDirectory,
68  const std::string& coreEntityName,
69  HDL targetHDL,
70  int imemWidthInMAUs);
71 
72  virtual ~ProGeContext();
73 
74  const TTAMachine::Machine& adf() const;
75  const IDF::MachineImplementation& idf() const;
76  const std::string& outputDirectory() const;
77  const std::string& sharedDeirectory() const;
78  const std::string& coreEntityName() const;
79  HDL targetHDL() const;
80 
81  const GlobalPackage& globalPackage() const;
82 
83 
84 private:
85 
86  /// The ADF.
88  /// The IDF.
90  /// The target base directory under where generated files are placed.
91  const std::string& progeOutputDirectory_;
92  /// The target base directory for files that are shared across multiple
93  /// TTAs.
94  const std::string& sharedOutputDirectory_;
95  /// The entity name of the cores.
96  const std::string entityName_;
97  /// The target language of generated files.
99  // The instruction fetch block width in MAUs.
100  //int imemWidthInMAUs_;
101  /// The package that defines (multi)core wide constants.
102  std::unique_ptr<GlobalPackage> globalPackage_;
103 
104 };
105 
106 } /* namespace ProGe */
107 
108 #endif /* PROGECONTEXT_HH */
ProGe::ProGeContext::progeOutputDirectory_
const std::string & progeOutputDirectory_
The target base directory under where generated files are placed.
Definition: ProGeContext.hh:91
ProGe::ProGeContext::targetHDL
HDL targetHDL() const
Definition: ProGeContext.cc:82
ProGe::ProGeContext::globalPackage_
std::unique_ptr< GlobalPackage > globalPackage_
The package that defines (multi)core wide constants.
Definition: ProGeContext.hh:102
ProGe::ProGeContext::adf
const TTAMachine::Machine & adf() const
Definition: ProGeContext.cc:57
ProGe::GlobalPackage
Definition: GlobalPackage.hh:45
ProGe::ProGeContext::outputDirectory
const std::string & outputDirectory() const
Definition: ProGeContext.cc:67
ProGe::ProGeContext::adf_
const TTAMachine::Machine & adf_
The ADF.
Definition: ProGeContext.hh:87
ProGe::ProGeContext::sharedOutputDirectory_
const std::string & sharedOutputDirectory_
The target base directory for files that are shared across multiple TTAs.
Definition: ProGeContext.hh:94
ProGe::ProGeContext::globalPackage
const GlobalPackage & globalPackage() const
Definition: ProGeContext.cc:87
ProGe::ProGeContext::idf
const IDF::MachineImplementation & idf() const
Definition: ProGeContext.cc:62
ProGe::ProGeContext::entityName_
const std::string entityName_
The entity name of the cores.
Definition: ProGeContext.hh:96
ProGe::ProGeContext::~ProGeContext
virtual ~ProGeContext()
Definition: ProGeContext.cc:54
Machine.hh
ProGe::ProGeContext::coreEntityName
const std::string & coreEntityName() const
Definition: ProGeContext.cc:77
ProGeTypes.hh
ProGe::ProGeContext::hdl_
HDL hdl_
The target language of generated files.
Definition: ProGeContext.hh:98
ProGe::ProGeContext::sharedDeirectory
const std::string & sharedDeirectory() const
Definition: ProGeContext.cc:72
ProGe
Definition: FUGen.hh:54
ProGe::ProGeContext::idf_
const IDF::MachineImplementation & idf_
The IDF.
Definition: ProGeContext.hh:89
ProGe::HDL
HDL
HDLs supported by ProGe.
Definition: ProGeTypes.hh:40
ProGe::ProGeContext::ProGeContext
ProGeContext()=delete
TTAMachine
Definition: Assembler.hh:48
ProGe::ProGeContext
Definition: ProGeContext.hh:60
IDF::MachineImplementation
Definition: MachineImplementation.hh:54
IDF
Definition: DSDBManager.hh:54
MachineImplementation.hh
TTAMachine::Machine
Definition: Machine.hh:73