OpenASIP  2.0
SOPCBuilderFileGenerator.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 SOPCBuilderFileGenerator.hh
26  *
27  * Declaration of SOPCBuilderFileGenerator class.
28  *
29  * @author Otto Esko 2010 (otto.esko-no.spam-tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_SOPC_BUILDER_FILE_GENERATOR_HH
34 #define TTA_SOPC_BUILDER_FILE_GENERATOR_HH
35 
36 #include <iostream>
37 #include <map>
38 #include "ProjectFileGenerator.hh"
39 #include "ProGeTypes.hh"
40 #include "SOPCInterface.hh"
41 #include "NetlistPort.hh"
42 
44 
46 public:
47 
50 
51  virtual ~SOPCBuilderFileGenerator();
52 
53  virtual void writeProjectFiles();
54 
55 private:
56 
57  int countAvalonMMMasters() const;
58 
59  void createInterfaces();
60 
61  bool handleAvalonSignal(const ProGe::NetlistPort& port);
62 
63  void exportSignal(const ProGe::NetlistPort& port);
64 
65  void writeModuleProperties(std::ostream& stream);
66 
67  void writeGenerics(std::ostream& stream);
68 
69  void writeFileList(std::ostream& stream);
70 
71  void writeInterfaces(std::ostream& stream) const;
72 
74 
77  std::map<TCEString, AvalonMMMasterInterface*> masters_;
78 
79 
82 
83  static const TCEString TTA_CLOCK_NAME;
84  static const TCEString TTA_RESET_NAME;
85  static const TCEString SOPC_CLOCK_NAME;
86  static const TCEString SOPC_RESET_NAME;
87 
91  static const TCEString SOPC_ADD_FILE;
92 
94 
95 };
96 
97 #endif
ProjectFileGenerator::integrator
const PlatformIntegrator * integrator() const
Definition: ProjectFileGenerator.cc:101
SOPCBuilderFileGenerator::writeGenerics
void writeGenerics(std::ostream &stream)
Definition: SOPCBuilderFileGenerator.cc:198
SOPCBuilderFileGenerator::~SOPCBuilderFileGenerator
virtual ~SOPCBuilderFileGenerator()
Definition: SOPCBuilderFileGenerator.cc:90
SOPCBuilderFileGenerator::writeModuleProperties
void writeModuleProperties(std::ostream &stream)
Definition: SOPCBuilderFileGenerator.cc:166
ProjectFileGenerator::toplevelEntity
TCEString toplevelEntity() const
Definition: ProjectFileGenerator.hh:66
SOPCBuilderFileGenerator::SOPC_SET_MODULE_PROPERTY
static const TCEString SOPC_SET_MODULE_PROPERTY
Definition: SOPCBuilderFileGenerator.hh:90
SOPCBuilderFileGenerator::SOPC_ADD_FILE
static const TCEString SOPC_ADD_FILE
Definition: SOPCBuilderFileGenerator.hh:91
SOPCBuilderFileGenerator::exportSignal
void exportSignal(const ProGe::NetlistPort &port)
Definition: SOPCBuilderFileGenerator.cc:299
SOPCInterface
Definition: SOPCInterface.hh:41
SOPCBuilderFileGenerator::writeProjectFiles
virtual void writeProjectFiles()
Definition: SOPCBuilderFileGenerator.cc:103
SOPCBuilderFileGenerator::HDB_AVALON_PREFIX
static const TCEString HDB_AVALON_PREFIX
Definition: SOPCBuilderFileGenerator.hh:80
SOPCInterface.hh
SOPCBuilderFileGenerator::handleAvalonSignal
bool handleAvalonSignal(const ProGe::NetlistPort &port)
Definition: SOPCBuilderFileGenerator.cc:267
SOPCBuilderFileGenerator::createInterfaces
void createInterfaces()
Definition: SOPCBuilderFileGenerator.cc:246
ProjectFileGenerator
Definition: ProjectFileGenerator.hh:41
NetlistPort.hh
SOPCBuilderFileGenerator::masters_
std::map< TCEString, AvalonMMMasterInterface * > masters_
Definition: SOPCBuilderFileGenerator.hh:77
SOPCBuilderFileGenerator::getMaster
AvalonMMMasterInterface * getMaster(const TCEString &fuName)
Definition: SOPCBuilderFileGenerator.cc:334
SOPCBuilderFileGenerator::export_
SOPCInterface * export_
Definition: SOPCBuilderFileGenerator.hh:76
ProGeTypes.hh
SOPCBuilderFileGenerator::SOPCBuilderFileGenerator
SOPCBuilderFileGenerator(TCEString toplevelEntity, const PlatformIntegrator *integrator)
Definition: SOPCBuilderFileGenerator.cc:70
SOPCBuilderFileGenerator::SOPC_DEFAULT_GROUP
static const TCEString SOPC_DEFAULT_GROUP
Definition: SOPCBuilderFileGenerator.hh:88
ProjectFileGenerator.hh
SOPCBuilderFileGenerator::writeFileList
void writeFileList(std::ostream &stream)
Definition: SOPCBuilderFileGenerator.cc:230
AvalonMMMasterInterface
Definition: AvalonMMMasterInterface.hh:39
TCEString
Definition: TCEString.hh:53
SOPCBuilderFileGenerator::TTA_RESET_NAME
static const TCEString TTA_RESET_NAME
Definition: SOPCBuilderFileGenerator.hh:84
ProGe::NetlistPort
Definition: NetlistPort.hh:70
SOPCBuilderFileGenerator::SOPC_CLOCK_NAME
static const TCEString SOPC_CLOCK_NAME
Definition: SOPCBuilderFileGenerator.hh:85
PlatformIntegrator
Definition: PlatformIntegrator.hh:65
SOPCBuilderFileGenerator::SOPC_DEFAULT_VHDL_LIBS
static const TCEString SOPC_DEFAULT_VHDL_LIBS
Definition: SOPCBuilderFileGenerator.hh:89
SOPCBuilderFileGenerator
Definition: SOPCBuilderFileGenerator.hh:45
SOPCBuilderFileGenerator::countAvalonMMMasters
int countAvalonMMMasters() const
Definition: SOPCBuilderFileGenerator.cc:147
SOPCBuilderFileGenerator::clock_
SOPCInterface * clock_
Definition: SOPCBuilderFileGenerator.hh:75
SOPCBuilderFileGenerator::PI_DEVICE_FAMILY_GENERIC
static const TCEString PI_DEVICE_FAMILY_GENERIC
Definition: SOPCBuilderFileGenerator.hh:93
SOPCBuilderFileGenerator::SOPC_RESET_NAME
static const TCEString SOPC_RESET_NAME
Definition: SOPCBuilderFileGenerator.hh:86
SOPCBuilderFileGenerator::SOPC_COMPONENT_FILE_TYPE
static const TCEString SOPC_COMPONENT_FILE_TYPE
Definition: SOPCBuilderFileGenerator.hh:81
SOPCBuilderFileGenerator::writeInterfaces
void writeInterfaces(std::ostream &stream) const
Definition: SOPCBuilderFileGenerator.cc:311
SOPCBuilderFileGenerator::TTA_CLOCK_NAME
static const TCEString TTA_CLOCK_NAME
Definition: SOPCBuilderFileGenerator.hh:83