-
Notifications
You must be signed in to change notification settings - Fork 2
/
gsysRegister.h
executable file
·102 lines (82 loc) · 3.08 KB
/
gsysRegister.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
** This file is part of gSysC.
**
** gSysC is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** gSysC is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with gSysC with the file ``LICENSE''; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*****************************************************************************
Author: Christian J. Eibl
last modified: 2005-09-29
*****************************************************************************
Content:
This class is the main class for registration and administration
of project data. It provides collected information to all
other classes.
*****************************************************************************/
#ifndef GSYS_REGISTER_H
#define GSYS_REGISTER_H
#include "systemc.h"
#include <vector>
#include <QtWidgets/QGraphicsScene>
#include <QtWidgets/QTreeWidgetItem>
class gsysConnection;
class gsysHierarchy;
class gsysSimulator;
class gsysHierarchyTree;
class gsysMainGUI;
class gsysPort;
class gsysSignal;
using namespace std;
class gsysRegister
{
friend class gsysMain;
private:
vector<gsysConnection*> connList;
vector<gsysHierarchy*> hierarchyList;
vector<gsysPort*> portList;
vector<gsysPort*> notAssignedPorts;
vector<gsysSignal*> notAssignedSignals;
QList<QTreeWidgetItem*> listViewElements;
vector<void*> bufferIDList;
vector<char*> bufferNameList;
vector<bool> bufferPercList;
int moduleInList(sc_module* module, vector<gsysHierarchy*> *list);
int portInList(gsysPort* port, vector<gsysPort*> *list);
int portExists(void* port, vector<gsysPort*> *list);
int signalInList(void* signal, vector<gsysSignal*> *list);
void regFinished();
int connExists(gsysHierarchy* h1, gsysHierarchy* h2);
gsysRegister();
QTreeWidgetItem *rootLVI;
void insertLVI(QTreeWidgetItem *parent, gsysHierarchy* hier);
public:
~gsysRegister();
void registerModule(sc_module* modulePointer, char* name=0, sc_module* parent=0);
void registerPort(void* realPort, sc_module* parentPointer,void* signal=0);
void rename_port(void* realPort, char* name);
void rename_sig(void* realSignal, char* name);
void addBuffer(void* id, char* name, bool percUse=true);
vector<void*> getBufferIDs();
vector<bool> getBufferPercs();
vector<char*> getBufferNames();
void registerSignal(gsysSignal* sig, void* orig);
void preRegPort(gsysPort* port, void* orig);
vector<gsysHierarchy*> getHierarchyList();
void saveAllPortValues();
vector<gsysSignal*> getAllSignals();
vector<gsysConnection*> getAllConns();
void showChanges();
void deHighlightAll();
};
#endif