OpenASIP  2.0
IPXactResetInterface.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 IPXactResetInterface.cc
26  *
27  * Implementation of IPXactResetInterface class.
28  *
29  * @author Otto Esko 2011 (otto.esko-no.spam-tut.fi)
30  * @note rating: red
31  */
32 #include "IPXactResetInterface.hh"
33 #include "Exception.hh"
34 
38 
40 const TCEString IPXactResetInterface::LIBRARY ="ip.hwp.interface";
41 const TCEString IPXactResetInterface::NAME ="reset.busdef";
47 const TCEString IPXactResetInterface::ABS_NAME = "reset.absDef";
50 
53 
55 
60 }
61 
63 }
64 
65 bool
67  for (size_t i = 0; i < toplevel.portCount(); i++) {
68  if (toplevel.port(i).name() == TTA_RESET_PORT) {
70  return true;
71  }
72  }
73  TCEString msg = "Reset port " + TTA_RESET_PORT + " not found!";
74  InvalidData exc(__FILE__, __LINE__, "IPXactResetInterface", msg);
75  throw exc;
76 
77  return false;
78 }
79 
80 
IPXactModel::SLAVE
@ SLAVE
Definition: IPXactModel.hh:54
IPXactInterface::setInstanceName
void setInstanceName(const TCEString &name)
Definition: IPXactInterface.cc:89
ProGe::NetlistBlock
Definition: NetlistBlock.hh:61
Exception.hh
IPXactInterface::addSignalMapping
virtual void addSignalMapping(const TCEString &actualSignal, const TCEString &busSignal)
Definition: IPXactInterface.cc:79
IPXactResetInterface::~IPXactResetInterface
virtual ~IPXactResetInterface()
Definition: IPXactResetInterface.cc:62
IPXactResetInterface::NAME
static const TCEString NAME
Definition: IPXactResetInterface.hh:54
IPXactResetInterface::IPXactResetInterface
IPXactResetInterface()
Definition: IPXactResetInterface.cc:54
IPXactResetInterface::SPIRIT_RESET_PORT
static const TCEString SPIRIT_RESET_PORT
Definition: IPXactResetInterface.hh:49
IPXactResetInterface::VENDOR
static const TCEString VENDOR
Definition: IPXactResetInterface.hh:52
IPXactResetInterface::ABS_NAME
static const TCEString ABS_NAME
Definition: IPXactResetInterface.hh:58
IPXactResetInterface::ABS_VENDOR
static const TCEString ABS_VENDOR
Definition: IPXactResetInterface.hh:56
ProGe::NetlistBlock::portCount
virtual size_t portCount() const
Definition: BaseNetlistBlock.cc:248
IPXactInterface::setBusMode
void setBusMode(IPXactModel::BusMode mode)
Definition: IPXactInterface.cc:95
IPXactResetInterface::ABS_VERSION
static const TCEString ABS_VERSION
Definition: IPXactResetInterface.hh:59
IPXactInterface
Definition: IPXactInterface.hh:41
InvalidData
Definition: Exception.hh:149
IPXactModel::BusMode
BusMode
Definition: IPXactModel.hh:50
IPXactResetInterface::mapPortsToInterface
virtual bool mapPortsToInterface(const ProGe::NetlistBlock &toplevel)
Definition: IPXactResetInterface.cc:66
IPXactResetInterface.hh
IPXactResetInterface::DEFAULT_BUS_MODE
static const IPXactModel::BusMode DEFAULT_BUS_MODE
Definition: IPXactResetInterface.hh:61
IPXactInterface::setBusType
void setBusType(const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
Definition: IPXactInterface.cc:101
IPXactResetInterface::TTA_RESET_PORT
static const TCEString TTA_RESET_PORT
Definition: IPXactResetInterface.hh:48
ProGe::NetlistPort::name
std::string name() const
Definition: NetlistPort.cc:283
IPXactResetInterface::LIBRARY
static const TCEString LIBRARY
Definition: IPXactResetInterface.hh:53
TCEString
Definition: TCEString.hh:53
IPXactResetInterface::DEFAULT_INSTANCE_NAME
static const TCEString DEFAULT_INSTANCE_NAME
Definition: IPXactResetInterface.hh:51
IPXactResetInterface::BUS_VERSION
static const TCEString BUS_VERSION
Definition: IPXactResetInterface.hh:55
IPXactResetInterface::ABS_LIBRARY
static const TCEString ABS_LIBRARY
Definition: IPXactResetInterface.hh:57
IPXactInterface::setBusAbsType
void setBusAbsType(const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
Definition: IPXactInterface.cc:114
ProGe::NetlistBlock::port
virtual NetlistPort * port(const std::string &portName, bool partialMatch=true)
Definition: NetlistBlock.cc:97