]> AND Private Git Repository - blast.git/blobdiff - GroupInterface.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
started clkconvert output gen
[blast.git] / GroupInterface.cpp
index b42e7a047020869c98cbe341d8804f455106a0bc..bfeb1ff2373a4fe113854772826892dd9f0187d3 100644 (file)
@@ -129,6 +129,32 @@ bool GroupInterface::canConnectFrom(AbstractInterface *iface) {
   return false;
 }
 
   return false;
 }
 
+int GroupInterface::getClockDomain() throw(Exception) {
+
+  int idClock = -1;
+
+  GroupInterface* iface = NULL;
+  if (clkIfaceType == ClockName) {
+    iface = AI_TO_GRP(getClockIface());
+  }
+  else if ((direction == Input) && (purpose == Clock)) {
+    iface = this;
+  }
+
+  if ( iface != NULL) {
+
+    QString name = iface->getName();
+    name.remove(0,8);
+    bool ok;
+    idClock = name.toInt(&ok);
+    if (!ok) throw(Exception(IFACE_INVALID_CLKFREQ,this));
+
+  }
+
+  return idClock;
+}
+
+
 void GroupInterface::connectionsValidation(QStack<AbstractInterface*> *interfacetoValidate, QList<AbstractInterface*> *validatedInterfaces) throw(Exception) {
     cout << "group interface connection validation" << endl;
 }
 void GroupInterface::connectionsValidation(QStack<AbstractInterface*> *interfacetoValidate, QList<AbstractInterface*> *validatedInterfaces) throw(Exception) {
     cout << "group interface connection validation" << endl;
 }