OpenASIP  2.0
FUArchitecture.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 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 FUArchitecture.hh
26  *
27  * Declaration of FUArchitecture class.
28  *
29  * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_FU_ARCHITECTURE_HH
34 #define TTA_FU_ARCHITECTURE_HH
35 
36 #include <string>
37 #include <set>
38 #include <map>
39 #include <vector>
40 
41 #include "HWBlockArchitecture.hh"
42 #include "HDBTypes.hh"
43 #include "Exception.hh"
44 
45 namespace TTAMachine {
46  class FunctionUnit;
47  class PipelineElement;
48 }
49 
50 namespace HDB {
51 
52 /**
53  * Represents architecture of an FU in HDB.
54  */
56 public:
59  virtual ~FUArchitecture();
60 
61  bool hasParameterizedWidth(const std::string& port) const;
62  void setParameterizedWidth(const std::string& port);
63  bool hasGuardSupport(const std::string& port) const;
64  void setGuardSupport(const std::string& port);
65 
67  HDB::Direction portDirection(const std::string& port) const;
68 
69  bool operator==(const FUArchitecture& rightHand) const;
70 private:
71  /// Struct PipelineElementUsage
73  std::set<const TTAMachine::PipelineElement*> usage1;
74  std::set<const TTAMachine::PipelineElement*> usage2;
75  };
76 
77  /// typedef for PipelineElemetnUsageTable
78  typedef std::vector<PipelineElementUsage> PipelineElementUsageTable;
79 
80  /// Set type for port names.
81  typedef std::set<std::string> PortSet;
82 
83  /// The function unit.
85  /// Parameterized ports.
87  /// Port that support guard.
89 };
90 }
91 
92 #endif
HDB::FUArchitecture
Definition: FUArchitecture.hh:55
HDBTypes.hh
HDB::FUArchitecture::fu_
TTAMachine::FunctionUnit * fu_
The function unit.
Definition: FUArchitecture.hh:84
HDB::FUArchitecture::hasParameterizedWidth
bool hasParameterizedWidth(const std::string &port) const
Definition: FUArchitecture.cc:86
HDB
Definition: CostDatabase.hh:49
Exception.hh
HWBlockArchitecture
Definition: HWBlockArchitecture.hh:42
HDB::FUArchitecture::architecture
TTAMachine::FunctionUnit & architecture() const
Definition: FUArchitecture.cc:131
HDB::FUArchitecture::FUArchitecture
FUArchitecture(TTAMachine::FunctionUnit *fu)
Definition: FUArchitecture.cc:55
HDB::FUArchitecture::PipelineElementUsageTable
std::vector< PipelineElementUsage > PipelineElementUsageTable
typedef for PipelineElemetnUsageTable
Definition: FUArchitecture.hh:78
HDB::FUArchitecture::parameterizedPorts_
PortSet parameterizedPorts_
Parameterized ports.
Definition: FUArchitecture.hh:86
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
HDB::FUArchitecture::PortSet
std::set< std::string > PortSet
Set type for port names.
Definition: FUArchitecture.hh:81
HDB::FUArchitecture::setParameterizedWidth
void setParameterizedWidth(const std::string &port)
Definition: FUArchitecture.cc:97
HDB::FUArchitecture::hasGuardSupport
bool hasGuardSupport(const std::string &port) const
Definition: FUArchitecture.cc:109
HDB::FUArchitecture::PipelineElementUsage
Struct PipelineElementUsage.
Definition: FUArchitecture.hh:72
HDB::Direction
Direction
Direction of port.
Definition: HDBTypes.hh:40
HDB::FUArchitecture::portDirection
HDB::Direction portDirection(const std::string &port) const
Definition: FUArchitecture.cc:145
HWBlockArchitecture.hh
HDB::FUArchitecture::operator==
bool operator==(const FUArchitecture &rightHand) const
Definition: FUArchitecture.cc:196
HDB::FUArchitecture::PipelineElementUsage::usage1
std::set< const TTAMachine::PipelineElement * > usage1
Definition: FUArchitecture.hh:73
HDB::FUArchitecture::setGuardSupport
void setGuardSupport(const std::string &port)
Definition: FUArchitecture.cc:120
HDB::FUArchitecture::~FUArchitecture
virtual ~FUArchitecture()
Definition: FUArchitecture.cc:74
HDB::FUArchitecture::PipelineElementUsage::usage2
std::set< const TTAMachine::PipelineElement * > usage2
Definition: FUArchitecture.hh:74
TTAMachine
Definition: Assembler.hh:48
HDB::FUArchitecture::guardedPorts_
PortSet guardedPorts_
Port that support guard.
Definition: FUArchitecture.hh:88