Go to the documentation of this file.
59 "spirit:mirroredMaster";
62 "spirit:mirroredSlave";
65 "spirit:mirroredSystem";
71 "spirit:physicalPort";
111 vlnv_(
"",
"",
"",
""), signals_(), parameters_(), busInterfaces_(),
112 addressSpaces_(), hdlFiles_(), otherFiles_() {
116 : vlnv_(
"",
"",
"",
""),
128 for (
unsigned int i = 0; i <
signals_.size(); i++) {
202 busInterfaces->
addChild(busInterface);
211 addressSpaces->
addChild(addressSpace);
219 for (
unsigned int i = 0; i <
signals_.size(); i++) {
238 for (
unsigned int i = 0; i <
hdlFiles_.size(); i++) {
244 for (
unsigned int i = 0; i <
otherFiles_.size(); i++) {
283 for (
unsigned int i = 0; i < files.size(); i++) {
344 }
else if (busMode ==
SLAVE) {
350 InvalidData exc(__FILE__, __LINE__,
"IPXactModel", msg);
359 for (
unsigned int i = 0; i < signalMap.size(); i++) {
365 compPortName->
setValue(signalMap.at(i)->first);
370 busPortName->
setValue(signalMap.at(i)->second);
425 assert(
false &&
"unknown direction");
438 leftBorder = width-1;
451 assert(
false &&
"unknown port type");
454 if (vector != NULL) {
465 for (
unsigned int i = 0; i <
parameters_.size(); i++) {
537 setVLNV(vendor, library, name, version);
568 for (
int i = 0; i < busInterfaces->
childCount(); i++) {
596 TCEString msg =
"Bus has no abstraction type";
639 for (
int i = 0; i < addressSpaces->
childCount(); i++) {
652 TCEString errorMsg =
"Address space has no ";
657 __FILE__, __LINE__,
"IPXactModel", errorMsg);
660 errorMsg <<
"range.";
663 __FILE__, __LINE__,
"IPXactModel", errorMsg);
666 errorMsg <<
"width.";
669 __FILE__, __LINE__,
"IPXactModel", errorMsg);
705 assert(
false &&
"Unknown bus mode!");
720 for (
int i = 0; i < portMaps->
childCount(); i++) {
737 TCEString msg =
"Bus interface port map is invalid";
751 TCEString msg =
"Port name missing from port map";
762 if (busPortName.empty() || compPortName.empty()) {
763 TCEString msg =
"Port name is empty in port map";
777 for (
int i = 0; i < signals->
childCount(); i++) {
792 TCEString msg =
"Wire node not found from Port!";
793 InvalidData exc(__FILE__, __LINE__,
"IPXactModel", msg);
802 }
else if (dir ==
"out") {
804 }
else if (dir ==
"inout") {
807 assert(
false &&
"Unknown direction");
810 TCEString msg =
"Port does not have direction!";
811 InvalidData exc(__FILE__, __LINE__,
"IPXactModel", msg);
830 if (leftBorder < rightBorder) {
831 TCEString msg =
"Reversed bit order is not supported";
837 width = leftBorder - rightBorder + 1;
854 for (
int i = 0; i < fileSets->
childCount(); i++) {
861 InvalidData exc(__FILE__, __LINE__,
"IPXactModel", msg);
906 vector<IPXactInterface*> available;
912 for (
unsigned int i = 0; i < available.size(); i++) {
914 if (available.at(i)->busType() == type &&
915 available.at(i)->busAbstractionType() == absType &&
916 available.at(i)->busMode() ==
mode) {
917 interface = available.at(i);
923 delete available.at(i);
933 for (
int i = 0; i < modelParameters->
childCount(); i++) {
946 TCEString msg =
"Model parameter has no name";
953 TCEString msg =
"Model parameter has no value";
std::vector< IPXactAddressSpace * > addressSpaces_
static const TCEString OSNAME_VECTOR
virtual TCEString instanceName() const
bool hasAttribute(const std::string &name) const
void setInstanceName(const TCEString &name)
static const TCEString OTHER_FILE
std::string stringAttribute(const std::string &name) const
void extractAddressSpace(const ObjectState *as)
void setValue(const TCEString &value)
static const TCEString OSNAME_BUS_INTERFACES
IPXact::Vlnv extractVlnvFromAttr(const ObjectState *busType) const
static const TCEString OSNAME_BUS_MASTER
@ BIT_VECTOR
Several bits.
virtual void addSignalMapping(const TCEString &actualSignal, const TCEString &busSignal)
static const std::string OSNAME_ADDRESS_SPACES
virtual IPXactModel::BusMode busMode() const
static const TCEString OSNAME_PORT_LEFT
std::vector< SignalMapping * > SignalMappingList
void addSignalObject(const HDLPort *port, ObjectState *parent) const
static const TCEString OSNAME_BUS_SLAVE
static const TCEString OSNAME_LIBRARY
void addFileObject(const TCEString &name, const TCEString &type, ObjectState *parent) const
BusMode extractBusMode(const ObjectState *busInterface) const
void extractVLNV(const ObjectState *root)
static const TCEString OSNAME_BUS_PORT_MAP_COMP
static const TCEString OSNAME_FILESET
@ BIDIR
Bidirectional port.
ProGe::DataType type() const
static const TCEString OSNAME_BUS_INTERFACE
static const TCEString OSNAME_BUS_MIRRORED_SYSTEM
static const TCEString OSNAME_BUS_MONITOR
virtual IPXact::Vlnv busAbstractionType() const
void extractPortMap(const ObjectState *portMap, IPXactInterface &interface) const
static const TCEString OSNAME_FILE
void addBusInterfaceObject(const IPXactInterface *bus, ObjectState *parent) const
TCEString version
Entity version.
static std::string toString(const T &source)
std::vector< HDLPort * > signals_
virtual IPXact::Vlnv busType() const
TCEString vendor
Vendor name.
static const TCEString HDL_SET_ID
static const TCEString VHDL_FILE
static const TCEString RESOLVE_USER
ObjectState * childByName(const std::string &name) const
static const TCEString OSNAME_BUS_PORT_MAP_NAME
#define assert(condition)
static const TCEString OSNAME_BUS_PORT_MAPS
static const TCEString OSNAME_DISPLAY_NAME
TCEString library
Library name.
static const TCEString OSNAME_BUS_MIRRORED_SLAVE
std::vector< TCEString > otherFiles_
static const TCEString OSNAME_NAME
std::vector< ProGe::Parameter > parameters_
void setHdlFile(const TCEString &file)
IPXactInterface * interfaceByType(const IPXact::Vlnv &type, const IPXact::Vlnv &absType, const TCEString instanceName, BusMode mode) const
void setName(const TCEString &name)
static const std::string OSNAME_ADDRESS_SPACE
static const TCEString OSNAME_MODEL_PARAMS
static const TCEString OSNAME_BUS_SYSTEM
static const TCEString OSNAME_PORT_RIGHT
void addAddressSpace(IPXactAddressSpace *addrSpace)
static const std::string OSNAME_AS_MAU
static const TCEString OSNAME_FILESETS
static const TCEString OSNAME_FILE_NAME
void setFile(const TCEString &file)
static const TCEString OSNAME_VENDOR
ObjectState * child(int index) const
void addChild(ObjectState *child)
static const TCEString OSNAME_BUS_ABS_TYPE
static const TCEString OSNAME_PORTS
void extractPortMappings(const ObjectState *portMaps, IPXactInterface &interface) const
void addParameter(const ProGe::Parameter ¶meter)
bool hasChild(const std::string &name) const
void addModelParamsObject(ObjectState *parent) const
static const TCEString LONG_PARAM
void extractModelParams(const ObjectState *modelParameters)
static const std::string OSNAME_AS_RANGE
void extractBusInterface(const ObjectState *busInterface)
void extractBusInterfaces(const ObjectState *busInterfaces)
static const TCEString OSNAME_WIRE
static const TCEString OSNAME_PORT_DIRECTION
static const TCEString OSNAME_BUS_MIRRORED_MASTER
ProGe::Direction direction() const
int memLocationWidth() const
std::vector< IPXactInterface * > busInterfaces_
void extractAddressSpaces(const ObjectState *addressSpaces)
void setType(const TCEString &type)
void setHdlFiles(const std::vector< TCEString > &files)
void extractSignals(const ObjectState *signals)
DataType
Data types of hardware ports.
static const std::string OSNAME_AS_WIDTH
static const TCEString OSNAME_ATTR_FORMAT
virtual const PlatInt::SignalMappingList & interfaceMapping() const
static const TCEString OSNAME_BUS_TYPE
std::string stringValue() const
void extractModelParam(const ObjectState *modelParameter)
static const TCEString OSNAME_MODEL
static const TCEString INTEGER_PARAM
static const TCEString OSNAME_BUS_PORT_MAP
static const TCEString OSNAME_FILE_TYPE
static const TCEString OSNAME_BUS_PORT_MAP_BUS
void extractFiles(const ObjectState *fileSets)
bool hasRealWidth() const
static const TCEString OSNAME_ATTR_DATA_TYPE
virtual void loadState(const ObjectState *state)
void addBusInterface(IPXactInterface *interface)
std::vector< TCEString > hdlFiles_
void addAddressSpaceObject(const IPXactAddressSpace *as, ObjectState *parent) const
TCEString name
Entity name.
void addSignal(const HDLPort &signal)
Direction
Direction of the port.
static const TCEString STRING_PARAM
static const TCEString DEV_FAMILY_GENERIC
void setValue(const std::string &value)
static const TCEString OSNAME_ATTR_ID
static const TCEString OSNAME_VALUE
static const TCEString OSNAME_PORT
void setAttribute(const std::string &name, const std::string &value)
static const TCEString OSNAME_ATTR_RESOLVE
static const TCEString OSNAME_MODEL_PARAM
static const TCEString OSNAME_IPXACT_MODEL
void setVLNV(TCEString vendor, TCEString library, TCEString name, TCEString version)
virtual ObjectState * saveState() const
static const TCEString OSNAME_VERSION