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

Private GIT Repository
nearly finished GroupBlock VHDL gen
[blast.git] / ReferenceBlock.cpp
index fbf78283e3e89259c1544ae00bd4be220e366de2..9d6eb537984c3a6f2295ce73d11c5038a7e827a7 100644 (file)
@@ -6,6 +6,7 @@
 #include "BlockParameterGeneric.h"
 #include "BlockParameterPort.h"
 #include "BlockParameterWishbone.h"
+#include "Parameters.h"
 
 ReferenceBlock::ReferenceBlock(const QString _xmlFile) : AbstractBlock() {
   xmlFile = _xmlFile;
@@ -94,7 +95,7 @@ void ReferenceBlock::loadInformations(QDomElement &elt) throw(Exception) {
   }
   else {
     QDomText txtName = nodeNameTxt.toText();
-    name = txtName.data().trimmed();
+    name = Parameters::normalizeName(txtName.data().trimmed());
     cout<< "block name : " << qPrintable(name) << endl;
   }
 
@@ -423,7 +424,7 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) {
     if (iface->getPurpose() == AbstractInterface::Control) {
       toWrite << iface->getName();
       toWrite << iface->getType();
-      toWrite << iface->getWidth();
+      toWrite << iface->getWidthString();
       toWrite << iface->getPurpose();
       toWrite << iface->getDirection();    
       toWrite << iface->getMultiplicity();
@@ -435,7 +436,7 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) {
     if (iface->getPurpose() != AbstractInterface::Control) {
       toWrite << iface->getName();
       toWrite << iface->getType();
-      toWrite << iface->getWidth();
+      toWrite << iface->getWidthString();
       toWrite << iface->getPurpose();
       toWrite << iface->getDirection();    
       toWrite << iface->getMultiplicity();
@@ -448,7 +449,7 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) {
     if (iface->getPurpose() == AbstractInterface::Control) {
       toWrite << iface->getName();
       toWrite << iface->getType();
-      toWrite << iface->getWidth();
+      toWrite << iface->getWidthString();
       toWrite << iface->getPurpose();
       toWrite << iface->getDirection();    
       toWrite << iface->getMultiplicity();
@@ -460,7 +461,7 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) {
     if (iface->getPurpose() != AbstractInterface::Control) {
       toWrite << iface->getName();
       toWrite << iface->getType();
-      toWrite << iface->getWidth();
+      toWrite << iface->getWidthString();
       toWrite << iface->getPurpose();
       toWrite << iface->getDirection();    
       toWrite << iface->getMultiplicity();
@@ -471,7 +472,7 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) {
     ReferenceInterface *iface = (ReferenceInterface *)(b.bidirs.at(i));
     toWrite << iface->getName();
     toWrite << iface->getType();
-    toWrite << iface->getWidth();
+    toWrite << iface->getWidthString();
     toWrite << iface->getPurpose();
     toWrite << iface->getDirection();    
     toWrite << iface->getMultiplicity();
@@ -633,3 +634,29 @@ void ReferenceBlock::computeAdmittanceDelays() throw(Exception) {
   // does strictly nothing
   throw(Exception(INVALID_REFBLOCK_USE));
 }
+
+
+void ReferenceBlock::generateVHDL(const QString& path) throw(Exception){
+ throw(Exception(INVALID_REFBLOCK_USE));
+}
+
+void ReferenceBlock::generateComments(QTextStream& out, QDomElement &elt, QString coreFile) throw(Exception) {
+  throw(Exception(INVALID_REFBLOCK_USE));
+}
+
+void ReferenceBlock::generateLibraries(QTextStream& out, QDomElement &elt) throw(Exception) {
+  throw(Exception(INVALID_REFBLOCK_USE));
+}
+
+void ReferenceBlock::generateArchitecture(QTextStream& out, QDomElement &elt ) throw(Exception) {
+  throw(Exception(INVALID_REFBLOCK_USE));
+}
+
+void ReferenceBlock::generateController(QTextStream& out) throw(Exception) {
+  throw(Exception(INVALID_REFBLOCK_USE));
+}
+
+void ReferenceBlock::generateEntityOrComponentBody(QTextStream &out, int indentLevel, bool hasController) throw(Exception) {
+  throw(Exception(INVALID_REFBLOCK_USE));
+}
+