OpenASIP  2.0
ProjectFileGenerator.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2010 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 ProjectFileGenerator.hh
26  *
27  * Declaration of ProjectFileGenerator class.
28  *
29  * @author Otto Esko 2010 (otto.esko-no.spam-tut.fi)
30  * @note rating: red
31  */
32 #ifndef TTA_PROJECT_FILE_GENERATOR_HH
33 #define TTA_PROJECT_FILE_GENERATOR_HH
34 
35 #include <vector>
36 #include "TCEString.hh"
38 
39 class PlatformIntegrator;
40 
42 public:
45  virtual ~ProjectFileGenerator();
46 
47  virtual void writeProjectFiles() = 0;
48 
49  void addHdlFile(const TCEString& file);
50 
51  void addHdlFiles(const std::vector<TCEString>& files);
52 
53  void addMemInitFile(const TCEString& memInit);
54 
55  void addSignalMapping(const PlatInt::SignalMapping& mapping);
56 
57 protected:
58 
59  const std::vector<TCEString>& hdlFileList() const;
60 
61  const std::vector<TCEString>& memInitFileList() const;
62 
63  const PlatformIntegrator* integrator() const;
64 
65  TCEString coreEntity() const { return coreEntity_; }
67  return coreEntity_ + "_toplevel";
68  }
69 
70  int signalMappingCount() const;
71 
72  const PlatInt::SignalMapping* signalMapping(int index) const;
73 
75  const TCEString& port,
76  const TCEString& delimiter) const;
77 
78 private:
79  /// the HDL entity of the non-integrated TTA core
82 
83  std::vector<TCEString> hdlFiles_;
84  std::vector<TCEString> memInitFiles_;
86 };
87 
88 #endif
ProjectFileGenerator::integrator
const PlatformIntegrator * integrator() const
Definition: ProjectFileGenerator.cc:101
ProjectFileGenerator::signalMapping
const PlatInt::SignalMapping * signalMapping(int index) const
Definition: ProjectFileGenerator.cc:113
ProjectFileGenerator::memInitFiles_
std::vector< TCEString > memInitFiles_
Definition: ProjectFileGenerator.hh:84
ProjectFileGenerator::extractFUName
TCEString extractFUName(const TCEString &port, const TCEString &delimiter) const
Definition: ProjectFileGenerator.cc:120
ProjectFileGenerator::toplevelEntity
TCEString toplevelEntity() const
Definition: ProjectFileGenerator.hh:66
PlatformIntegratorTypes.hh
PlatInt::SignalMappingList
std::vector< SignalMapping * > SignalMappingList
Definition: PlatformIntegratorTypes.hh:44
ProjectFileGenerator::signalMappingCount
int signalMappingCount() const
Definition: ProjectFileGenerator.cc:106
ProjectFileGenerator::writeProjectFiles
virtual void writeProjectFiles()=0
PlatInt::SignalMapping
std::pair< TCEString, TCEString > SignalMapping
Definition: PlatformIntegratorTypes.hh:42
ProjectFileGenerator::signalMap_
PlatInt::SignalMappingList signalMap_
Definition: ProjectFileGenerator.hh:85
ProjectFileGenerator::addHdlFiles
void addHdlFiles(const std::vector< TCEString > &files)
Definition: ProjectFileGenerator.cc:63
TCEString.hh
ProjectFileGenerator::ProjectFileGenerator
ProjectFileGenerator(TCEString coreEntity, const PlatformIntegrator *integrator)
Definition: ProjectFileGenerator.cc:40
ProjectFileGenerator::memInitFileList
const std::vector< TCEString > & memInitFileList() const
Definition: ProjectFileGenerator.cc:94
ProjectFileGenerator::integrator_
const PlatformIntegrator * integrator_
Definition: ProjectFileGenerator.hh:81
ProjectFileGenerator
Definition: ProjectFileGenerator.hh:41
ProjectFileGenerator::~ProjectFileGenerator
virtual ~ProjectFileGenerator()
Definition: ProjectFileGenerator.cc:47
ProjectFileGenerator::addHdlFile
void addHdlFile(const TCEString &file)
Definition: ProjectFileGenerator.cc:56
ProjectFileGenerator::coreEntity
TCEString coreEntity() const
Definition: ProjectFileGenerator.hh:65
TCEString
Definition: TCEString.hh:53
ProjectFileGenerator::addMemInitFile
void addMemInitFile(const TCEString &memInit)
Definition: ProjectFileGenerator.cc:72
ProjectFileGenerator::hdlFileList
const std::vector< TCEString > & hdlFileList() const
Definition: ProjectFileGenerator.cc:87
PlatformIntegrator
Definition: PlatformIntegrator.hh:65
ProjectFileGenerator::coreEntity_
TCEString coreEntity_
the HDL entity of the non-integrated TTA core
Definition: ProjectFileGenerator.hh:80
ProjectFileGenerator::addSignalMapping
void addSignalMapping(const PlatInt::SignalMapping &mapping)
Definition: ProjectFileGenerator.cc:79
ProjectFileGenerator::hdlFiles_
std::vector< TCEString > hdlFiles_
Definition: ProjectFileGenerator.hh:83