Browse Source

Qntzr in sram rxParams is changed.

MPS reset modify.
LPF lut register count is changed.
master v3.2
Arash Aletayeb 3 years ago
parent
commit
5c9ef5c837
  1. 2
      developHw.pro
  2. 2
      developHw.pro.user
  3. 4
      hdf5Scenario/hdf5Scenario.cpp
  4. 2
      include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h
  5. 2
      include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/LpfLut.h
  6. 2
      include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/RxParams.h
  7. 2
      include/model/hardware/device/SonoDeviceConstant.h
  8. 27
      mainwindow.cpp
  9. 2
      mainwindow.h
  10. 74
      mainwindow.ui
  11. 13
      src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp
  12. 2
      src/model/hardware/device/SonoDevice.cpp

2
developHw.pro

@ -36,7 +36,6 @@ INCLUDEPATH += \
"/usr/lib/x86_64-linux-gnu/hdf5/serial/include" \ "/usr/lib/x86_64-linux-gnu/hdf5/serial/include" \
"/usr/include/hdf5/serial" "/usr/include/hdf5/serial"
FORMS += \ FORMS += \
mainwindow.ui mainwindow.ui
@ -48,4 +47,3 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
unix|win32: LIBS += -lSonoPcieDevice unix|win32: LIBS += -lSonoPcieDevice
unix|win32: LIBS += -L "/usr/lib/x86_64-linux-gnu/hdf5/serial" -lhdf5 unix|win32: LIBS += -L "/usr/lib/x86_64-linux-gnu/hdf5/serial" -lhdf5
unix|win32: LIBS += -L "/usr/lib/x86_64-linux-gnu/hdf5/serial" -lhdf5_cpp unix|win32: LIBS += -L "/usr/lib/x86_64-linux-gnu/hdf5/serial" -lhdf5_cpp

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2021-10-09T09:52:00. --> <!-- Written by QtCreator 4.10.0, 2022-02-05T08:18:24. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

4
hdf5Scenario/hdf5Scenario.cpp

@ -647,9 +647,9 @@ void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams)
for (quint32 i = 0; i < 4; i++) for (quint32 i = 0; i < 4; i++)
{ {
tempLpf.clear(); tempLpf.clear();
for (quint32 j = 0; j < 48; j++) for (quint32 j = 0; j < 64; j++)
{ {
tempLpf.push_back(static_cast<quint32>(floatArray[j + i * 48])); tempLpf.push_back(static_cast<quint32>(floatArray[j + i * 64]));
} }
prbDepParams.prbDepParams.lpfLut.push_back(tempLpf); prbDepParams.prbDepParams.lpfLut.push_back(tempLpf);
} }

2
include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h

@ -2,6 +2,6 @@
#define PREPROCESSORDEF_H #define PREPROCESSORDEF_H
#define MPS_BOARD #define MPS_BOARD
#define DEVELOP_UI //#define DEVELOP_UI
#endif //PREPROCESSORDEF_H #endif //PREPROCESSORDEF_H

2
include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/LpfLut.h

@ -10,7 +10,7 @@
#define BAR 0 #define BAR 0
#define OFFSET 0x81000 #define OFFSET 0x81000
#define LENGTH 48U #define LENGTH 64U
class LpfLut : public Register class LpfLut : public Register
{ {

2
include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/RxParams.h

@ -46,7 +46,7 @@ public:
{ {
_rx = rx; _rx = rx;
rxActiveElementStepQ = rxActiveElementStepQ =
Calculation::qntzr(_rx->rxActiveElementStep, 0, 8, 8, 0, true, false); Calculation::qntzr(_rx->rxActiveElementStep, 0, 8, 5, 0, true, false);
r0PositionQ = Calculation::qntzr(_rx->r0Position, 0, 17, 0, 0, true); r0PositionQ = Calculation::qntzr(_rx->r0Position, 0, 17, 0, 0, true);
} }

2
include/model/hardware/device/SonoDeviceConstant.h

@ -20,7 +20,7 @@
#define DMA_CTRL_REG 0x00000008 #define DMA_CTRL_REG 0x00000008
#define START_COMMAND 0x00000001 #define START_COMMAND 0x00000001
#define STOP_COMMAND 0x00000000 #define STOP_COMMAND 0x11111110
#define COUNTER_MASK 0x0000001F #define COUNTER_MASK 0x0000001F

27
mainwindow.cpp

@ -4740,8 +4740,35 @@ void MainWindow::on_btn_scenChange_clicked()
} }
} }
/*************************************************************************************************/
void MainWindow::on_btn_seRead_clicked()
{
quint32 offset = 0x26028;
quint32 bar(0);
quint32 value1 = 0x29301;
quint32 value2 = 0x9301;
quint32 value3 = 0x1E900;
quint32 value4 = 0xE900;
quint32 value5 = 0x29300;
quint32 value6 = 0x9300;
_usd->writeWord(offset, bar,value1);
_usd->writeWord(offset, bar,value2);
delay(1);
_usd->writeWord(offset, bar,value3);
_usd->writeWord(offset, bar,value4);
delay(1);
quint32 value7 = _usd->readWord(0x26090, bar);
ui->tb_seRead->setText(QString::number(value7));
_usd->writeWord(offset, bar, value5);
_usd->writeWord(offset, bar, value6);
}
/*************************************************************************************************/ /*************************************************************************************************/
void MainWindow::on_btn_discard_clicked(void) void MainWindow::on_btn_discard_clicked(void)
{ {
_discardTempTest = true; _discardTempTest = true;
} }

