Browse Source

AFE global power-down disable and enable are called into scenPlayerStart and scenPlayerStop respectively

Scenario parameters are corrected
Eeprom of boards are modified
Sram parity clear is changed
MPS dacs on/off are are called into scenPlayerStart and scenPlayerStop respectively
master v1.5
Arash Aletayeb 4 years ago
parent
commit
1fe8ff8fe8
  1. 2
      developHw.pro.user
  2. 13
      include/model/hardware/core/TrxBoard.h
  3. 1
      include/model/hardware/core/register/boardsCtrlMngt/BoardsCtrlMngt.h
  4. 2
      include/model/hardware/core/register/dsp/registerDefinition/AtgcLut.h
  5. 1
      include/model/hardware/core/register/dsp/registerDefinition/LineFilterCoefficient.h
  6. 2
      include/model/hardware/core/register/scenPlayer/registerDefinition/ScenPlayerCtrl.h
  7. 2
      include/model/scenarioGenerator/core/scenario/type/misc/ReceiverConfig.h
  8. 1
      include/model/scenarioGenerator/dto/hardware/HardwareOutput.h
  9. 1
      include/model/scenarioGenerator/dto/hardware/SramIndex.h
  10. 1073
      mainwindow.cpp
  11. 74
      mainwindow.h
  12. 620
      mainwindow.ui
  13. 112
      src/model/hardware/core/TrxBoard.cpp
  14. 11
      src/model/hardware/core/register/boardsCtrlMngt/BoardsCtrlMngt.cpp

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2021-05-31T16:10:42. -->
<!-- Written by QtCreator 4.10.0, 2021-06-07T16:10:21. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

13
include/model/hardware/core/TrxBoard.h

@ -31,13 +31,13 @@
#define SLAVE_ELEMENT_SEGMENT 64U
#define TOTAL_SCEN_LUT_SRAM 5U
#define SLAVE_FPGA_NUMBER 3U
#define MOUNTED_SLAVE_FPGA 7U
#define CLOCK_DIVISION 0x55
#define EEPROM_ID_BYTE_BEGIN 19U
#define EEPROM_ID_BYTE_NUMBER 2U
#define EEPROM_INFO_BYTE_BEGIN 0U
#define EEPROM_INFO_BYTE_NUMBER 19U
#define EEPROM_INFO_BYTE_NUMBER 21U
template<class T>
@ -160,7 +160,6 @@ public:
void setScenario(ScenGenHardwareOutput_t scenGenHw);
void setAfeConfig(AfeConfig afe);
void setAfePwrdnMode(eAfePwrdnMode cmd) const;
QList<quint32> getAfeReg(eSlaveSelect sel, quint32 afeRegAddr);
void scenPlayerStart(void);
@ -186,12 +185,12 @@ public:
quint32 trxId(void) const;
quint32 mpsId(void) const;
quint32 prbCtrlId(void) const;
quint32 prbId(quint8 prbSel) const;
quint32 prbId(eSelectProbe prbSel) const;
void getConnectedPrbId(ConnectedPrbId* prbId) const;
QString trxInfo(void) const;
QString mpsInfo(void) const;
QString prbCtrlInfo(void) const;
QByteArray trxInfo(void) const;
QByteArray mpsInfo(void) const;
QByteArray prbCtrlInfo(void) const;
QByteArray prbInfo(quint8 prbSel) const;
void getConnectedPrbInfo(ConnectedPrbInfo* prbInfo) const;

1
include/model/hardware/core/register/boardsCtrlMngt/BoardsCtrlMngt.h

@ -247,6 +247,7 @@ public:
void mpsDeInit(void) const;
void setMpsReset(void) const;
void mpsDacsOff(void) const;
void mpsDacsOn(void) const;
void mpsHvSet(float& hva, float& hvb) const;
QByteArray trxEepromRead(quint32 address, quint32 length);

2
include/model/hardware/core/register/dsp/registerDefinition/AtgcLut.h

