OpenASIP 2.2
Loading...
Searching...
No Matches
RFPortImplementation.cc
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 RFPortImplementation.cc
26 *
27 * Implementation of RFPortImplementation class.
28 *
29 * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30 * @note rating: red
31 */
32
34#include "RFImplementation.hh"
35
36namespace HDB {
37
38/**
39 * The constructor.
40 *
41 * Adds the port automatically to the given parent RF implementation.
42 *
43 * @param name Name of the port.
44 * @param direction Direction of the port.
45 * @param loadPort Name of the load enable port.
46 * @param opcodePort Name of the opcode port.
47 * @param parent The parent RF implementation.
48 */
50 const std::string& name,
51 Direction direction,
52 const std::string& loadPort,
53 const std::string& opcodePort,
54 const std::string& opcodePortWidthFormula,
55 RFImplementation& parent) :
56 PortImplementation(name, loadPort), direction_(direction),
57 opcodePort_(opcodePort),
58 opcodePortWidthFormula_(opcodePortWidthFormula) {
59
60 parent.addPort(this);
61}
62
63
64/**
65 * The destructor.
66 */
69
70
71/**
72 * Sets the direction of the port.
73 *
74 * @param direction The new direction.
75 */
76void
80
81
82/**
83 * Returns the direction of the port.
84 *
85 * @return The direction of the port.
86 */
91
92
93/**
94 * Sets the name of the opcode port.
95 *
96 * @param name The new name.
97 */
98void
99RFPortImplementation::setOpcodePort(const std::string& name) {
101}
102
103
104/**
105 * Returns the name of the opcode port.
106 *
107 * @return The name of the opcode port.
108 */
109std::string
113
114
115/**
116 * Sets the width formula of the opcode port.
117 *
118 * @param formula The new width formula.
119 */
120void
122 opcodePortWidthFormula_ = formula;
123}
124
125
126/**
127 * Returns the formula of the width of the opcode port.
128 *
129 * @return The formula.
130 */
131std::string
135}
void addPort(RFPortImplementation *port)
void setOpcodePortWidthFormula(const std::string &formula)
std::string opcodePortWidthFormula() const
void setDirection(Direction direction)
RFPortImplementation(const std::string &name, Direction direction, const std::string &loadPort, const std::string &opcodePort, const std::string &opcodePortWidthFormula, RFImplementation &parent)
std::string opcodePort_
Name of the opcode port.
std::string opcodePortWidthFormula_
Width calculation formula for the opcode port.
void setOpcodePort(const std::string &name)
Direction direction_
Direction of the port.
Direction
Direction of port.
Definition HDBTypes.hh:40