2
mainwindow.h

@ -413,6 +413,8 @@ private slots:
void on_chk_statusLogPS_clicked(bool checked); void on_chk_statusLogPS_clicked(bool checked);
void on_btn_seRead_clicked();
signals: signals:
void showMessage(QString message); void showMessage(QString message);
void threeDReady(); void threeDReady();

74
mainwindow.ui

@ -42,7 +42,7 @@
<string/> <string/>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>6</number>
</property> </property>
<widget class="QWidget" name="tab_0"> <widget class="QWidget" name="tab_0">
<attribute name="title"> <attribute name="title">
@ -5967,7 +5967,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>720</x> <x>720</x>
<y>60</y> <y>30</y>
<width>75</width> <width>75</width>
<height>23</height> <height>23</height>
</rect> </rect>
@ -5992,7 +5992,7 @@
<widget class="QCheckBox" name="chk_mpsInit"> <widget class="QCheckBox" name="chk_mpsInit">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>720</x> <x>640</x>
<y>30</y> <y>30</y>
<width>85</width> <width>85</width>
<height>21</height> <height>21</height>
@ -6002,12 +6002,63 @@
<string>MPS Init</string> <string>MPS Init</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" name="chk_powerAo">
<property name="geometry">
<rect>
<x>540</x>
<y>30</y>
<width>85</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>AO Power</string>
</property>
</widget>
<widget class="QPushButton" name="btn_seRead">
<property name="geometry">
<rect>
<x>720</x>
<y>70</y>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>SE Read</string>
</property>
</widget>
<widget class="QLineEdit" name="tb_seRead">
<property name="geometry">
<rect>
<x>720</x>
<y>100</y>
<width>81</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_17"> <widget class="QWidget" name="verticalLayoutWidget_17">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>710</x> <x>710</x>
<y>120</y> <y>150</y>
<width>114</width> <width>101</width>
<height>63</height> <height>63</height>
</rect> </rect>
</property> </property>
@ -6049,19 +6100,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QCheckBox" name="chk_powerAo">
<property name="geometry">
<rect>
<x>540</x>
<y>30</y>
<width>85</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>AO Power</string>
</property>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QStatusBar" name="statusbar"/> <widget class="QStatusBar" name="statusbar"/>

13
src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp

@ -747,17 +747,20 @@ void BoardsCtrlMngt::mpsDeInit() const
void BoardsCtrlMngt::setMpsReset() const void BoardsCtrlMngt::setMpsReset() const
{ {
getSupervisorI2cTimeout();
setSetupCmdJmp(true);
setSetupCmdJmp(false);
getSupervisorI2cDone();
timerShot(110);
while(!checkTimeout());
if(getSetupCmdP24vOnOff()) if(getSetupCmdP24vOnOff())
{ {
getSupervisorI2cTimeout(); getSupervisorI2cTimeout();
setSetupCmdP24vOnOff(false); setSetupCmdP24vOnOff(false);
getSupervisorI2cDone(); getSupervisorI2cDone();
} }
getSupervisorI2cTimeout();
setSetupCmdJmp(true);
setSetupCmdJmp(false);
getSupervisorI2cDone();
} }
void BoardsCtrlMngt::mpsDacsOff() const void BoardsCtrlMngt::mpsDacsOff() const

2
src/model/hardware/device/SonoDevice.cpp

@ -34,7 +34,7 @@ void SonoDevice::startDma()
void SonoDevice::stopDma() void SonoDevice::stopDma()
{ {
quint32 dmaCtrl = device.readWord(BAR_REG, DMA_CTRL_REG); quint32 dmaCtrl = device.readWord(BAR_REG, DMA_CTRL_REG);
device.writeWord(BAR_REG, DMA_CTRL_REG, STOP_COMMAND|dmaCtrl); device.writeWord(BAR_REG, DMA_CTRL_REG, STOP_COMMAND&dmaCtrl);
} }
int SonoDevice::getCounter() int SonoDevice::getCounter()

Loading…
Cancel
Save