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

Private GIT Repository
finalized analysis with clkconvert + started testbench gen.
[blast.git] / ReferenceInterface.cpp
index faa51e842eb6e858d2f97ad69c68e92b7d2e9c8a..fdebeaa6d611eafe3e1ed5703ad382343161606a 100644 (file)
@@ -7,16 +7,25 @@ ReferenceInterface::ReferenceInterface(AbstractBlock* _owner)  throw(Exception)
 }
 
 ReferenceInterface::ReferenceInterface(AbstractBlock* _owner,
 }
 
 ReferenceInterface::ReferenceInterface(AbstractBlock* _owner,
-                                       const QString& _name, const QString&_type,
-                                       const QString& _width,
+                                       const QString& _name,
                                        int _direction,
                                        int _purpose,
                                        int _direction,
                                        int _purpose,
+                                       const QString& _type,
+                                       const QString& _width,
+                                       int _endianess,
                                        int _multiplicity)
                                        int _multiplicity)
-throw (Exception) : AbstractInterface(_owner, _name, _type, _width, _direction, _purpose) {
+throw (Exception) : AbstractInterface(_owner, _name, _direction, _purpose, _type, _width) {
 
   if (_owner->isReferenceBlock()) throw(Exception(BLOCK_INVALID_TYPE));
 
   multiplicity = _multiplicity;
 
   if (_owner->isReferenceBlock()) throw(Exception(BLOCK_INVALID_TYPE));
 
   multiplicity = _multiplicity;
+  
+  if (purpose == Control) {
+    // override some attributes with forced values
+    type = Boolean;
+    width = "1";
+    multiplicity = 1;
+  }  
   if (direction == InOut) {
     multiplicity = 1;
   }
   if (direction == InOut) {
     multiplicity = 1;
   }
@@ -42,9 +51,9 @@ int ReferenceInterface::translatePurpose(const QString& txt) {
   else if (txt == "reset") {
     return Reset;
   }
   else if (txt == "reset") {
     return Reset;
   }
-  if (txt == "wb") {
+  else if (txt == "wb") {
     return Wishbone;
     return Wishbone;
-  }
+  }  
   return Data;
 }
 
   return Data;
 }
 
@@ -62,3 +71,8 @@ int ReferenceInterface::translateMultiplicity(const QString& txt) {
   }
   return mult;
 }
   }
   return mult;
 }
+
+int ReferenceInterface::getClockDomain() throw(Exception) {
+
+  throw(Exception(IFACE_INVALID_TYPE,this));
+}