OpenASIP  2.0
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
IPXactHibiInterface Class Reference

#include <IPXactHibiInterface.hh>

Inheritance diagram for IPXactHibiInterface:
Inheritance graph
Collaboration diagram for IPXactHibiInterface:
Collaboration graph

Public Member Functions

 IPXactHibiInterface ()
 
virtual ~IPXactHibiInterface ()
 
virtual bool mapPortsToInterface (const ProGe::NetlistBlock &toplevel)
 
- Public Member Functions inherited from IPXactInterface
 IPXactInterface ()
 
virtual ~IPXactInterface ()
 
virtual TCEString instanceName () const
 
virtual IPXact::Vlnv busType () const
 
virtual IPXact::Vlnv busAbstractionType () const
 
virtual IPXactModel::BusMode busMode () const
 
virtual const PlatInt::SignalMappingListinterfaceMapping () const
 
virtual void addSignalMapping (const TCEString &actualSignal, const TCEString &busSignal)
 
void setInstanceName (const TCEString &name)
 

Private Member Functions

void createInstanceName (const TCEString &fullName, const TCEString &portName)
 

Private Attributes

PlatInt::SignalMappingList interfaceSearch_
 Mapping of known port names and interface port names. More...
 

Static Private Attributes

static const TCEString DEFAULT_INSTANCE_NAME = "hibi_p"
 
static const TCEString VENDOR = "TUT"
 
static const TCEString LIBRARY ="ip.hwp.communication"
 
static const TCEString NAME ="hibi_ip_r4.busdef"
 
static const TCEString BUS_VERSION = "2.0"
 
static const TCEString ABS_VENDOR
 
static const TCEString ABS_LIBRARY
 
static const TCEString ABS_NAME = "hibi_ip_r4.absdef"
 
static const TCEString ABS_VERSION
 
static const IPXactModel::BusMode DEFAULT_BUS_MODE
 

Additional Inherited Members

- Protected Member Functions inherited from IPXactInterface
void setBusMode (IPXactModel::BusMode mode)
 
