1 #ifndef __VHDLCONVERTER_H__
\r
2 #define __VHDLCONVERTER_H__
\r
11 #include <QTextStream>
\r
13 #include "Parameters.h"
\r
14 #include "Exception.h"
\r
16 class VHDLConverter : public QWidget {
\r
19 explicit VHDLConverter(QWidget *parent = 0);
\r
23 QPushButton* loadBut;
\r
24 QPushButton* genBut;
\r
26 // clk & rst ports related
\r
27 QTextEdit* clkNameEdit;
\r
28 QTextEdit* rstNameEdit;
\r
29 QComboBox* clkCombo;
\r
30 QComboBox* rstCombo;
\r
32 // data ports related
\r
33 QScrollArea *scrollDataPort;
\r
34 QTableWidget* twDataPort;
\r
36 // wishbone ports related
\r
37 QScrollArea *scrollWBPort;
\r
38 QTableWidget* twWBPort;
\r
41 QScrollArea* scrollGenerics;
\r
42 QTableWidget* twGenerics;
\r
44 int cptIn, cptOut, cptInout, cpt;
\r
45 QRegExp *rxPort, *rxEnt, *rxArch, *rxComp, *rxComment, *rxComma,
\r
46 *rxEndComp, *rxEnd, *rxGeneric, *rxEndGen, *rxGen, *rxConst, *rxWidth;
\r
47 QString fileName, txt, s, entName, brief, desc;
\r
49 QHash<QString,QList<QString>* > packages;
\r
53 QTextEdit *teBrief, *teDesc, *teName;
\r
55 void readLibraries(QTextStream& in) throw(Exception);
\r
56 void readEntity(QTextStream& in) throw(Exception);
\r
57 void readGenerics(QTextStream& in) throw(Exception);
\r
58 void readPorts(QTextStream& in) throw(Exception);
\r
59 void readArchitecture(QTextStream& in) throw(Exception);
\r
61 QString skipBlankAndComments(QTextStream& in);
\r
66 void loadVHDLFile();
\r
70 #endif // __VHDLCONVERTER_H__
\r