1 |
2 |
EziDebug |
#ifndef EZIDEBUGINSTANCETREEITEM_H
|
2 |
|
|
#define EZIDEBUGINSTANCETREEITEM_H
|
3 |
|
|
#include <QMap>
|
4 |
|
|
#include "ezidebugprj.h"
|
5 |
|
|
|
6 |
|
|
class QString ;
|
7 |
|
|
template <typename T> class QList ;
|
8 |
|
|
class EziDebugScanChain ;
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
class EziDebugInstanceTreeItem
|
13 |
|
|
{
|
14 |
|
|
public:
|
15 |
|
|
struct SCAN_CHAIN_STRUCTURE
|
16 |
|
|
{
|
17 |
|
|
unsigned int m_untotalChainNumber ;
|
18 |
|
|
unsigned int m_unleftRegNumber ;
|
19 |
|
|
unsigned int m_uncurrentChainNumber;
|
20 |
|
|
};
|
21 |
|
|
|
22 |
|
|
EziDebugInstanceTreeItem(const QString instance, const QString module);
|
23 |
|
|
~EziDebugInstanceTreeItem();
|
24 |
|
|
EziDebugInstanceTreeItem* parent(void) const ;
|
25 |
|
|
EziDebugInstanceTreeItem* child(int num) const ;
|
26 |
|
|
void appendChild(EziDebugInstanceTreeItem *child);
|
27 |
|
|
void removeChild(EziDebugInstanceTreeItem *child);
|
28 |
|
|
|
29 |
|
|
void setScanChainInfo(EziDebugScanChain * chaininfo);
|
30 |
|
|
EziDebugScanChain* getScanChainInfo();
|
31 |
|
|
|
32 |
|
|
QString getNameData() const;
|
33 |
|
|
const QString &getModuleName() const;
|
34 |
|
|
const QString &getInstanceName() const ;
|
35 |
|
|
QMap<QString,QString> getInstancePortMapTbl(const QString &instancename) const ;
|
36 |
|
|
//void traverseChainTreeItem(void) ;
|
37 |
|
|
int getAllRegNum(const QString &clock ,QString chainname ,int ®bitcount ,int &bitwidth ,const QStringList &instancelist); // 从本节点开始遍历所有子节点
|
38 |
|
|
int insertScanChain(QMap<QString,SCAN_CHAIN_STRUCTURE*> &chainStructuremap ,EziDebugScanChain* pchain ,QString topmodule);
|
39 |
|
|
int deleteScanChain(EziDebugPrj::OPERATE_TYPE type) ;
|
40 |
|
|
QString findCorrespondClock(QString name, QString clock ,EziDebugInstanceTreeItem * headitem) ;
|
41 |
|
|
void setModuleClockMap(const QString &instancename,const QMap<QString,QString> &clockmap);
|
42 |
|
|
QMap<QString,QString> getModuleClockMap(const QString& instancename) const ;
|
43 |
|
|
const QString & getItemHierarchyName(void) const ;
|
44 |
|
|
void setItemParent(EziDebugInstanceTreeItem* parentitem) ;
|
45 |
|
|
void settItemHierarchyName(const QString& name);
|
46 |
|
|
static void setProject(EziDebugPrj*prj) ;
|
47 |
|
|
static const EziDebugPrj* getProject(void) ;
|
48 |
|
|
int childCount() const ;
|
49 |
|
|
int row() const ;
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
private:
|
55 |
|
|
QString m_iinstanceName ;
|
56 |
|
|
QString m_imoduleName ;
|
57 |
|
|
QString m_ihierarchyName ;
|
58 |
|
|
EziDebugInstanceTreeItem* m_pparentInstance ;
|
59 |
|
|
QList<EziDebugInstanceTreeItem*> m_ichildModules ;
|
60 |
|
|
QMap<QString,QMap<QString,QString> > m_imoduleClockMap ; // 每个例化的时钟 名字 对应关系
|
61 |
|
|
QMap<QString,QMap<QString,QString> > m_iinstancePortMap ;
|
62 |
|
|
EziDebugScanChain* m_pChainInfo ;
|
63 |
|
|
static EziDebugPrj* sm_pprj ;
|
64 |
|
|
};
|
65 |
|
|
|
66 |
|
|
#endif // EZIDEBUGINSTANCETREEITEM_H
|