OpenASIP 2.2
Loading...
Searching...
No Matches
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
42#include "HDBTypes.hh"
43#include "Exception.hh"
44
45namespace TTAMachine {
46 class FunctionUnit;
47 class PipelineElement;
48}
49
50namespace HDB {
51
52/**
53 * Represents architecture of an FU in HDB.
54 */
56public:
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;
70private:
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
bool hasGuardSupport(const std::string &port) const
std::set< std::string > PortSet
Set type for port names.
std::vector< PipelineElementUsage > PipelineElementUsageTable
typedef for PipelineElemetnUsageTable
TTAMachine::FunctionUnit * fu_
The function unit.
HDB::Direction portDirection(const std::string &port) const
void setGuardSupport(const std::string &port)
PortSet parameterizedPorts_
Parameterized ports.
PortSet guardedPorts_
Port that support guard.
bool operator==(const FUArchitecture &rightHand) const
void setParameterizedWidth(const std::string &port)
bool hasParameterizedWidth(const std::string &port) const
TTAMachine::FunctionUnit & architecture() const
Direction
Direction of port.
Definition HDBTypes.hh:40
std::set< const TTAMachine::PipelineElement * > usage1
std::set< const TTAMachine::PipelineElement * > usage2