int duration = 0;
QString wbValue = "";
QStringList listWb = wbStr.split(",");
+ cout << "wb param has:";
+ foreach(QString s, listWb) {
+ cout << qPrintable(s) << " | ";
+ }
+ cout << endl;
if (listWb.at(0) == "r") {
access = BlockParameter::Read;
}
- else if (wbStr == "w") {
+ else if (listWb.at(0) == "w") {
access = BlockParameter::Write;
bool ok;
wbValue = listWb.at(1).toInt(&ok);
nameStr = eltOutput.attribute("name","none");
typeStr = eltOutput.attribute("type","none");
widthStr = eltOutput.attribute("width","none");
- purposeStr = eltOutput.attribute("type","none");
+ purposeStr = eltOutput.attribute("purpose","none");
purpose = ReferenceInterface::translatePurpose(purposeStr);
multStr = eltOutput.attribute("multiplicity","none");
mult = ReferenceInterface::translateMultiplicity(multStr);
nameStr = eltBidir.attribute("name","none");
typeStr = eltBidir.attribute("type","none");
widthStr = eltBidir.attribute("width","none");
- purposeStr = eltBidir.attribute("type","none");
+ purposeStr = eltBidir.attribute("purpose","none");
purpose = ReferenceInterface::translatePurpose(purposeStr);
multStr = eltBidir.attribute("multiplicity","none");
mult = ReferenceInterface::translateMultiplicity(multStr);
foreach(BlockParameter* param, params) {
if (param->isWishboneParameter()) {
- BlockParameterWishbone* p = (BlockParameterWishbone*)param;
- int orientation = -1;
+
+ BlockParameterWishbone* p = (BlockParameterWishbone*)param;
+ cout << "creating interface for parameter wb " << qPrintable(p->getName()) << endl;
+
if (p->getWBAccess() == BlockParameter::Read) {
- iface = new ReferenceInterface(this,p->getName(),p->getType(),p->getWidth(), AbstractInterface::Output, AbstractInterface::Wishbone,1);
+ iface = new ReferenceInterface(this,p->getName(),p->getTypeString(),p->getWidth(), AbstractInterface::Output, AbstractInterface::Wishbone,1);
outputs.append(iface);
}
else if (p->getWBAccess() == BlockParameter::Write) {
- iface = new ReferenceInterface(this,p->getName(),p->getType(),p->getWidth(), AbstractInterface::Input, AbstractInterface::Wishbone,1);
+ iface = new ReferenceInterface(this,p->getName(),p->getTypeString(),p->getWidth(), AbstractInterface::Input, AbstractInterface::Wishbone,1);
inputs.append(iface);
}
- ReferenceInterface* iface = new ReferenceInterface(this,p->getName(),p->getType(),p->getWidth(), orientation, AbstractInterface::Wishbone,1);
+ else {
+ throw (Exception(BLOCKFILE_CORRUPTED));
+ }
}
}
}