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