]> AND Private Git Repository - blast.git/blob - VHDLConverter.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
changed name of the class that converts VHDL -> XML
[blast.git] / VHDLConverter.h
1 #ifndef __VHDLCONVERTER_H__\r
2 #define __VHDLCONVERTER_H__\r
3 \r
4 \r
5 #include <QtGui>\r
6 #include <QtWidgets>\r
7 #include <QtCore>\r
8 #include <QtXml>\r
9 #include <iostream>\r
10 #include <fstream>\r
11 #include <QTextStream>\r
12 \r
13 #include "Parameters.h"\r
14 #include "Exception.h"\r
15 \r
16 class VHDLConverter : public QWidget {\r
17     Q_OBJECT\r
18 public:\r
19     explicit VHDLConverter(QWidget *parent = 0);\r
20     ~VHDLConverter();\r
21 \r
22 private:\r
23     QPushButton* loadBut;\r
24     QPushButton* genBut;\r
25     \r
26     // clk & rst ports related\r
27     QTextEdit* clkNameEdit;\r
28     QTextEdit* rstNameEdit;\r
29     QComboBox* clkCombo;\r
30     QComboBox* rstCombo;\r
31     \r
32     // data ports related\r
33     QScrollArea *scrollDataPort;        \r
34     QTableWidget* twDataPort;\r
35     \r
36     // wishbone ports related\r
37     QScrollArea *scrollWBPort;        \r
38     QTableWidget* twWBPort;\r
39     \r
40     // generics related\r
41     QScrollArea* scrollGenerics;    \r
42     QTableWidget* twGenerics;\r
43     \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
48     \r
49     QHash<QString,QList<QString>* > packages;\r
50     \r
51     QWidget *wid;\r
52     \r
53     QTextEdit *teBrief, *teDesc, *teName;\r
54 \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
60     \r
61     QString skipBlankAndComments(QTextStream& in);\r
62     \r
63 signals:\r
64 \r
65 public slots:\r
66     void loadVHDLFile();\r
67     void generateXml();\r
68 };\r
69 \r
70 #endif // __VHDLCONVERTER_H__\r