OpenASIP  2.0
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 
40 namespace ProGe {
41  class NetlistBlock;
42 }
43 
44 
45 /**
46  * Represents a HDL port which is on higher abstraction level than NetlistPort
47  */
48 class HDLPort {
49 public:
50 
51  HDLPort(
52  const TCEString name,
53  const TCEString& widthFormula,
56  bool needsInversion);
57 
58  HDLPort(
59  const TCEString name,
60  const TCEString& widthFormula,
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 
88  void setToStatic(ProGe::StaticSignal value);
89 
90  bool hasStaticValue() const;
91 
93 
94 private:
95 
101  bool hasWidth_;
102  int width_;
105 
106 };
107 
108 #endif
HDLPort::width_
int width_
Definition: PlatformIntegrator/HDLPort.hh:102
ProGe::NetlistBlock
Definition: NetlistBlock.hh:61
HDLPort
Definition: PlatformIntegrator/HDLPort.hh:48
HDLPort::staticValue
ProGe::StaticSignal staticValue() const
Definition: HDLPort.cc:160
HDLPort::needsInversion_
bool needsInversion_
Definition: PlatformIntegrator/HDLPort.hh:100
HDLPort::type
ProGe::DataType type() const
Definition: HDLPort.cc:117
HDLPort::hasWidth_
bool hasWidth_
Definition: PlatformIntegrator/HDLPort.hh:101
HDLPort::staticValue_
ProGe::StaticSignal staticValue_
Definition: PlatformIntegrator/HDLPort.hh:104
HDLPort::convertToNetlistPort
ProGe::NetlistPort * convertToNetlistPort(ProGe::NetlistBlock &block) const
Definition: HDLPort.cc:127
TCEString.hh
HDLPort::type_
ProGe::DataType type_
Definition: PlatformIntegrator/HDLPort.hh:98
HDLPort::hasStaticValue
bool hasStaticValue() const
Definition: HDLPort.cc:153
ProGe::StaticSignal
Definition: NetlistPort.hh:47
HDLPort::name_
TCEString name_
Definition: PlatformIntegrator/HDLPort.hh:96
NetlistPort.hh
HDLPort::updateWidthFormula
void updateWidthFormula(const TCEString &widthFormula)
Definition: HDLPort.cc:97
HDLPort::name
TCEString name() const
Definition: HDLPort.cc:87
ProGeTypes.hh
HDLPort::direction
ProGe::Direction direction() const
Definition: HDLPort.cc:112
HDLPort::setToStatic
void setToStatic(ProGe::StaticSignal value)
Definition: HDLPort.cc:145
ProGe
Definition: FUGen.hh:54
ProGe::DataType
DataType
Data types of hardware ports.
Definition: ProGeTypes.hh:46
TCEString
Definition: TCEString.hh:53
ProGe::NetlistPort
Definition: NetlistPort.hh:70
HDLPort::widthFormula
TCEString widthFormula() const
Definition: HDLPort.cc:92
HDLPort::hasRealWidth
bool hasRealWidth() const
Definition: HDLPort.cc:102
HDLPort::hasStaticValue_
bool hasStaticValue_
Definition: PlatformIntegrator/HDLPort.hh:103
HDLPort::realWidth
int realWidth() const
Definition: HDLPort.cc:107
HDLPort::widthFormula_
TCEString widthFormula_
Definition: PlatformIntegrator/HDLPort.hh:97
ProGe::Direction
Direction
Direction of the port.
Definition: ProGeTypes.hh:52
HDLPort::HDLPort
HDLPort(const TCEString name, const TCEString &widthFormula, ProGe::DataType type, ProGe::Direction direction, bool needsInversion)
Definition: HDLPort.cc:38
HDLPort::direction_
ProGe::Direction direction_
Definition: PlatformIntegrator/HDLPort.hh:99
HDLPort::needsInversion
bool needsInversion() const
Definition: HDLPort.cc:122