OpenASIP 2.2
Loading...
Searching...
No Matches
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 */
33#include "Exception.hh"
34
38
40const TCEString IPXactResetInterface::LIBRARY ="ip.hwp.interface";
41const TCEString IPXactResetInterface::NAME ="reset.busdef";
47const TCEString IPXactResetInterface::ABS_NAME = "reset.absDef";
50
53
61
64
65bool
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
void setBusMode(IPXactModel::BusMode mode)
virtual void addSignalMapping(const TCEString &actualSignal, const TCEString &busSignal)
void setBusType(const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
void setInstanceName(const TCEString &name)
void setBusAbsType(const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
static const TCEString ABS_VENDOR
static const TCEString DEFAULT_INSTANCE_NAME
static const TCEString SPIRIT_RESET_PORT
static const IPXactModel::BusMode DEFAULT_BUS_MODE
virtual bool mapPortsToInterface(const ProGe::NetlistBlock &toplevel)
static const TCEString NAME
static const TCEString ABS_LIBRARY
static const TCEString ABS_NAME
static const TCEString BUS_VERSION
static const TCEString VENDOR
static const TCEString TTA_RESET_PORT
static const TCEString ABS_VERSION
static const TCEString LIBRARY
virtual NetlistPort * port(const std::string &portName, bool partialMatch=true)
virtual size_t portCount() const
std::string name() const