OpenASIP  2.0
ProGeContext.cc
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.cc
26  *
27  * Implementation 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 #include "ProGeContext.hh"
35 
36 #include "GlobalPackage.hh"
37 
38 namespace ProGe {
39 
41  const TTAMachine::Machine& adf, const IDF::MachineImplementation& idf,
42  const std::string& progeOutputDirectory,
43  const std::string& sharedOutputDirectory,
44  const std::string& coreEntityName, HDL targetHDL,
45  int /*imemWidthInMAUs */)
46  : adf_(adf),
47  idf_(idf),
48  progeOutputDirectory_(progeOutputDirectory),
49  sharedOutputDirectory_(sharedOutputDirectory),
50  entityName_(coreEntityName),
51  hdl_(targetHDL),
52  globalPackage_(new GlobalPackage(coreEntityName)) {}
53 
55 
58  return adf_;
59 }
60 
63  return idf_;
64 }
65 
66 const std::string&
68  return progeOutputDirectory_;
69 }
70 
71 const std::string&
74 }
75 
76 const std::string&
78  return entityName_;
79 }
80 
81 HDL
83  return hdl_;
84 }
85 
86 const GlobalPackage&
88  return *globalPackage_;
89 }
90 
91 } /* namespace ProGe */
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
ProGeContext.hh
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
ProGe::ProGeContext::coreEntityName
const std::string & coreEntityName() const
Definition: ProGeContext.cc:77
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
GlobalPackage.hh
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
IDF::MachineImplementation
Definition: MachineImplementation.hh:54
TTAMachine::Machine
Definition: Machine.hh:73