void setBusType (const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
 
void setBusAbsType (const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
 

Detailed Description

Definition at line 38 of file IPXactHibiInterface.hh.

Constructor & Destructor Documentation

◆ IPXactHibiInterface()

IPXactHibiInterface::IPXactHibiInterface ( )

Definition at line 55 of file IPXactHibiInterface.cc.

55  :
57 
61 
63 
64  interfaceSearch_.push_back(
65  new pair<TCEString,TCEString>("hibi_comm_out", "COMM_FROM_IP"));
66  interfaceSearch_.push_back(
67  new pair<TCEString,TCEString>("hibi_data_out", "DATA_FROM_IP"));
68  interfaceSearch_.push_back(
69  new pair<TCEString,TCEString>("hibi_av_out", "AV_FROM_IP"));
70  interfaceSearch_. push_back(
71  new pair<TCEString,TCEString>("hibi_we_out", "WE_FROM_IP"));
72  interfaceSearch_.push_back(
73  new pair<TCEString,TCEString>("hibi_re_out", "RE_FROM_IP"));
74  interfaceSearch_.push_back(
75  new pair<TCEString,TCEString>("hibi_comm_in", "COMM_TO_IP"));
76  interfaceSearch_.push_back(
77  new pair<TCEString,TCEString>("hibi_data_in", "DATA_TO_IP"));
78  interfaceSearch_.push_back(
79  new pair<TCEString,TCEString>("hibi_av_in", "AV_TO_IP"));
80  interfaceSearch_. push_back(
81  new pair<TCEString,TCEString>("hibi_full_in", "FULL_TO_IP"));
82  interfaceSearch_.push_back(
83  new pair<TCEString,TCEString>("hibi_empty_in", "EMPTY_TO_IP"));
84 }

References ABS_LIBRARY, ABS_NAME, ABS_VENDOR, ABS_VERSION, BUS_VERSION, DEFAULT_BUS_MODE, DEFAULT_INSTANCE_NAME, interfaceSearch_, LIBRARY, NAME, IPXactInterface::setBusAbsType(), IPXactInterface::setBusMode(), IPXactInterface::setBusType(), IPXactInterface::setInstanceName(), and VENDOR.

Here is the call graph for this function:

◆ ~IPXactHibiInterface()

IPXactHibiInterface::~IPXactHibiInterface ( )
virtual

Definition at line 86 of file IPXactHibiInterface.cc.

86  {
87 
88  for (unsigned int i = 0; i < interfaceSearch_.size(); i++) {
89  delete interfaceSearch_.at(i);
90  }
91 }

References interfaceSearch_.

Member Function Documentation

◆ createInstanceName()

void IPXactHibiInterface::createInstanceName ( const TCEString fullName,
const TCEString portName 
)
private

Definition at line 125 of file IPXactHibiInterface.cc.

127  {
128 
129  TCEString fu = "";
130  TCEString::size_type pos = fullName.find(portName);
131  if (pos == TCEString::npos || pos == 0) {
132  fu = fullName;
133  } else {
134  fu = StringTools::trim(fullName.substr(0, pos));
135  }
136  TCEString instance = fu + DEFAULT_INSTANCE_NAME;
137  setInstanceName(instance);
138 }

References DEFAULT_INSTANCE_NAME, IPXactInterface::setInstanceName(), and StringTools::trim().

Referenced by mapPortsToInterface().

Here is the call graph for this function:

◆ mapPortsToInterface()

bool IPXactHibiInterface::mapPortsToInterface ( const ProGe::NetlistBlock toplevel)
virtual

Implements IPXactInterface.

Definition at line 94 of file IPXactHibiInterface.cc.

95  {
96 
97  bool instanceNameSet = false;
98  for (unsigned int i = 0; i < interfaceSearch_.size(); i++) {
99  for (size_t j = 0; j < toplevel.portCount(); j++) {
100  TCEString interfacePort = interfaceSearch_.at(i)->first;
101  const NetlistPort& port = toplevel.port(j);
102  if (port.name().find(interfacePort) != TCEString::npos) {
103  TCEString abstractPort = interfaceSearch_.at(i)->second;
104  addSignalMapping(port.name(), abstractPort);
105  if (!instanceNameSet) {
106  createInstanceName(port.name(), interfacePort);
107  instanceNameSet = true;
108  }
109  break;
110  }
111  }
112  if (interfaceMapping().size() == 0) {
113  // does not contain this interface
114  return false;
115  }
116  }
117  bool foundAllPorts = false;
118  if (interfaceSearch_.size() == interfaceMapping().size()) {
119  foundAllPorts = true;
120  }
121  return foundAllPorts;
122 }

References IPXactInterface::addSignalMapping(), createInstanceName(), IPXactInterface::interfaceMapping(), interfaceSearch_, ProGe::NetlistPort::name(), ProGe::NetlistBlock::port(), and ProGe::NetlistBlock::portCount().

Here is the call graph for this function:

Member Data Documentation

◆ ABS_LIBRARY

const TCEString IPXactHibiInterface::ABS_LIBRARY
staticprivate
Initial value:

Definition at line 61 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().

◆ ABS_NAME

const TCEString IPXactHibiInterface::ABS_NAME = "hibi_ip_r4.absdef"
staticprivate

Definition at line 62 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().

◆ ABS_VENDOR

const TCEString IPXactHibiInterface::ABS_VENDOR
staticprivate
Initial value:

Definition at line 60 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().

◆ ABS_VERSION

const TCEString IPXactHibiInterface::ABS_VERSION
staticprivate
Initial value:

Definition at line 63 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().

◆ BUS_VERSION

const TCEString IPXactHibiInterface::BUS_VERSION = "2.0"
staticprivate

Definition at line 59 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().

◆ DEFAULT_BUS_MODE

const IPXactModel::BusMode IPXactHibiInterface::DEFAULT_BUS_MODE
staticprivate
Initial value:

Definition at line 65 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().

◆ DEFAULT_INSTANCE_NAME

const TCEString IPXactHibiInterface::DEFAULT_INSTANCE_NAME = "hibi_p"
staticprivate

Definition at line 55 of file IPXactHibiInterface.hh.

Referenced by createInstanceName(), and IPXactHibiInterface().

◆ interfaceSearch_

PlatInt::SignalMappingList IPXactHibiInterface::interfaceSearch_
private

Mapping of known port names and interface port names.

Definition at line 53 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface(), mapPortsToInterface(), and ~IPXactHibiInterface().

◆ LIBRARY

const TCEString IPXactHibiInterface::LIBRARY ="ip.hwp.communication"
staticprivate

Definition at line 57 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().

◆ NAME

const TCEString IPXactHibiInterface::NAME ="hibi_ip_r4.busdef"
staticprivate

Definition at line 58 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().

◆ VENDOR

const TCEString IPXactHibiInterface::VENDOR = "TUT"
staticprivate

Definition at line 56 of file IPXactHibiInterface.hh.

Referenced by IPXactHibiInterface().


The documentation for this class was generated from the following files:
IPXactHibiInterface::ABS_LIBRARY
static const TCEString ABS_LIBRARY
Definition: IPXactHibiInterface.hh:61
IPXactInterface::setInstanceName
void setInstanceName(const TCEString &name)
Definition: IPXactInterface.cc:89
IPXactHibiInterface::BUS_VERSION
static const TCEString BUS_VERSION
Definition: IPXactHibiInterface.hh:59
IPXactHibiInterface::LIBRARY
static const TCEString LIBRARY
Definition: IPXactHibiInterface.hh:57
IPXactInterface::addSignalMapping
virtual void addSignalMapping(const TCEString &actualSignal, const TCEString &busSignal)
Definition: IPXactInterface.cc:79
IPXactHibiInterface::NAME
static const TCEString NAME
Definition: IPXactHibiInterface.hh:58
IPXactInterface::IPXactInterface
IPXactInterface()
Definition: IPXactInterface.cc:36
IPXactHibiInterface::interfaceSearch_
PlatInt::SignalMappingList interfaceSearch_
Mapping of known port names and interface port names.
Definition: IPXactHibiInterface.hh:53
IPXactHibiInterface::DEFAULT_INSTANCE_NAME
static const TCEString DEFAULT_INSTANCE_NAME
Definition: IPXactHibiInterface.hh:55
IPXactHibiInterface::DEFAULT_BUS_MODE
static const IPXactModel::BusMode DEFAULT_BUS_MODE
Definition: IPXactHibiInterface.hh:65
ProGe::NetlistBlock::portCount
virtual size_t portCount() const
Definition: BaseNetlistBlock.cc:248
IPXactHibiInterface::VENDOR
static const TCEString VENDOR
Definition: IPXactHibiInterface.hh:56
IPXactInterface::setBusMode
void setBusMode(IPXactModel::BusMode mode)
Definition: IPXactInterface.cc:95
IPXactHibiInterface::createInstanceName
void createInstanceName(const TCEString &fullName, const TCEString &portName)
Definition: IPXactHibiInterface.cc:125
IPXactInterface::setBusType
void setBusType(const TCEString &vendor, const TCEString &library, const TCEString &name, const TCEString &version)
Definition: IPXactInterface.cc:101
ProGe::NetlistPort::name
std::string name() const
Definition: NetlistPort.cc:283
StringTools::trim
static std::string trim(const std::string &source)
Definition: StringTools.cc:55
TCEString
Definition: TCEString.hh:53
IPXactInterface::interfaceMapping
virtual const PlatInt::SignalMappingList & interfaceMapping() const
Definition: IPXactInterface.cc:73
ProGe::NetlistPort
Definition: NetlistPort.hh:70
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
IPXactModel::MASTER
@ MASTER
Definition: IPXactModel.hh:52
IPXactHibiInterface::ABS_NAME
static const TCEString ABS_NAME
Definition: IPXactHibiInterface.hh:62
IPXactHibiInterface::ABS_VERSION
static const TCEString ABS_VERSION
Definition: IPXactHibiInterface.hh:63
IPXactHibiInterface::ABS_VENDOR
static const TCEString ABS_VENDOR
Definition: IPXactHibiInterface.hh:60