OpenASIP 2.2
Loading...
Searching...
No Matches
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
40const TCEString IPXactClkInterface::LIBRARY ="ip.hwp.interface";
41const TCEString IPXactClkInterface::NAME ="clock.busdef";
47const TCEString IPXactClkInterface::ABS_NAME = "clock.absDef";
50
53
61
64
65bool
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
static const TCEString SPIRIT_CLK_PORT
static const TCEString VENDOR
virtual bool mapPortsToInterface(const ProGe::NetlistBlock &toplevel)
static const IPXactModel::BusMode DEFAULT_BUS_MODE
static const TCEString ABS_LIBRARY
static const TCEString LIBRARY
static const TCEString DEFAULT_INSTANCE_NAME
static const TCEString NAME
static const TCEString BUS_VERSION
static const TCEString ABS_NAME
static const TCEString ABS_VENDOR
static const TCEString ABS_VERSION
static const TCEString TTA_CLK_PORT
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)
virtual NetlistPort * port(const std::string &portName, bool partialMatch=true)
virtual size_t portCount() const
std::string name() const