OpenASIP 2.2
Loading...
Searching...
No Matches
SOPCInterface.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 SOPCInterface.hh
26 *
27 * Declaration of SOPCInterface class.
28 *
29 * @author Otto Esko 2010 (otto.esko-no.spam-tut.fi)
30 * @note rating: red
31 */
32#ifndef TTA_SOPC_INTERFACE_HH
33#define TTA_SOPC_INTERFACE_HH
34
35#include <iostream>
36#include <map>
37#include <vector>
38#include "ProGeTypes.hh"
39#include "TCEString.hh"
40
42public:
43
45
46 virtual ~SOPCInterface();
47
48 void setProperty(
49 const TCEString& propertyName,
50 const TCEString& propertyValue);
51 void setProperty(
52 const TCEString& propertyName,
53 int propertyValue);
54
55 void setPort(
56 const TCEString& hdlName,
57 const TCEString& interfaceName,
58 ProGe::Direction direction,
59 int width);
60
61 TCEString name() const;
62
63 bool hasPorts() const;
64
65 virtual void writeInterface(std::ostream& stream) const;
66
71
74
77
81
84
85 static const TCEString SOPC_INPUT;
86 static const TCEString SOPC_OUTPUT;
87 static const TCEString SOPC_BIDIR;
88
89protected:
90
97
98 typedef std::map<TCEString, TCEString> PropertyMap;
99 typedef std::vector<SOPCPort> PortList;
100
101 const PropertyMap* properties() const;
102
103 const PortList* ports() const;
104
105 void writeProperties(std::ostream& stream) const;
106 void writePorts(std::ostream& stream) const;
107
108private:
109
113
118};
119
120#endif
static const TCEString SOPC_IRQ_RECV_INT_DECLR
std::vector< SOPCPort > PortList
SOPCInterface & operator=(SOPCInterface old)
static const TCEString SOPC_OUTPUT
static const TCEString SOPC_INPUT
void writeProperties(std::ostream &stream) const
static const TCEString SOPC_CLOCK_INT_NAME
std::map< TCEString, TCEString > PropertyMap
TCEString name() const
static const TCEString SOPC_BIDIR
static const TCEString SOPC_ADD_INTERFACE
static const TCEString SOPC_EXPORT_INT_NAME
static const TCEString SOPC_IRQ_RECV_INT_NAME
const PortList * ports() const
static const TCEString SOPC_EXPORT_INT_DECLR
static const TCEString SOPC_MASTER_INT_NAME
void setPort(const TCEString &hdlName, const TCEString &interfaceName, ProGe::Direction direction, int width)
static const TCEString SOPC_MASTER_INT_DECLR
PropertyMap properties_
static const TCEString SOPC_ASSOCIATED_CLOCK
virtual void writeInterface(std::ostream &stream) const
void writePorts(std::ostream &stream) const
SOPCInterface(const SOPCInterface &old)
void setProperty(const TCEString &propertyName, const TCEString &propertyValue)
static const TCEString SOPC_SET_INT_PROPERTY
TCEString declaration_
bool hasPorts() const
static const TCEString SOPC_ADD_INT_PORT
const PropertyMap * properties() const
static const TCEString SOPC_EXPORT_NAME
virtual ~SOPCInterface()
static const TCEString SOPC_CLOCK_INT_DECLR
Direction
Direction of the port.
Definition ProGeTypes.hh:52
ProGe::Direction direction