OpenASIP 2.2
Loading...
Searching...
No Matches
PlatformIntegrator/HDLPort.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 HDLPort.hh
26 *
27 * Declaration of HDLPort class.
28 *
29 * @author Otto Esko 2010 (otto.esko-no.spam-tut.fi)
30 * @note rating: red
31 */
32
33#ifndef TTA_HDL_PORT_HH
34#define TTA_HDL_PORT_HH
35
36#include "TCEString.hh"
37#include "ProGeTypes.hh"
38#include "NetlistPort.hh"
39
40namespace ProGe {
41 class NetlistBlock;
42}
43
44
45/**
46 * Represents a HDL port which is on higher abstraction level than NetlistPort
47 */
48class HDLPort {
49public:
50
51 HDLPort(
52 const TCEString name,
56 bool needsInversion);
57
58 HDLPort(
59 const TCEString name,
63 bool needsInversion,
64 int width);
65
66 HDLPort(const HDLPort& old);
67
68 HDLPort(const ProGe::NetlistPort& port);
69
70 TCEString name() const;
71
72 TCEString widthFormula() const;
73
75
76 bool hasRealWidth() const;
77
78 int realWidth() const;
79
81
82 ProGe::DataType type() const;
83
84 bool needsInversion() const;
85
87
89
90 bool hasStaticValue() const;
91
93
94private:
95
105
106};
107
108#endif
void setToStatic(ProGe::StaticSignal value)
Definition HDLPort.cc:145
int realWidth() const
Definition HDLPort.cc:107
ProGe::Direction direction() const
Definition HDLPort.cc:112
ProGe::DataType type_
bool hasStaticValue() const
Definition HDLPort.cc:153
ProGe::StaticSignal staticValue() const
Definition HDLPort.cc:160
ProGe::StaticSignal staticValue_
ProGe::NetlistPort * convertToNetlistPort(ProGe::NetlistBlock &block) const
Definition HDLPort.cc:127
TCEString widthFormula() const
Definition HDLPort.cc:92
TCEString name() const
Definition HDLPort.cc:87
ProGe::Direction direction_
bool hasRealWidth() const
Definition HDLPort.cc:102
ProGe::DataType type() const
Definition HDLPort.cc:117
void updateWidthFormula(const TCEString &widthFormula)
Definition HDLPort.cc:97
bool needsInversion() const
Definition HDLPort.cc:122
Definition FUGen.hh:54
DataType
Data types of hardware ports.
Definition ProGeTypes.hh:46
Direction
Direction of the port.
Definition ProGeTypes.hh:52