- inter = new ReferenceInterface(this,nameStr,AbstractInterface::Input, purpose, typeStr, widthStr, endianess, mult);
- inputs.append(inter);
+ multStr = eltInput.attribute("multiplicity","none");
+ mult = ReferenceInterface::translateMultiplicity(multStr);
+
+ iface = new ReferenceInterface(this,nameStr, AbstractInterface::Input, purpose, typeStr, widthStr, endianess, mult);
+ if (clockStr == "none") {
+ if (clocks.size() > 1) {
+ // if several clocks, the associated one MUST be given
+ throw (Exception(BLOCKFILE_CORRUPTED));
+ }
+ // no clock given, take the single one
+ clockStr = clocks.at(0)->getName();
+ }
+ if (! iface->checkSetClockIface(clockStr)) {
+ throw (Exception(BLOCKFILE_CORRUPTED));
+ }
+ inputs.append(iface);
+ }