OpenASIP  2.0
ProGeTestBenchGenerator.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 ProGeTestBenchGenerator.hh
26  *
27  * Declaration of ProGeTestBenchGenerator class.
28  *
29  * @author Esa Määttä 2007 (esa.maatta-no.spam-tut.fi)
30  * @author Pekka Jääskeläinen 2011
31  * @note rating: red
32  */
33 
34 #ifndef TTA_PROGE_TEST_BENCH_GENERATOR_HH
35 #define TTA_PROGE_TEST_BENCH_GENERATOR_HH
36 
37 #include "Exception.hh"
38 #include "MachineImplementation.hh"
40 
41 #include <string>
42 #include "TCEString.hh"
43 #include "ProGeTypes.hh"
44 
45 namespace TTAMachine {
46  class Machine;
47 }
48 
49 /**
50  * Class for test bench generating objects.
51  *
52  * Base class for script generating.
53  */
55 public:
57  virtual ~ProGeTestBenchGenerator();
58 
59  void generate(
60  const ProGe::HDL language, const TTAMachine::Machine& mach,
62  const std::string& dstDirectory, const std::string& progeOutDir,
63  const std::string& entityStr = "tta0");
64 
65 private:
66  void copyTestBenchFiles(const std::string& dstDirectory);
67  void createFile(const std::string& fileName);
68  std::string getSignalMapping(
69  const std::string& fuName, const std::string& epName, bool widthIsOne,
70  const std::string& memoryName, const std::string& memoryLine);
71  void createTBConstFile(
72  std::string dstDirectory,
73  const std::string& dmemImage = "dmem_init.img",
74  const std::string& dataWidth = "",
75  const std::string& addrWidth = "");
76  void createProcArchVhdl(
77  const std::string& dstDirectory, const std::string& topLevelVhdl,
78  const std::string& signalMappings);
79 
82 };
83 
84 #endif
85 
ProGeTestBenchGenerator::copyTestBenchFiles
void copyTestBenchFiles(const std::string &dstDirectory)
Definition: ProGeTestBenchGenerator.cc:571
ProGeTestBenchGenerator::createFile
void createFile(const std::string &fileName)
Definition: ProGeTestBenchGenerator.cc:616
ProGeTestBenchGenerator
Definition: ProGeTestBenchGenerator.hh:54
Exception.hh
implementation
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:61
ProGeTestBenchGenerator::entityStr_
TCEString entityStr_
Definition: ProGeTestBenchGenerator.hh:80
TCEString.hh
ProGeTestBenchGenerator::generate
void generate(const ProGe::HDL language, const TTAMachine::Machine &mach, const IDF::MachineImplementation &implementation, const std::string &dstDirectory, const std::string &progeOutDir, const std::string &entityStr="tta0")
Definition: ProGeTestBenchGenerator.cc:119
FUImplementationLocation.hh
ProGeTestBenchGenerator::createProcArchVhdl
void createProcArchVhdl(const std::string &dstDirectory, const std::string &topLevelVhdl, const std::string &signalMappings)
Definition: ProGeTestBenchGenerator.cc:351
ProGeTypes.hh
ProGeTestBenchGenerator::createTBConstFile
void createTBConstFile(std::string dstDirectory, const std::string &dmemImage="dmem_init.img", const std::string &dataWidth="", const std::string &addrWidth="")
Definition: ProGeTestBenchGenerator.cc:499
ProGeTestBenchGenerator::ProGeTestBenchGenerator
ProGeTestBenchGenerator()
Definition: ProGeTestBenchGenerator.cc:85
ProGeTestBenchGenerator::~ProGeTestBenchGenerator
virtual ~ProGeTestBenchGenerator()
Definition: ProGeTestBenchGenerator.cc:93
TCEString
Definition: TCEString.hh:53
ProGeTestBenchGenerator::language_
ProGe::HDL language_
Definition: ProGeTestBenchGenerator.hh:81
ProGeTestBenchGenerator::getSignalMapping
std::string getSignalMapping(const std::string &fuName, const std::string &epName, bool widthIsOne, const std::string &memoryName, const std::string &memoryLine)
Definition: ProGeTestBenchGenerator.cc:446
ProGe::HDL
HDL
HDLs supported by ProGe.
Definition: ProGeTypes.hh:40
TTAMachine
Definition: Assembler.hh:48
IDF::MachineImplementation
Definition: MachineImplementation.hh:54
MachineImplementation.hh
TTAMachine::Machine
Definition: Machine.hh:73