@ -10,7 +10,7 @@
#define BAR 0
#define OFFSET 0x85000
#define LENGTH 256U
#define LENGTH 128U
class AtgcLut : public Register
{

1
include/model/hardware/core/register/dsp/registerDefinition/LineFilterCoefficient.h

@ -21,6 +21,7 @@ private:
void prepareData(quint32 index) override
{
lineFilterLutEven->setValue(_lineFilterLut.at(static_cast<qint32>(index*2)));
if (index == 0)
lineFilterLutOdd ->setValue(_lineFilterLut.at(static_cast<qint32>(index*2 + 1)));
}

2
include/model/hardware/core/register/scenPlayer/registerDefinition/ScenPlayerCtrl.h

@ -10,7 +10,7 @@
#define PAUSE_MASK 0x00000004
#define BAR 0U
#define OFFSET 0
#define OFFSET 0x800
class ScenPlayerCtrl : public Register
{

2
include/model/scenarioGenerator/core/scenario/type/misc/ReceiverConfig.h

@ -16,7 +16,7 @@ struct ReceiverConfig_t {
quint32 absEn;
quint32 focusNo;
quint32 lineFilterEn;
quint32 ddcEn;
quint32 ddcn;
quint32 wmfEn;
quint32 dpeEn;
};

1
include/model/scenarioGenerator/dto/hardware/HardwareOutput.h

@ -13,6 +13,7 @@ struct ScenGenHardwareOutput_t {
quint32 totalTxShotNumber;
QVector<quint8> rxBeamFormerNumber;
QVector<float> pulseInterval;
quint8 frameType;
HwRegister_t hwRegister;
SramIndex_t indexParams;

1
include/model/scenarioGenerator/dto/hardware/SramIndex.h

@ -11,7 +11,6 @@ struct SramIndex_t {
QVector<bool> lastLineInFrame;
QVector<quint32> dLineNum;
QVector<quint32> dEnsembleNum;
quint8 frameType;
};
#endif //SRAMINDEX_H

1073
mainwindow.cpp

File diff suppressed because it is too large

74
mainwindow.h

@ -15,13 +15,17 @@
#include <QColormap>
#include <QProgressDialog>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <QFuture>
#include <QFutureWatcher>
#include "qcustomplot.h"
#include "include/model/hardware/core/TrxBoard.h"
#include "api.h"
//#include "H5Cpp.h"
//#include "hdf5.h"
//#include "H5File.h"
#include "H5Cpp.h"
#include "hdf5.h"
#include "H5File.h"
#define MESSAGE_BOX(M) \
emit showMessage(M)
@ -60,10 +64,16 @@
#define ULTIMATE_LOG_COUNT 50
#define MAX_ARRAY_LENGTH 3057U
#define MAX_ARRAY_DEPTH 4U
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
using namespace H5;
using namespace std;
class MainWindow : public QMainWindow
{
Q_OBJECT
@ -73,6 +83,7 @@ public:
~MainWindow();
private:
Ui::MainWindow *ui;
TrxBoard _trx;
@ -107,28 +118,21 @@ private:
StatusVec* _vec;
ScenGenHardwareOutput_t _scenParams;
AfeConfig _afeConfig;
void setReceiverConfiguration (void);
QVector<float> _lineFilter;
void setLineFilter (void);
void setFreqLut (void);
ScenGenHardwareOutput_t scenParams;
QVector<quint32> _stb;
void setStbCoeff (void);
QFutureWatcher <void> scenEndWather;
QVector<float> _dTgc;
void setDTgc (void);
H5File _file;
void setATgc (void);
int32_t intArray [MAX_ARRAY_DEPTH][MAX_ARRAY_LENGTH];
float_t floatArray[MAX_ARRAY_DEPTH][MAX_ARRAY_LENGTH];
void setBlendWeight (void);
template<class T>
void datasetBranch(const string& branchPath, T datasetValue[][3057]);
void setLpf (void);
void setScenario(const string& h5Path);
void fpgaProgrammer(QString path);
@ -140,22 +144,20 @@ private:
void changeLabelTextColor(QLabel* label, QColor color);
void setRxBeamformerPrp (void);
void setAfeConfig (void);
void setPulseProperties (void);
void setProbeElement (void);
void setApodization (void);
void fillRam(QString path);
void logPcie();
void continuousFrameRepresent(void);
QByteArray str2ByteArray (QString& str);
QString uint2IdString (quint32& id);
QString byteArray2InfoString (QByteArray& arr);
QString _logFolder = "/home/hasis/Desktop/TrxBoardFile/_log/dma/";
QString _emulFolder = "/home/hasis/Desktop/Develop_HardwareTest/developHw/sram_frame.bin";
@ -173,8 +175,12 @@ private:
private slots:
void getPrbChange();
void getFramePacket (QByteArray packet);
void restartTimer();
void on_rbtn_reg_toggled(bool checked);
void on_rbtn_offset_toggled(bool checked);
@ -286,13 +292,6 @@ private slots:
// bool checkTermalShutdown(quint8 value);
void on_btn_lineFilter_clicked();
void on_btn_dtgc_clicked();
void on_btn_stbCoeff_clicked();
void on_btn_setAtgcMode_clicked();
@ -323,8 +322,6 @@ private slots:
void on_btn_scenStart_clicked();
void on_btn_scenParams_clicked();
void on_btn_emulator_clicked();
void on_btn_dmaShow_clicked();
@ -347,10 +344,12 @@ private slots:
void on_chk_mpsInit_clicked();
void on_btn_afeGblPwrdn_clicked();
void on_btn_afeConfig_clicked();
void on_btn_h5Browse_clicked();
void on_btn_setScenario_clicked();
signals:
// void updateBlockProgressValue(int percentage, QProgressBar* prg);
// void updateFpgaProgressValue(int percentage);
@ -362,6 +361,7 @@ signals:
void threeDReady();
void twoDReady();
void sendLogCount(qint32 counter, QProgressDialog* _progress);
void connectedPrbChange();
};
#endif // MAINWINDOW_H

620
mainwindow.ui

@ -20,7 +20,7 @@
<x>0</x>
<y>9</y>
<width>811</width>
<height>311</height>
<height>341</height>
</rect>
</property>
<property name="toolTip">
@ -359,7 +359,7 @@
<widget class="QWidget" name="layoutWidget_2">
<property name="geometry">
<rect>
<x>60</x>
<x>10</x>
<y>70</y>
<width>128</width>
<height>17</height>
@ -401,202 +401,11 @@
<attribute name="title">
<string>Scen Player</string>
</attribute>
<widget class="QWidget" name="verticalLayoutWidget_16">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>190</width>
<height>58</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_39">
<item>
<widget class="QLabel" name="label_28">
<property name="text">
<string>Start Idx:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_startIdx"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_40">
<item>
<widget class="QLabel" name="label_80">
<property name="text">
<string>End Idx:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_endIdx"/>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_17">
<property name="geometry">
<rect>
<x>270</x>
<y>10</y>
<width>160</width>
<height>51</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_87">
<item>
<widget class="QLabel" name="label_81">
<property name="text">
<string>Filling:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_scenParams">
<property name="text">
<string>doing</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="btn_scenParams">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Write Scenario Parameters&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Scenario Parameters</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_2">
<property name="geometry">
<rect>
<x>500</x>
<y>10</y>
<width>106</width>
<height>51</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Filling:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_lineFilter">
<property name="text">
<string>doing</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="btn_lineFilter">
<property name="text">
<string>Line Filter Coeff</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_6">
<property name="geometry">
<rect>
<x>620</x>
<y>10</y>
<width>84</width>
<height>51</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_27">
<item>
<widget class="QLabel" name="label_32">
<property name="text">
<string>Filling:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_dtgc">
<property name="text">
<string>doing</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="btn_dtgc">
<property name="text">
<string>DTgc</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_8">
<property name="geometry">
<rect>
<x>710</x>
<y>10</y>
<width>84</width>
<height>48</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_35">
<item>
<widget class="QLabel" name="label_34">
<property name="text">
<string>Filling:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_stbCoeff">
<property name="text">
<string>doing</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="btn_stbCoeff">
<property name="text">
<string>Stb Coeff</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>0</x>
<y>210</y>
<y>230</y>
<width>370</width>
<height>71</height>
</rect>
@ -678,7 +487,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>90</y>
<y>120</y>
<width>481</width>
<height>111</height>
</rect>
@ -759,30 +568,123 @@
<string extracomment="AFE Regs Value"/>
</property>
</widget>
<widget class="QPushButton" name="btn_afeGblPwrdn">
<widget class="QPushButton" name="btn_afeConfig">
<property name="geometry">
<rect>
<x>380</x>
<y>30</y>
<width>94</width>
<y>50</y>
<width>91</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Pwrdn Disable</string>
<string>Config</string>
</property>
</widget>
<widget class="QPushButton" name="btn_afeConfig">
</widget>
<widget class="QGroupBox" name="groupBox_13">
<property name="geometry">
<rect>
<x>380</x>
<x>0</x>
<y>10</y>
<width>741</width>
<height>105</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>105</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>105</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
<underline>false</underline>
</font>
</property>
<property name="title">
<string>Scenario Parameters</string>
</property>
<widget class="QWidget" name="layoutWidget_9">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>721</width>
<height>27</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>HDF5 file:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_h5File"/>
</item>
<item>
<widget class="QPushButton" name="btn_h5Browse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget_3">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>91</width>
<width>82</width>
<height>17</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_29">
<item>
<widget class="QLabel" name="label_83">
<property name="text">
<string>Filling:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_scenFillingDone">
<property name="text">
<string>doing</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="btn_setScenario">
<property name="geometry">
<rect>
<x>633</x>
<y>70</y>
<width>101</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Config</string>
<string>Set Scenario</string>
</property>
</widget>
</widget>
@ -1316,7 +1218,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>210</y>
<y>230</y>
<width>791</width>
<height>71</height>
</rect>
@ -1481,90 +1383,19 @@
<property name="geometry">
<rect>
<x>0</x>
<y>330</y>
<y>350</y>
<width>811</width>
<height>181</height>
<height>161</height>
</rect>
</property>
<property name="title">
<string>TRX Board</string>
</property>
<widget class="QWidget" name="layoutWidget_4">
<property name="geometry">
<rect>
<x>380</x>
<y>20</y>
<width>371</width>
<height>27</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<widget class="QLabel" name="label_22">
<property name="text">
<string>PLLCLK TPS Regulator(KHz):</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_pllClkTps"/>
</item>
<item>
<widget class="QPushButton" name="btn_pllClkTps">
<property name="text">
<string>PushButton</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget_16">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>371</width>
<height>27</height>
</rect>
</property>
<layout class="QHBoxLayout" name="hl_pllClkSt">
<item>
<widget class="QLabel" name="label_17">
<property name="text">
<string>PLLCLK ST Regulator(KHz):</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_pllClkSt"/>
</item>
<item>
<widget class="QPushButton" name="btn_pllClkSt">
<property name="text">
<string>PushButton</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="Line" name="line">
<property name="geometry">
<rect>
<x>0</x>
<y>40</y>
<width>751</width>
<height>20</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="Line" name="line_2">
<property name="geometry">
<rect>
<x>300</x>
<y>50</y>
<y>30</y>
<width>16</width>
<height>111</height>
</rect>
@ -1573,39 +1404,13 @@
<enum>Qt::Vertical</enum>
</property>
</widget>
<widget class="QWidget" name="layoutWidget_5">
<property name="geometry">
<rect>
<x>540</x>
<y>160</y>
<width>163</width>
<height>17</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="label12">
<property name="text">
<string>On Board Temp:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_Temp">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget_8">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<x>0</x>
<y>30</y>
<width>126</width>
<height>19</height>
<height>21</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
@ -1629,7 +1434,7 @@
<property name="geometry">
<rect>
<x>310</x>
<y>50</y>
<y>30</y>
<width>126</width>
<height>17</height>
</rect>
@ -1655,7 +1460,7 @@
<property name="geometry">
<rect>
<x>310</x>
<y>70</y>
<y>50</y>
<width>119</width>
<height>17</height>
</rect>
@ -1681,7 +1486,7 @@
<property name="geometry">
<rect>
<x>310</x>
<y>90</y>
<y>70</y>
<width>121</width>
<height>17</height>
</rect>
@ -1707,7 +1512,7 @@
<property name="geometry">
<rect>
<x>310</x>
<y>110</y>
<y>90</y>
<width>151</width>
<height>17</height>
</rect>
@ -1733,7 +1538,7 @@
<property name="geometry">
<rect>
<x>310</x>
<y>130</y>
<y>110</y>
<width>152</width>
<height>17</height>
</rect>
@ -1759,8 +1564,8 @@
<property name="geometry">
<rect>
<x>540</x>
<y>50</y>
<width>169</width>
<y>30</y>
<width>147</width>
<height>17</height>
</rect>
</property>
@ -1785,7 +1590,7 @@
<property name="geometry">
<rect>
<x>310</x>
<y>150</y>
<y>130</y>
<width>143</width>
<height>17</height>
</rect>
@ -1811,8 +1616,8 @@
<property name="geometry">
<rect>
<x>540</x>
<y>70</y>
<width>165</width>
<y>50</y>
<width>164</width>
<height>17</height>
</rect>
</property>
@ -1833,88 +1638,11 @@
</item>
</layout>
</widget>
<widget class="QPushButton" name="btn_getFpgaVersion">
<property name="geometry">
<rect>
<x>710</x>
<y>60</y>
<width>91</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>FPGA Version</string>
</property>
</widget>
<widget class="QLabel" name="l_masterVersion">
<property name="geometry">
<rect>
<x>720</x>
<y>90</y>
<width>81</width>
<height>17</height>
</rect>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Master Code&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QLabel" name="l_slave0Version">
<property name="geometry">
<rect>
<x>720</x>
<y>110</y>
<width>81</width>
<height>17</height>
</rect>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Slave0 Code&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QLabel" name="l_slave1Version">
<property name="geometry">
<rect>
<x>720</x>
<y>130</y>
<width>81</width>
<height>17</height>
</rect>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Slave1 Code&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QLabel" name="l_slave2Version">
<property name="geometry">
<rect>
<x>720</x>
<y>150</y>
<width>81</width>
<height>17</height>
</rect>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Slave2 Code&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_14">
<property name="geometry">
<rect>
<x>470</x>
<y>50</y>
<y>30</y>
<width>62</width>
<height>122</height>
</rect>
@ -1987,8 +1715,8 @@
<rect>
<x>540</x>
<y>90</y>
<width>149</width>
<height>63</height>
<width>145</width>
<height>62</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_17">
@ -2034,20 +1762,13 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_96">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_4">
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<x>0</x>
<y>60</y>
<width>285</width>
<height>67</height>
</rect>
@ -2258,6 +1979,91 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget_5">
<property name="geometry">
<rect>
<x>140</x>
<y>30</y>
<width>163</width>
<height>21</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="label12">
<property name="text">
<string>On Board Temp:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_Temp">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>710</x>
<y>40</y>
<width>101</width>
<height>111</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPushButton" name="btn_getFpgaVersion">
<property name="text">
<string>FPGA Version</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="l_masterVersion">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Master Code&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="l_slave0Version">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Slave0 Code&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="l_slave1Version">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Slave1 Code&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="l_slave2Version">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Slave2 Code&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_7">
<property name="geometry">
@ -2326,7 +2132,7 @@
<item>
<widget class="QLabel" name="l_detectedProbe">
<property name="text">
<string>TextLabel</string>
<string>None</string>
</property>
</widget>
</item>

112
src/model/hardware/core/TrxBoard.cpp

@ -36,7 +36,7 @@ void TrxBoard::readData()
auto temp = QByteArray::fromRawData(_device.getBufferPtr(_swCounter), BUFFER_SIZE);
packetEngine.newData(temp);
emit sendFramePacket(temp);
//emit sendFramePacket(temp);
_swCounter++;
if(_swCounter >= SW_BUFFER_NUM)
@ -253,7 +253,7 @@ void TrxBoard::setScenario(ScenGenHardwareOutput_t scenGenHw)
scenParams->hwRegister->configLut->mla.append(k.mla);
scenParams->hwRegister->configLut->stb.append(k.stb);
scenParams->hwRegister->configLut->absEn.append(k.absEn);
scenParams->hwRegister->configLut->ddcEn.append(k.ddcEn);
scenParams->hwRegister->configLut->ddcEn.append(k.ddcn);
scenParams->hwRegister->configLut->dpeEn.append(k.dpeEn);
scenParams->hwRegister->configLut->stbEn.append(k.stbEn);
scenParams->hwRegister->configLut->wmfEn.append(k.wmfEn);
@ -268,7 +268,7 @@ void TrxBoard::setScenario(ScenGenHardwareOutput_t scenGenHw)
}
scenParams->indexParams->dLineNum = scenGenHw.indexParams.dLineNum;
scenParams->indexParams->frameType=scenGenHw.indexParams.frameType;
scenParams->indexParams->frameType=scenGenHw.frameType;
scenParams->indexParams->dEnsembleNum = scenGenHw.indexParams.dEnsembleNum;
scenParams->indexParams->lastLineInFrame = scenGenHw.indexParams.lastLineInFrame;
scenParams->indexParams->firstLineInFrame = scenGenHw.indexParams.firstLineInFrame;
@ -408,10 +408,10 @@ void TrxBoard::setScenario (ScenGenHardwareOutput* scenParams)
this->_beamFormerSlave2->apodizationLut(apodizationQ);
scenParamsFilling(set);
//this->_beamFormerSlave0->afeLut(scenParams->hwRegister->afe);
//this->_beamFormerSlave1->afeLut(scenParams->hwRegister->afe);
//this->_beamFormerSlave2->afeLut(scenParams->hwRegister->afe);
//scenParamsFilling(set);
////this->_beamFormerSlave0->afeLut(scenParams->hwRegister->afe);
////this->_beamFormerSlave1->afeLut(scenParams->hwRegister->afe);
////this->_beamFormerSlave2->afeLut(scenParams->hwRegister->afe);
////scenParamsFilling(set);
///////////////////////////////// DSP setting ///////////////////////////////
this->_dsp->receiverConfigurationLut(scenParams->hwRegister->receiverConfigTypeNumber,
@ -492,6 +492,13 @@ void TrxBoard::setAtgcMode(eAtgcMode mode, quint16 value) const
this->_dsp->atgcMode(mode, value);
}
void TrxBoard::setDtgcLut(QVector<float>& dtgcLut)
{
_unsignedQntzrVec = Calculation::qntzr(dtgcLut, 0, 12, 8, 0, true, false);
QList<quint32> dtgcLutQ = _unsignedQntzrVec.toList();
this->_dsp->dtgcLut(dtgcLutQ);
}
void TrxBoard::setMetaData(const QByteArray metaData) const
{
QList<quint64> data;
@ -512,20 +519,6 @@ void TrxBoard::setMetaData(const QByteArray metaData) const
this->_sram->setSramMetaData(data);
}
void TrxBoard::setDtgcLut(QVector<float>& dtgcLut)
{
_unsignedQntzrVec = Calculation::qntzr(dtgcLut, 0, 12, 8, 0, true, false);
QList<quint32> dtgcLutQ = _unsignedQntzrVec.toList();
this->_dsp->dtgcLut(dtgcLutQ);
}
void TrxBoard::setAfePwrdnMode(eAfePwrdnMode cmd) const
{
this->_afeSlave0->setAfeGblPwr(cmd);
this->_afeSlave1->setAfeGblPwr(cmd);
this->_afeSlave2->setAfeGblPwr(cmd);
}
QList<quint32> TrxBoard::getAfeReg(eSlaveSelect sel, quint32 afeRegAddr)
{
QList<quint32> afeRegValue;
@ -577,6 +570,14 @@ void TrxBoard::setAfeConfig(AfeConfig afe)
void TrxBoard::slaveFpgaProgram(QString path)
{
scenParamsFilling(clear);
if(MOUNTED_SLAVE_FPGA <= 0 || MOUNTED_SLAVE_FPGA >= 8)
{
throw SonoException("Wrong mounted slave fpga is selected");
}
QByteArray bitFileData;
QFile bitFile(path);
bitFileData.clear();
@ -594,9 +595,9 @@ void TrxBoard::slaveFpgaProgram(QString path)
bitFileData = bitFile.readAll();
bitFile.close();
this->_fpgaProgram->program(bitFileData, SLAVE_FPGA_NUMBER);
this->_fpgaProgram->program(bitFileData, MOUNTED_SLAVE_FPGA);
scenParamsFilling(clear);
}
void TrxBoard::setBeamFormerMode(eClkMode mode) const
@ -623,6 +624,12 @@ void TrxBoard::scenPlayerStart(void)
this->_device.startDma();
this->_bCtrlMngt->mpsDacsOn();
this->_afeSlave0->setAfeGblPwr(afePwrdnDisable);
this->_afeSlave1->setAfeGblPwr(afePwrdnDisable);
this->_afeSlave2->setAfeGblPwr(afePwrdnDisable);
this->_scenPlayer->control.command(true);
_run = true;
@ -633,7 +640,6 @@ void TrxBoard::scenPlayerStart(void)
{
throw SonoException("Total scenario luts and sram parameters are not written compeletely");
}
}
void TrxBoard::scenPlayerStop(void)
@ -644,6 +650,10 @@ void TrxBoard::scenPlayerStop(void)
this->_scenPlayer->control.command(false);
this->_afeSlave0->setAfeGblPwr(afePwrdnEnable);
this->_afeSlave1->setAfeGblPwr(afePwrdnEnable);
this->_afeSlave2->setAfeGblPwr(afePwrdnEnable);
this->_bCtrlMngt->mpsDacsOff();
}
@ -736,31 +746,30 @@ quint32 TrxBoard::trxId() const
{
QByteArray id = this->_bCtrlMngt->trxEepromRead(EEPROM_ID_BYTE_BEGIN, EEPROM_ID_BYTE_NUMBER);
return byteArray2UintBigEndian <quint32> (id);
return byteArray2UintBigEndian<quint16> (id);
}
quint32 TrxBoard::mpsId() const
{
QByteArray id = this->_bCtrlMngt->mpsEepromRead(EEPROM_ID_BYTE_BEGIN, EEPROM_ID_BYTE_NUMBER);
return byteArray2UintBigEndian <quint32>(id);
return byteArray2UintBigEndian<quint16> (id);
}
quint32 TrxBoard::prbCtrlId() const
{
QByteArray id =
this->_bCtrlMngt->prbCtrlEepromRead(EEPROM_ID_BYTE_BEGIN, EEPROM_ID_BYTE_NUMBER);
QByteArray id = this->_bCtrlMngt->prbCtrlEepromRead(EEPROM_ID_BYTE_BEGIN, EEPROM_ID_BYTE_NUMBER);
return byteArray2UintBigEndian <quint32>(id);
return byteArray2UintBigEndian<quint16> (id);
}
quint32 TrxBoard::prbId(quint8 prbSel) const
quint32 TrxBoard::prbId(eSelectProbe prbSel) const
{
QByteArray id = this->_bCtrlMngt->prbEepromRead(EEPROM_ID_BYTE_BEGIN,
EEPROM_ID_BYTE_NUMBER,
prbSel);
prbSel-1);
return byteArray2UintBigEndian <quint32>(id);
return byteArray2UintBigEndian<quint16> (id);
}
void TrxBoard::getConnectedPrbId(ConnectedPrbId* prbId) const
@ -772,7 +781,7 @@ void TrxBoard::getConnectedPrbId(ConnectedPrbId* prbId) const
vec = this->_bCtrlMngt->getConnectedPrb();
for(quint8 i = 0; i < vec.size(); i++)
for(quint8 i(0); i < vec.size(); i++)
{
if(vec.at(i))
{
@ -780,53 +789,45 @@ void TrxBoard::getConnectedPrbId(ConnectedPrbId* prbId) const
}
else
{
id.append(nullptr);
id.append(nullptr);
}
switch(i)
{
case 0:
prbId->prbA = byteArray2UintBigEndian <quint32>(id);
prbId->prbA = byteArray2UintBigEndian<quint16> (id);
break;
case 1:
prbId->prbB = byteArray2UintBigEndian <quint32>(id);
prbId->prbB = byteArray2UintBigEndian<quint16> (id);
break;
case 2:
prbId->prbC = byteArray2UintBigEndian <quint32>(id);
prbId->prbC = byteArray2UintBigEndian<quint16> (id);
break;
case 3:
prbId->prbD = byteArray2UintBigEndian <quint32>(id);
prbId->prbD = byteArray2UintBigEndian<quint16> (id);
break;
}
id.clear();
}
}
QString TrxBoard::trxInfo() const
QByteArray TrxBoard::trxInfo() const
{
QString str =
QString(this->_bCtrlMngt->trxEepromRead(EEPROM_INFO_BYTE_BEGIN, EEPROM_INFO_BYTE_NUMBER));
return str;
return this->_bCtrlMngt->trxEepromRead(EEPROM_INFO_BYTE_BEGIN, EEPROM_INFO_BYTE_NUMBER);
}
QString TrxBoard::mpsInfo() const
QByteArray TrxBoard::mpsInfo() const
{
QString str =
QString(this->_bCtrlMngt->mpsEepromRead(EEPROM_INFO_BYTE_BEGIN, EEPROM_INFO_BYTE_NUMBER));
return str;
return this->_bCtrlMngt->mpsEepromRead(EEPROM_INFO_BYTE_BEGIN, EEPROM_INFO_BYTE_NUMBER);
}
QString TrxBoard::prbCtrlInfo() const
QByteArray TrxBoard::prbCtrlInfo() const
{
QString str =
QString(this->_bCtrlMngt->prbCtrlEepromRead(EEPROM_INFO_BYTE_BEGIN,
EEPROM_INFO_BYTE_NUMBER));
return str;
return this->_bCtrlMngt->prbCtrlEepromRead(EEPROM_INFO_BYTE_BEGIN, EEPROM_INFO_BYTE_NUMBER);
}
QByteArray TrxBoard::prbInfo(quint8 prbSel) const
@ -874,6 +875,7 @@ void TrxBoard::getConnectedPrbInfo(ConnectedPrbInfo* prbInfo) const
prbInfo->prbD = info;
break;
}
info.clear();
}
}
@ -984,5 +986,7 @@ void TrxBoard::getFpgasCodeVersion(FpgaCodeVersion* version) const
void TrxBoard::sramParityClear()
{
this->_device.device.writeLong(BAR_SRAM, 0, 0);
quint64 val;
val = this->_device.device.readLong(BAR_SRAM, 0);
this->_device.device.writeLong(BAR_SRAM, 0, val);
}

11
src/model/hardware/core/register/boardsCtrlMngt/BoardsCtrlMngt.cpp

@ -624,6 +624,13 @@ void BoardsCtrlMngt::mpsDacsOff() const
getSupervisorI2cDone();
}
void BoardsCtrlMngt::mpsDacsOn() const
{
getSupervisorI2cTimeout();
setSetupCmdDacsOnOff(false, true, true);
getSupervisorI2cDone();
}
void BoardsCtrlMngt::mpsHvSet(float &hva, float &hvb) const
{
if (hva > hvb && hva <= HVA_MAX_VALUE)
@ -635,10 +642,6 @@ void BoardsCtrlMngt::mpsHvSet(float &hva, float &hvb) const
getSupervisorI2cTimeout();
setMpsDacsValue (_mpsDacs);
getSupervisorI2cDone();
getSupervisorI2cTimeout();
setSetupCmdDacsOnOff(false, true, true);
getSupervisorI2cDone();
}
else
throw SonoException("A and B voltage are out of range");

Loading…
Cancel
Save