- toWrite << iface->getName();
- toWrite << iface->getWidth();
- toWrite << iface->getPurpose();
- toWrite << iface->getDirection();
- toWrite << iface->getLevel();
- toWrite << iface->getMultiplicity();
+ if (iface->getPurpose() == AbstractInterface::Clock) {
+ toWrite << iface->getName();
+ toWrite << iface->getType();
+ toWrite << iface->getWidthString();
+ toWrite << iface->getPurpose();
+ toWrite << iface->getDirection();
+ toWrite << iface->getMultiplicity();
+ toWrite << iface->getClockIfaceType();
+ toWrite << iface->getClockIfaceString();
+ }
+ }
+ // secondly write control ifaces
+ for(int i=0; i<b.inputs.size(); i++){
+ ReferenceInterface *iface = (ReferenceInterface *)(b.inputs.at(i));
+ if (iface->getPurpose() == AbstractInterface::Control) {
+ toWrite << iface->getName();
+ toWrite << iface->getType();
+ toWrite << iface->getWidthString();
+ toWrite << iface->getPurpose();
+ toWrite << iface->getDirection();
+ toWrite << iface->getMultiplicity();
+ toWrite << iface->getClockIfaceType();
+ toWrite << iface->getClockIfaceString();
+ }
+ }
+ // thirdly, write other ifaces
+ for(int i=0; i<b.inputs.size(); i++){
+ ReferenceInterface *iface = (ReferenceInterface *)(b.inputs.at(i));
+ if ((iface->getPurpose() != AbstractInterface::Control) && (iface->getPurpose() != AbstractInterface::Clock)) {
+ toWrite << iface->getName();
+ toWrite << iface->getType();
+ toWrite << iface->getWidthString();
+ toWrite << iface->getPurpose();
+ toWrite << iface->getDirection();
+ toWrite << iface->getMultiplicity();
+ toWrite << iface->getClockIfaceType();
+ toWrite << iface->getClockIfaceString();
+ }