OpenASIP  2.0
BlockSourceCopier.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 BlockSourceCopier.hh
26  *
27  * Declaration of BlockSourceCopier class.
28  *
29  * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30  * @author Pekka Jääskeläinen 2011
31  * @author Vinogradov Viacheslav(added Verilog generating) 2012
32  * @note rating: red
33  */
34 
35 #ifndef TTA_BLOCK_SOURCE_COPIER_HH
36 #define TTA_BLOCK_SOURCE_COPIER_HH
37 
38 #include <set>
39 
40 #include "ProGeTypes.hh"
41 #include "TCEString.hh"
44 
45 namespace IDF {
46  class MachineImplementation;
47 }
48 
49 namespace HDB {
50  class HWBlockImplementation;
51 }
52 
53 namespace TTAMachine {
54  class Machine;
55 }
56 
57 namespace ProGe {
58 
59 /**
60  * Copies the block definition files used in the processor implementation to
61  * the output directory of ProGe.
62  */
64 public:
67  TCEString entityStr,
68  const ProGe::HDL language);
69  virtual ~BlockSourceCopier();
70 
71  void copyShared(const std::string& dstDirectory);
72 
73  void copyProcessorSpecific(const std::string& dstDirectory);
74 
76  const std::string& srcFile, const std::string& dstDirectory,
77  std::string newName = "0");
79 
80 private:
81  void copyBaseRFFiles(
83  const std::string& dstDirectory);
84  void copyFiles(
86  const std::string& hdbFile, const std::string& dstDirectory);
87 
88  void copyFromTemplate(
89  const std::string& templateFile, const std::string& dstDirectory);
90 
91  void setCopied(const std::string& file);
92  bool isCopied(const std::string& file) const;
93 
94  /// The IDF object model.
97  const HDL language_;
98  /// Copied files.
99  std::set<std::string> copiedFiles_;
100  /// Object that instantiates templates.
102 };
103 }
104 
105 #endif
IDF::UnitImplementationLocation
Definition: UnitImplementationLocation.hh:48
RFImplementationLocation.hh
ProGe::BlockSourceCopier::copiedFiles_
std::set< std::string > copiedFiles_
Copied files.
Definition: BlockSourceCopier.hh:99
ProGe::BlockSourceCopier::copyFromTemplate
void copyFromTemplate(const std::string &templateFile, const std::string &dstDirectory)
HDB
Definition: CostDatabase.hh:49
HDLTemplateInstantiator
Definition: HDLTemplateInstantiator.hh:45
implementation
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:61
ProGe::BlockSourceCopier::copyFiles
void copyFiles(const HDB::HWBlockImplementation &implementation, const std::string &hdbFile, const std::string &dstDirectory)
Definition: BlockSourceCopier.cc:276
HDLTemplateInstantiator.hh
ProGe::BlockSourceCopier::instantiator_
HDLTemplateInstantiator instantiator_
Object that instantiates templates.
Definition: BlockSourceCopier.hh:101
ProGe::BlockSourceCopier::copyBaseRFFiles
void copyBaseRFFiles(const IDF::RFImplementationLocation &implementation, const std::string &dstDirectory)
Definition: BlockSourceCopier.cc:251
TCEString.hh
ProGe::BlockSourceCopier::entityStr_
TCEString entityStr_
Definition: BlockSourceCopier.hh:96
ProGe::BlockSourceCopier::~BlockSourceCopier
virtual ~BlockSourceCopier()
Definition: BlockSourceCopier.cc:79
ProGe::BlockSourceCopier::instantiateHDLTemplate
void instantiateHDLTemplate(const std::string &srcFile, const std::string &dstDirectory, std::string newName="0")
Definition: BlockSourceCopier.cc:202
ProGe::BlockSourceCopier::copyProcessorSpecific
void copyProcessorSpecific(const std::string &dstDirectory)
Definition: BlockSourceCopier.cc:145
ProGe::BlockSourceCopier::setCopied
void setCopied(const std::string &file)
Definition: BlockSourceCopier.cc:344
ProGe::BlockSourceCopier::language_
const HDL language_
Definition: BlockSourceCopier.hh:97
ProGeTypes.hh
HDB::HWBlockImplementation
Definition: HWBlockImplementation.hh:49
ProGe::BlockSourceCopier::BlockSourceCopier
BlockSourceCopier(const IDF::MachineImplementation &implementation, TCEString entityStr, const ProGe::HDL language)
Definition: BlockSourceCopier.cc:67
ProGe::BlockSourceCopier
Definition: BlockSourceCopier.hh:63
ProGe::BlockSourceCopier::isCopied
bool isCopied(const std::string &file) const
Definition: BlockSourceCopier.cc:357
ProGe
Definition: FUGen.hh:54
TCEString
Definition: TCEString.hh:53
ProGe::HDL
HDL
HDLs supported by ProGe.
Definition: ProGeTypes.hh:40
ProGe::BlockSourceCopier::getTemplateInstatiator
HDLTemplateInstantiator & getTemplateInstatiator()
Definition: BlockSourceCopier.cc:237
ProGe::BlockSourceCopier::copyShared
void copyShared(const std::string &dstDirectory)
Definition: BlockSourceCopier.cc:96
TTAMachine
Definition: Assembler.hh:48
ProGe::BlockSourceCopier::implementation_
const IDF::MachineImplementation & implementation_
The IDF object model.
Definition: BlockSourceCopier.hh:95
IDF::MachineImplementation
Definition: MachineImplementation.hh:54
IDF
Definition: DSDBManager.hh:54