@@ -1,15 +1,15 | |||
|
1 | 1 | TEMPLATE = subdirs |
|
2 | 2 | CONFIG += ordered |
|
3 | 3 | |
|
4 | 4 | |
|
5 | 5 | SUBDIRS = \ |
|
6 | 6 | ahbuartplugin \ |
|
7 | 7 | ambaplugin \ |
|
8 | 8 | APBUARTPLUGIN \ |
|
9 | 9 | dsu3plugin \ |
|
10 | 10 | genericrwplugin \ |
|
11 | 11 | memctrlrplugin \ |
|
12 | 12 | memcheckplugin |
|
13 | unix:SUBDIRS += spwplugin | |
|
13 | 14 | |
|
14 | 15 | OTHER_FILES += SocExplorer-plugins.spec |
|
15 | #unix:SUBDIRS += spwplugin |
@@ -1,74 +1,95 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "ahbdevicelist.h" |
|
23 | ||
|
23 | #include "ahbpluginui.h" | |
|
24 | 24 | |
|
25 | 25 | |
|
26 | 26 | ahbdevicelist::ahbdevicelist(QWidget *parent):QTableWidget(parent) |
|
27 | 27 | { |
|
28 | 28 | this->setColumnCount(7); |
|
29 | 29 | this->setHorizontalHeaderLabels(QStringList() << tr("Device Name")<<tr("BAR0")<<tr("BAR1")<<tr("BAR2")<<tr("BAR3")<<tr("Vendor ID")<<tr("Product ID")); |
|
30 | 30 | } |
|
31 | 31 | |
|
32 | 32 | void ahbdevicelist::clearAHBdevicesList() |
|
33 | 33 | { |
|
34 | 34 | this->clear(); |
|
35 | 35 | this->setRowCount(0); |
|
36 | 36 | this->setHorizontalHeaderLabels(QStringList() << tr("Device Name")<<tr("BAR0")<<tr("BAR1")<<tr("BAR2")<<tr("BAR3")<<tr("Vendor ID")<<tr("Product ID")); |
|
37 | 37 | } |
|
38 | 38 | |
|
39 | QString decodeType(int type) | |
|
40 | { | |
|
41 | switch (type) { | |
|
42 | case AHB_PLUGNPLAY_APB_IO_SPACE: | |
|
43 | return "APB IO space"; | |
|
44 | break; | |
|
45 | case AHB_PLUGNPLAY_MEMORY_SPACE: | |
|
46 | return "Memory space"; | |
|
47 | break; | |
|
48 | case AHB_PLUGNPLAY_AHB_IO_SPACE: | |
|
49 | return "AHB IO space"; | |
|
50 | break; | |
|
51 | default: | |
|
52 | return "Unknown type"; | |
|
53 | break; | |
|
54 | } | |
|
55 | } | |
|
56 | ||
|
39 | 57 | void ahbdevicelist::addAHBdevice(ahbdeviceInfo* device) |
|
40 | 58 | { |
|
41 | 59 | if(this->rowCount()==0) |
|
42 | 60 | { |
|
43 | 61 | this->setRowCount(1); |
|
44 | 62 | } |
|
45 | 63 | else |
|
46 | 64 | { |
|
47 | 65 | this->insertRow(this->rowCount()); |
|
48 | 66 | } |
|
49 | 67 | |
|
50 | 68 | this->ahbdevices.append(device); |
|
51 | 69 | QTableWidgetItem *newItem = new QTableWidgetItem(*device->deviceName); |
|
52 | 70 | newItem->setFlags(newItem->flags() &~ Qt::ItemIsEditable); |
|
53 | 71 | this->setItem(this->rowCount()-1, 0, newItem); |
|
54 | 72 | |
|
55 | 73 | for(int i=0;i<4;i++) |
|
56 | 74 | { |
|
57 | 75 | if(device->BAR[i].size!=0) |
|
58 | 76 | { |
|
59 |
newItem = new QTableWidgetItem("0x" + QString::number(device->BAR[i].address, 16) |
|
|
77 | newItem = new QTableWidgetItem("0x" + QString::number(device->BAR[i].address, 16) | |
|
78 | +" -> 0x"+ QString::number(device->BAR[i].address + device->BAR[i].size-1, 16) | |
|
79 | +" size = "+device->barAdressSize(i) | |
|
80 | +" "+ decodeType(device->BAR[i].type)); | |
|
60 | 81 | newItem->setFlags(newItem->flags() &~ Qt::ItemIsEditable); |
|
61 | 82 | this->setItem(this->rowCount()-1, i+1, newItem); |
|
62 | 83 | } |
|
63 | 84 | |
|
64 | 85 | } |
|
65 | 86 | |
|
66 | 87 | newItem = new QTableWidgetItem("0x" + QString::number(device->VID , 16)); |
|
67 | 88 | newItem->setFlags(newItem->flags() &~ Qt::ItemIsEditable); |
|
68 | 89 | this->setItem(this->rowCount()-1, 5, newItem); |
|
69 | 90 | newItem = new QTableWidgetItem("0x" + QString::number(device->PID , 16)); |
|
70 | 91 | newItem->setFlags(newItem->flags() &~ Qt::ItemIsEditable); |
|
71 | 92 | this->setItem(this->rowCount()-1, 6, newItem); |
|
72 | 93 | this->resizeColumnsToContents(); |
|
73 | 94 | |
|
74 | 95 | } |
@@ -1,90 +1,111 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "ahbpluginui.h" |
|
23 | 23 | #include <socexplorerengine.h> |
|
24 | 24 | |
|
25 | 25 | ahbPluginUi::ahbPluginUi(socexplorerplugin *plugin, QWidget *parent) : |
|
26 | 26 | QWidget(parent) |
|
27 | 27 | { |
|
28 | 28 | this->mainlayout = new QHBoxLayout; |
|
29 | 29 | this->scanBp = new QPushButton(tr("Scan AHB")); |
|
30 | 30 | this->deviceslst = new ahbdevicelist; |
|
31 | 31 | this->mainlayout->addWidget(this->deviceslst); |
|
32 | 32 | this->mainlayout->addWidget(this->scanBp); |
|
33 | 33 | this->setLayout(this->mainlayout); |
|
34 | 34 | this->_plugin = plugin; |
|
35 | 35 | connect(this,SIGNAL(addAHBdevice(ahbdeviceInfo*)),this->deviceslst,SLOT(addAHBdevice(ahbdeviceInfo*))); |
|
36 | 36 | connect(this,SIGNAL(clearAHBdevicesList()),this->deviceslst,SLOT(clearAHBdevicesList())); |
|
37 | 37 | connect(this->scanBp,SIGNAL(clicked()),this,SLOT(scanAHB())); |
|
38 | 38 | } |
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | |
|
42 | ahbdeviceInfo* ahbPluginUi::extractInfos(int *pnpregs) | |
|
42 | ahbdeviceInfo* ahbPluginUi::extractInfos(unsigned int *pnpregs) | |
|
43 | 43 | { |
|
44 | 44 | AHBbarreg BAR[4]; |
|
45 | 45 | |
|
46 | 46 | int VID; |
|
47 | 47 | int PID; |
|
48 | 48 | for(int i=0;i<4;i++) |
|
49 | 49 | { |
|
50 |
|
|
|
51 |
|
|
|
50 | unsigned int addr=(pnpregs[i+4] & 0xfff00000)>>20; | |
|
51 | unsigned int mask=(pnpregs[i+4] & 0x0FFF0)>>4; | |
|
52 | BAR[i].type = (unsigned char)(pnpregs[i+4]&0x0f); | |
|
53 | printf("%x\n",addr); | |
|
54 | BAR[i].size = 0; | |
|
55 | BAR[i].address = 0; | |
|
56 | switch ((int)(BAR[i].type)) | |
|
57 | { | |
|
58 | case AHB_PLUGNPLAY_APB_IO_SPACE: | |
|
59 | break; | |
|
60 | case AHB_PLUGNPLAY_MEMORY_SPACE: | |
|
61 | BAR[i].address = addr<<20; | |
|
62 | BAR[i].size = (mask)<<20; | |
|
63 | break; | |
|
64 | case AHB_PLUGNPLAY_AHB_IO_SPACE: | |
|
65 | BAR[i].address = 0xfff00000 + (addr<<8); | |
|
66 | BAR[i].size = (mask)<<8; | |
|
67 | break; | |
|
68 | default: | |
|
69 | break; | |
|
70 | } | |
|
71 | ||
|
52 | 72 | if(BAR[i].size!=0) |
|
53 | 73 | BAR[i].size = (((-1^BAR[i].size)|BAR[i].address)-BAR[i].address)+1; |
|
54 | 74 | BAR[i].cacheable = (bool)((pnpregs[i+4]&0x00010000)>>16); |
|
55 | 75 | BAR[i].prefectchable = (bool)((pnpregs[i+4]&0x00020000)>>17); |
|
56 | BAR[i].type = (unsigned char)(pnpregs[i+4]&0xf); | |
|
57 | 76 | } |
|
58 | 77 | |
|
59 | 78 | VID = (pnpregs[0]>>24)&0xff; |
|
60 | 79 | PID = (pnpregs[0]>>12)&0xfff; |
|
61 | 80 | QString devname = SocExplorerEngine::getDevName(VID,PID); |
|
62 | 81 | return new ahbdeviceInfo(devname,BAR[0],BAR[1],BAR[2],BAR[3],VID,PID); |
|
63 | 82 | } |
|
64 | 83 | |
|
65 | 84 | |
|
66 | 85 | void ahbPluginUi::scanAHB() |
|
67 | 86 | { |
|
68 | 87 | unsigned int size = (AHB_PLUGNPLAY_SLAVE_STOP - AHB_PLUGNPLAY_MASTER_START)/4; |
|
69 | 88 | int j=0; |
|
70 | 89 | unsigned long long i = AHB_PLUGNPLAY_MASTER_START; |
|
71 | 90 | int pnpregs[size]; |
|
72 | 91 | emit this->clearAHBdevicesList(); |
|
73 | 92 | if( this->_plugin->Read((unsigned int*)pnpregs,size,(unsigned int)AHB_PLUGNPLAY_MASTER_START)==size) |
|
74 | 93 | { |
|
75 | 94 | while(i<AHB_PLUGNPLAY_SLAVE_STOP) |
|
76 | 95 | { |
|
77 | 96 | if(pnpregs[j]!=0) |
|
78 | 97 | { |
|
79 | ahbdeviceInfo* devinfo=this->extractInfos(pnpregs+j); | |
|
98 | ahbdeviceInfo* devinfo=this->extractInfos((unsigned int*)(pnpregs+j)); | |
|
80 | 99 | if(!devinfo->deviceName->compare("DSU3")) |
|
81 | 100 | SocExplorerEngine::addEnumDevice(this->_plugin,devinfo->VID,devinfo->PID,devinfo->BAR[0].address,*devinfo->deviceName); |
|
101 | if(!devinfo->deviceName->compare("SDCTRL")) | |
|
102 | SocExplorerEngine::addEnumDevice(this->_plugin,devinfo->VID,devinfo->PID,devinfo->BAR[1].address,*devinfo->deviceName); | |
|
82 | 103 | emit this->addAHBdevice(devinfo); |
|
83 | 104 | } |
|
84 | 105 | i+=32; |
|
85 | 106 | j+=8; |
|
86 | 107 | } |
|
87 | 108 | } |
|
88 | 109 | } |
|
89 | 110 | |
|
90 | 111 |
@@ -1,58 +1,64 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef AHBPLUGINUI_H |
|
23 | 23 | #define AHBPLUGINUI_H |
|
24 | 24 | |
|
25 | 25 | #include <QWidget> |
|
26 | 26 | #include <QHBoxLayout> |
|
27 | 27 | #include <QPushButton> |
|
28 | 28 | #include "ahbdevicelist.h" |
|
29 | 29 | #include <socexplorerplugin.h> |
|
30 | 30 | #define AHB_PLUGNPLAY_MASTER_START ((unsigned int)(0xFFFFF000)) |
|
31 | 31 | #define AHB_PLUGNPLAY_MASTER_STOP ((unsigned int)(0xFFFFF800)) |
|
32 | 32 | #define AHB_PLUGNPLAY_SLAVE_START ((unsigned int)(0xFFFFF800)) |
|
33 | 33 | #define AHB_PLUGNPLAY_SLAVE_STOP ((unsigned int)(0xFFFFFFFC)) |
|
34 | ||
|
34 | /*0001 = APB I/O space | |
|
35 | 0010 = AHB Memory space | |
|
36 | 0011 = AHB I/O space | |
|
37 | */ | |
|
38 | #define AHB_PLUGNPLAY_APB_IO_SPACE 0x01 | |
|
39 | #define AHB_PLUGNPLAY_MEMORY_SPACE 0x02 | |
|
40 | #define AHB_PLUGNPLAY_AHB_IO_SPACE 0x03 | |
|
35 | 41 | |
|
36 | 42 | class ahbPluginUi : public QWidget |
|
37 | 43 | { |
|
38 | 44 | Q_OBJECT |
|
39 | 45 | public: |
|
40 | 46 | explicit ahbPluginUi(socexplorerplugin* plugin,QWidget *parent = 0); |
|
41 | ahbdeviceInfo* extractInfos(int* pnpregs); | |
|
47 | ahbdeviceInfo* extractInfos(unsigned int* pnpregs); | |
|
42 | 48 | public slots: |
|
43 | 49 | void scanAHB(); |
|
44 | 50 | signals: |
|
45 | 51 | void addAHBdevice(ahbdeviceInfo* device); |
|
46 | 52 | void clearAHBdevicesList(); |
|
47 | 53 | unsigned int WriteSig(unsigned int* Value,unsigned int count,unsigned int address); |
|
48 | 54 | unsigned int ReadSig(unsigned int* Value,unsigned int count,unsigned int address); |
|
49 | 55 | private: |
|
50 | 56 | QHBoxLayout* mainlayout; |
|
51 | 57 | QPushButton* scanBp; |
|
52 | 58 | ahbdevicelist* deviceslst; |
|
53 | 59 | socexplorerplugin* _plugin; |
|
54 | 60 | |
|
55 | 61 | |
|
56 | 62 | }; |
|
57 | 63 | |
|
58 | 64 | #endif // AHBPLUGINUI_H |
@@ -1,99 +1,104 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "apbpluginui.h" |
|
23 | 23 | #include <stdint.h> |
|
24 | 24 | #include <socexplorerengine.h> |
|
25 | 25 | |
|
26 | 26 | apbPluginUi::apbPluginUi(socexplorerplugin *plugin, QWidget *parent) : |
|
27 | 27 | QWidget(parent) |
|
28 | 28 | { |
|
29 | 29 | this->setWindowTitle(tr("APB Driver")); |
|
30 | 30 | this->mainlayout = new QHBoxLayout; |
|
31 | 31 | this->scanBp = new QPushButton(tr("Scan APB")); |
|
32 | 32 | this->deviceslst = new apbdevicelist; |
|
33 | 33 | this->mainlayout->addWidget(this->deviceslst); |
|
34 | 34 | this->mainlayout->addWidget(this->scanBp); |
|
35 | 35 | this->setLayout(this->mainlayout); |
|
36 | 36 | this->_plugin = plugin; |
|
37 | 37 | connect(this,SIGNAL(addAPBdevice(apbdeviceInfo*)),this->deviceslst,SLOT(addAPBdevice(apbdeviceInfo*))); |
|
38 | 38 | connect(this,SIGNAL(clearAPBdevicesList()),this->deviceslst,SLOT(clearAPBdevicesList())); |
|
39 | 39 | connect(this->scanBp,SIGNAL(clicked()),this,SLOT(scanAPB())); |
|
40 | 40 | } |
|
41 | 41 | |
|
42 | 42 | void apbPluginUi::lockScanBp() |
|
43 | 43 | { |
|
44 | 44 | this->scanBp->setEnabled(false); |
|
45 | 45 | } |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | void apbPluginUi::unlockScanBp() |
|
49 | 49 | { |
|
50 | 50 | this->scanBp->setEnabled(true); |
|
51 | 51 | } |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | |
|
55 | 55 | apbdeviceInfo* apbPluginUi::extractInfos(int *pnpregs) |
|
56 | 56 | { |
|
57 | 57 | APBbarreg BAR[1]; |
|
58 | 58 | |
|
59 | 59 | int VID; |
|
60 | 60 | int PID; |
|
61 | 61 | for(int i=0;i<1;i++) |
|
62 | 62 | { |
|
63 | 63 | BAR[i].address = ((uint32_t)(pnpregs[i+1] & 0xfff00000)>>12)+ APB_BUS_START; |
|
64 | 64 | BAR[i].size = ((pnpregs[i+1] & 0x00000ff0)>>4 )+1; |
|
65 | 65 | BAR[i].type = (unsigned char)(pnpregs[i+1]&0xf); |
|
66 | 66 | } |
|
67 | 67 | |
|
68 | 68 | VID = (pnpregs[0]>>24)&0xff; |
|
69 | 69 | PID = (pnpregs[0]>>12)&0xfff; |
|
70 | 70 | QString devname = SocExplorerEngine::getDevName(VID,PID); |
|
71 | 71 | return new apbdeviceInfo(devname,BAR[0],VID,PID); |
|
72 | 72 | } |
|
73 | 73 | |
|
74 | 74 | void apbPluginUi::scanAPB() |
|
75 | 75 | { |
|
76 | 76 | this->lockScanBp(); |
|
77 | 77 | unsigned int size = (APB_PLUGNPLAY_STOP - APB_PLUGNPLAY_START)/4; |
|
78 | 78 | int j=0; |
|
79 | 79 | unsigned long long i = APB_PLUGNPLAY_START; |
|
80 | 80 | int pnpregs[size]; |
|
81 | 81 | emit this->clearAPBdevicesList(); |
|
82 | this->devList.clear(); | |
|
82 | 83 | if(this->_plugin->Read((unsigned int*)pnpregs,size,(unsigned int)APB_PLUGNPLAY_START)==size) |
|
83 | 84 | { |
|
84 | 85 | while(i<APB_PLUGNPLAY_STOP) |
|
85 | 86 | { |
|
86 | 87 | if(pnpregs[j]!=0) |
|
87 | 88 | { |
|
88 | 89 | apbdeviceInfo* devinfos=this->extractInfos(pnpregs+j); |
|
89 | 90 | SocExplorerEngine::addEnumDevice(this->_plugin,devinfos->VID,devinfos->PID,devinfos->BAR[0].address,devinfos->deviceName); |
|
90 |
|
|
|
91 | if(!this->devList.contains(devinfos->BAR[0].address)) | |
|
92 | { | |
|
93 | this->devList.append(devinfos->BAR[0].address); | |
|
94 | emit this->addAPBdevice(devinfos); | |
|
95 | } | |
|
91 | 96 | } |
|
92 | 97 | i+=8; |
|
93 | 98 | j+=2; |
|
94 | if(pnpregs[0]==pnpregs[j]&&pnpregs[1]==pnpregs[j+1])break; | |
|
99 | // if(pnpregs[0]!=0&&pnpregs[0]==pnpregs[j]&&pnpregs[1]==pnpregs[j+1])break; | |
|
95 | 100 | } |
|
96 | 101 | } |
|
97 | 102 | this->unlockScanBp(); |
|
98 | 103 | } |
|
99 | 104 |
@@ -1,59 +1,60 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef APBPLUGINUI_H |
|
23 | 23 | #define APBPLUGINUI_H |
|
24 | 24 | |
|
25 | 25 | #include <QWidget> |
|
26 | 26 | #include <QHBoxLayout> |
|
27 | 27 | #include <QPushButton> |
|
28 | 28 | #include "apbdevicelist.h" |
|
29 | 29 | #include <socexplorerplugin.h> |
|
30 | 30 | |
|
31 | 31 | #define APB_BUS_START ((unsigned int)(0x80000000)) |
|
32 | 32 | #define APB_PLUGNPLAY_START ((unsigned int)(0x800FF000)) |
|
33 | 33 | #define APB_PLUGNPLAY_STOP ((unsigned int)(0x800FFFFF)) |
|
34 | 34 | |
|
35 | 35 | |
|
36 | 36 | class apbPluginUi : public QWidget |
|
37 | 37 | { |
|
38 | 38 | Q_OBJECT |
|
39 | 39 | public: |
|
40 | 40 | explicit apbPluginUi(socexplorerplugin* plugin,QWidget *parent = 0); |
|
41 | 41 | void lockScanBp(); |
|
42 | 42 | void unlockScanBp(); |
|
43 | 43 | apbdeviceInfo* extractInfos(int* pnpregs); |
|
44 | 44 | |
|
45 | 45 | signals: |
|
46 | 46 | void addAPBdevice(apbdeviceInfo* device); |
|
47 | 47 | void clearAPBdevicesList(); |
|
48 | 48 | unsigned int WriteSig(unsigned int* Value,unsigned int count,unsigned int address); |
|
49 | 49 | unsigned int ReadSig(unsigned int* Value,unsigned int count,unsigned int address); |
|
50 | 50 | public slots: |
|
51 | 51 | void scanAPB(); |
|
52 | 52 | private: |
|
53 | 53 | QHBoxLayout* mainlayout; |
|
54 | 54 | QPushButton* scanBp; |
|
55 | 55 | apbdevicelist* deviceslst; |
|
56 | 56 | socexplorerplugin* _plugin; |
|
57 | QList<int> devList; | |
|
57 | 58 | }; |
|
58 | 59 | |
|
59 | 60 | #endif // APBPLUGINUI_H |
@@ -1,63 +1,63 | |||
|
1 | 1 | # |
|
2 | 2 | # Project created by QtCreator 2011-09-20T08:15:30 |
|
3 | 3 | # |
|
4 | 4 | #------------------------------------------------- |
|
5 | 5 | |
|
6 | 6 | CONFIG += socexplorerplugin |
|
7 | 7 | CONFIG += dll |
|
8 | 8 | CONFIG -= static |
|
9 | 9 | VERSION=0.2.0 |
|
10 |
TARGET = ambaplugin |
|
|
10 | TARGET = ambaplugin | |
|
11 | 11 | DEFINES += PLUGIN=ambaplugin |
|
12 | 12 | DEFINES += PLUGINHEADER="\"\\\"ambaplugin.h"\\\"\" |
|
13 | 13 | DEFINES += driver_Name="\"\\\"AMBA_PLUGIN"\\\"\" |
|
14 | 14 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" |
|
15 | 15 | DEFINES += driver_Description="\"\\\"This driver handles the Gaisler AMBA plugn' play system."\\\"\" |
|
16 | 16 | DEFINES += driver_can_be_root=0 |
|
17 | 17 | DEFINES += driver_can_be_child=1 |
|
18 | 18 | DEFINES += driver_VID=0 |
|
19 | 19 | DEFINES += driver_PID=0 |
|
20 | 20 | |
|
21 | 21 | INCLUDEPATH += \ |
|
22 | 22 | $${PWD} |
|
23 | 23 | |
|
24 | 24 | HEADERS += \ |
|
25 | 25 | ambaplugin.h \ |
|
26 | 26 | AHB/ahbpluginui.h \ |
|
27 | 27 | AHB/ahbdevicelist.h \ |
|
28 | 28 | APB/apbpluginui.h \ |
|
29 | 29 | APB/apbdevicelist.h \ |
|
30 | 30 | ambapluginui.h |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | SOURCES += \ |
|
34 | 34 | ambaplugin.cpp \ |
|
35 | 35 | AHB/ahbpluginui.cpp \ |
|
36 | 36 | AHB/ahbdevicelist.cpp \ |
|
37 | 37 | APB/apbpluginui.cpp \ |
|
38 | 38 | APB/apbdevicelist.cpp \ |
|
39 | 39 | ambapluginui.cpp |
|
40 | 40 | |
|
41 | 41 | |
|
42 | 42 | |
|
43 | 43 | |
|
44 | 44 | |
|
45 | 45 | |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | |
|
55 | 55 | |
|
56 | 56 | |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | |
|
60 | 60 | |
|
61 | 61 | |
|
62 | 62 | |
|
63 | 63 |
General Comments 0
You need to be logged in to leave comments.
Login now