OpenASIP 2.2
Loading...
Searching...
No Matches
IPXactInterface.cc
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2011 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 IPXactInterface.cc
26 *
27 * Implementation of IPXactInterface class.
28 *
29 * @author Otto Esko 2011 (otto.esko-no.spam-tut.fi)
30 * @note rating: red
31 */
32#include "IPXactInterface.hh"
34using std::pair;
35
37 instanceName_(""), busMode_(IPXactModel::INVALID), busType_("","","",""),
38 busAbstractionType_("","","",""), interfaceMap_() {
39}
40
42
43 for (unsigned int i = 0; i < interfaceMap_.size(); i++) {
44 delete interfaceMap_.at(i);
45 }
46}
47
52
55
56 return busType_;
57}
58
64
67
68 assert(busMode_ != IPXactModel::INVALID && "Bus mode not set!");
69 return busMode_;
70}
71
77
78void
80 const TCEString& actualSignal,
81 const TCEString& busSignal) {
82
83 SignalMapping* signalMap = new SignalMapping(
84 pair<TCEString,TCEString>(actualSignal, busSignal));
85 interfaceMap_.push_back(signalMap);
86}
87
88void
93
94void
99
100void
102 const TCEString& vendor,
103 const TCEString& library,
104 const TCEString& name,
105 const TCEString& version) {
106
107 busType_.vendor = vendor;
108 busType_.library = library;
109 busType_.name = name;
110 busType_.version = version;
111}
112
113void
115 const TCEString& vendor,
116 const TCEString& library,
117 const TCEString& name,
118 const TCEString& version) {
119
124}
125
#define assert(condition)
void setBusMode(IPXactModel::BusMode mode)
IPXactModel::BusMode busMode_
Bus mode.
virtual const PlatInt::SignalMappingList & interfaceMapping() const
virtual void addSignalMapping(const TCEString &actualSignal, const TCEString &busSignal)
void setBusType(const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
virtual IPXactModel::BusMode busMode() const
virtual IPXact::Vlnv busAbstractionType() const
void setInstanceName(const TCEString &name)
PlatInt::SignalMappingList interfaceMap_
Mapping of actual port names and interface port names.
void setBusAbsType(const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
IPXact::Vlnv busType_
Vendor,Library,Name,Version of the bus type.
virtual ~IPXactInterface()
virtual TCEString instanceName() const
virtual IPXact::Vlnv busType() const
IPXact::Vlnv busAbstractionType_
Vendor,Library,Name,Version of the bus abstraction type.
TCEString instanceName_
Instance Name.
std::vector< SignalMapping * > SignalMappingList
std::pair< TCEString, TCEString > SignalMapping
TCEString name
Entity name.
Definition Vlnv.hh:60
TCEString version
Entity version.
Definition Vlnv.hh:62
TCEString vendor
Vendor name.
Definition Vlnv.hh:56
TCEString library
Library name.
Definition Vlnv.hh:58
mode
Definition tceopgen.cc:45