X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/fc9f5b8b77edda9e49a35d8ef75c4d71caf1c832..e40a5399ec7887c2606f18575c809b0d05b09278:/VHDLConverter.h diff --git a/VHDLConverter.h b/VHDLConverter.h index 7ddce3d..fd57649 100644 --- a/VHDLConverter.h +++ b/VHDLConverter.h @@ -12,6 +12,8 @@ #include "Parameters.h" #include "Exception.h" +#include "ReferenceBlock.h" +#include "IfacePurposeDelegate.h" class VHDLConverter : public QWidget { Q_OBJECT @@ -22,49 +24,57 @@ public: private: QPushButton* loadBut; QPushButton* genBut; - - // clk & rst ports related - QTextEdit* clkNameEdit; - QTextEdit* rstNameEdit; - QComboBox* clkCombo; - QComboBox* rstCombo; - + + // entity related + QString entityName; + QString longName; + QLineEdit* editEntityName; + QLineEdit* editLongName; + // data ports related - QScrollArea *scrollDataPort; - QTableWidget* twDataPort; - - // wishbone ports related - QScrollArea *scrollWBPort; - QTableWidget* twWBPort; + QScrollArea *scrollPorts; + QTableWidget* twPorts; + IfacePurposeDelegate* purposeDelegate; // generics related QScrollArea* scrollGenerics; QTableWidget* twGenerics; + + // arch related + QString archName; + QList archLines; - int cptIn, cptOut, cptInout, cpt; - QRegExp *rxPort, *rxEnt, *rxArch, *rxComp, *rxComment, *rxComma, - *rxEndComp, *rxEnd, *rxGeneric, *rxEndGen, *rxGen, *rxConst, *rxWidth; - QString fileName, txt, s, entName, brief, desc; - - QHash* > packages; - - QWidget *wid; + // libraries related + QHash* > packages; - QTextEdit *teBrief, *teDesc, *teName; + QTextEdit *teBrief, *teDesc; - void readLibraries(QTextStream& in) throw(Exception); - void readEntity(QTextStream& in) throw(Exception); + ReferenceBlock* block; + + QList lstIface; + + QString readLibraries(QTextStream& in) throw(Exception); + QString readEntity(QTextStream& in) throw(Exception); void readGenerics(QTextStream& in) throw(Exception); void readPorts(QTextStream& in) throw(Exception); void readArchitecture(QTextStream& in) throw(Exception); QString skipBlankAndComments(QTextStream& in); - + + void generateRefXml(QDomDocument& doc); + void generateImplXml(QDomDocument& doc); + void replaceSignalNames(QString& line); + + void updateArchitecture(); + signals: public slots: void loadVHDLFile(); void generateXml(); + +private slots: + void searchAssociatedPort(QTableWidgetItem* item); }; #endif // __VHDLCONVERTER_H__