OpenASIP 2.2
Loading...
Searching...
No Matches
RFImplementation.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 RFImplementation.hh
26 *
27 * Declaration of RFImplementation class.
28 *
29 * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30 * @note rating: red
31 */
32
33#ifndef TTA_RF_IMPLEMENTATION_HH
34#define TTA_RF_IMPLEMENTATION_HH
35
36#include <vector>
38#include "Exception.hh"
39#include "HDBTypes.hh"
40
41namespace HDB {
42
43class RFEntry;
44class RFExternalPort;
45class RFPortImplementation;
46
47/**
48 * Repsesents an implementation of a RF in HDB.
49 */
51public:
52 /// Parameter of FU implementation.
54
56 const std::string& moduleName,
57 const std::string& clkPort,
58 const std::string& rstPort,
59 const std::string& glockPort,
60 const std::string& sizeParam,
61 const std::string& widthParam,
62 const std::string& guardPort,
63 bool sacParam = false);
64 virtual ~RFImplementation();
65
67
68 void setSizeParameter(const std::string& sizeParam);
69 std::string sizeParameter() const;
70
71 void setWidthParameter(const std::string& widthParam);
72 std::string widthParameter() const;
73
74 void setGuardPort(const std::string& guardPort);
75 std::string guardPort() const;
76
77 void setSeparateAddressCycleParameter(bool enable);
79
81 void addExternalPort(RFExternalPort* extPort);
84 int portCount() const;
85 int externalPortCount() const;
86 RFPortImplementation& port(int index) const;
87 RFExternalPort& externalPort(int index) const;
88
89 void addParameter(
90 const std::string& name, const std::string& type,
91 const std::string& value);
92 void removeParameter(const std::string& name);
93 int parameterCount() const;
94 Parameter parameter(int index) const;
95 bool hasParameter(const std::string& name) const;
96
97private:
98 /// Vector type for RFPortImplementation.
99 typedef std::vector<RFPortImplementation*> PortTable;
100 /// Vector type for FUExternalPort.
101 typedef std::vector<RFExternalPort*> ExternalPortTable;
102 /// Vector type for parameter names.
103 typedef std::vector<Parameter> ParameterTable;
104
105 /// Name of the size parameter.
106 std::string sizeParam_;
107 /// Name of the width parameter.
108 std::string widthParam_;
109 /// Name of the guard port.
110 std::string guardPort_;
111 /// State of separate address cycle parameter.
113
114 /// Contains the ports.
116 /// Contains the external ports.
118 /// Contains the parameters.
120};
121}
122
123#endif
RFExternalPort & externalPort(int index) const
ParameterTable parameters_
Contains the parameters.
void addPort(RFPortImplementation *port)
HDB::Parameter Parameter
Parameter of FU implementation.
PortTable ports_
Contains the ports.
void addExternalPort(RFExternalPort *extPort)
bool sepAddrCycleParam_
State of separate address cycle parameter.
ExternalPortTable externalPorts_
Contains the external ports.
std::vector< Parameter > ParameterTable
Vector type for parameter names.
void setSizeParameter(const std::string &sizeParam)
std::string guardPort_
Name of the guard port.
RFPortImplementation & port(int index) const
bool separateAddressCycleParameter() const
std::vector< RFPortImplementation * > PortTable
Vector type for RFPortImplementation.
std::string sizeParameter() const
void removeParameter(const std::string &name)
void deleteExternalPort(RFExternalPort *port)
bool hasParameter(const std::string &name) const
std::string widthParameter() const
std::string sizeParam_
Name of the size parameter.
void setGuardPort(const std::string &guardPort)
std::string guardPort() const
Parameter parameter(int index) const
std::string widthParam_
Name of the width parameter.
void addParameter(const std::string &name, const std::string &type, const std::string &value)
void setSeparateAddressCycleParameter(bool enable)
std::vector< RFExternalPort * > ExternalPortTable
Vector type for FUExternalPort.
void setWidthParameter(const std::string &widthParam)
void deletePort(RFPortImplementation *port)