Browse Source

The functions of scenPlayerStop & emulatorStop are added to setScenario

The mpsDacsValues are changed to under 3v
The scenPlayerStop function is called by selectProbe
master v1.6
Arash Aletayeb 4 years ago
parent
commit
85175143a4
  1. 7
      developHw.pro.user
  2. 2
      include/model/hardware/core/TrxBoard.h
  3. 4
      include/model/hardware/core/register/beamFormer/registerDefinition/ApodizationLut.h
  4. 2
      include/model/hardware/core/register/beamFormer/registerDefinition/ElementPositionLut.h
  5. 2
      include/model/hardware/core/register/dsp/registerDefinition/AtgcLut.h
  6. 2
      include/model/hardware/core/register/dsp/registerDefinition/BlendWeight.h
  7. 2
      include/model/hardware/core/register/dsp/registerDefinition/DtgcLut.h
  8. 2
      include/model/hardware/core/register/dsp/registerDefinition/LpfLut.h
  9. 237
      mainwindow.cpp
  10. 14
      mainwindow.h
  11. 201
      mainwindow.ui
  12. 0
      qcustomplot.cpp
  13. 0
      qcustomplot.h
  14. 12
      src/model/hardware/core/TrxBoard.cpp
  15. 12
      src/model/hardware/core/register/boardsCtrlMngt/BoardsCtrlMngt.cpp
  16. 18
      src/model/hardware/core/register/fpgaProgram/FpgaProgram.cpp

7
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2021-06-12T08:44:12. -->
<!-- Written by QtCreator 4.10.0, 2021-06-13T13:18:07. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@ -304,8 +304,8 @@
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">developHw</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/hasis/Desktop/Develop_HardwareTest/developHw/developHw.pro</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">developHw2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/hasis/Desktop/New/Develop_HardwareTest/developHw/developHw.pro</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
@ -314,7 +314,6 @@
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/hasis/Desktop/Develop_HardwareTest/build-developHw-Desktop_Qt_5_13_1_GCC_64bit-Debug</value>
</valuemap>

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

@ -202,7 +202,7 @@ public:
void mpsReset(void) const;
void mpsSetAo(float voltA, float voltB) const;
void selectProbe(eSelectProbe prbSel) const;
void selectProbe(eSelectProbe prbSel);
void getHealthStatus(HealthStatus* healStat) const;
//////////////////////////////// BPI Flash API /////////////////////////////////

4
include/model/hardware/core/register/beamFormer/registerDefinition/ApodizationLut.h

@ -19,8 +19,8 @@ private:
void prepareData(quint32 index) override
{
apodizationPrp->setValue(_apodization.at(static_cast<qint32>(index)));
//apodizationPrp->setValue(_apodization[static_cast<qint32>(index)]);
//apodizationPrp->setValue(_apodization.at(static_cast<qint32>(index)));
apodizationPrp->setValue(_apodization[static_cast<qint32>(index)]);
}
public:

2
include/model/hardware/core/register/beamFormer/registerDefinition/ElementPositionLut.h

@ -19,7 +19,7 @@ private:
void prepareData(quint32 index) override
{
elementPositionPrp->setValue(_elementPosition.at(static_cast<qint32>(index)));
elementPositionPrp->setValue(_elementPosition[static_cast<qint32>(index)]);
}
public:

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

@ -19,7 +19,7 @@ private:
void prepareData(quint32 index) override
{
atgcLut->setValue(_atgcLut.at(static_cast<qint32>(index)));
atgcLut->setValue(_atgcLut[static_cast<qint32>(index)]);
}
public:

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

@ -19,7 +19,7 @@ private:
void prepareData(quint32 index) override
{
blendWeight->setValue(_blendWeight.at(static_cast<qint32>(index)));
blendWeight->setValue(_blendWeight[static_cast<qint32>(index)]);
}
public:

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

@ -19,7 +19,7 @@ private:
void prepareData(quint32 index) override
{
dtgcLut->setValue(_dtLut.at(static_cast<qint32>(index)));
dtgcLut->setValue(_dtLut[static_cast<qint32>(index)]);
}
public:

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

@ -19,7 +19,7 @@ private:
void prepareData(quint32 index) override
{
lpfLut->setValue(_lpfLut.at(static_cast<qint32>(index)));
lpfLut->setValue(_lpfLut[static_cast<qint32>(index)]);
}
public:

237
mainwindow.cpp

@ -51,7 +51,7 @@ MainWindow::MainWindow(QWidget *parent)
ui->rbtn_reg->setChecked(_settings->value(REG_ACCESS_SEL).value<bool>());
ui->rbtn_offset->setChecked(!_settings->value(REG_ACCESS_SEL).value<bool>());
ui->tb_fpgaBit->setText(_settings->value(FPGA_FILE_PATH).value<QString>());
ui->tb_h5File->setText(_settings->value(SCENARIO_FILE_PATH).value<QString>());
ui->tb_scenFilesPath->setText(_settings->value(SCENARIO_FILE_PATH).value<QString>());
// connect(this, &MainWindow::updateBlockProgressValue, this, &MainWindow::newBlockProgressValue);
// connect(this, &MainWindow::updateFpgaProgressValue, this, &MainWindow::newFpgaProgressValue);
@ -76,6 +76,7 @@ MainWindow::MainWindow(QWidget *parent)
ui->btn_updateRdbackValue->setText(UPDATE);
ui->l_detectedProbe->setText("None");
ui->btn_dmaLogLast->setHidden(true);
ui->btn_prbRomWrite->setDisabled(true);
// uint32_t offsetdbgCmd[3] = {0x140000*4,0x240000*4,0x340000*4};
// auto value = 0;
@ -2556,7 +2557,6 @@ void MainWindow::datasetBranch(const string &branchPath, T datasetValue[MAX_ARRA
/*************************************************************************************************/
void MainWindow::setScenario(const string &h5Path)
{
const H5std_string filePath(h5Path);
H5File file (filePath, H5F_ACC_RDONLY);
_file = file;
@ -2564,8 +2564,9 @@ void MainWindow::setScenario(const string &h5Path)
try
{
/****************** /sramParameters/frameType ******************/
datasetBranch <float_t>("/sramParameters/frameType", floatArray);
scenParams.frameType = static_cast<quint8>(floatArray[0]);
// datasetBranch <float_t>("/sramParameters/frameType", floatArray);
// scenParams.frameType = static_cast<quint8>(floatArray[0]);
scenParams.frameType = 0;
/****************** /sramParameters/totalTxShotNo ******************/
datasetBranch <float_t>("/sramParameters/totalTxShotNo", floatArray);
@ -2581,11 +2582,6 @@ void MainWindow::setScenario(const string &h5Path)
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
scenParams.rxBeamFormerNumber.push_back(static_cast<quint8>(floatArray[var]));
// for(auto j=0; j<scenParams.focusTypeNumber; j++)
// {
// qDebug() << scenParams.rxBeamFormerNumber[j];
// }
/**************** /sramParameters/pulseInterval ********************/
datasetBranch <float_t>("/sramParameters/pulseInterval", floatArray);
scenParams.pulseInterval.clear();
@ -2595,43 +2591,43 @@ void MainWindow::setScenario(const string &h5Path)
/**************** /sramParameters/indexParameters/shotPropertiesIndex ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/shotPropertiesIndex", floatArray);
scenParams.indexParams.shotPropertiesIndex.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.shotPropertiesIndex.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/pulsePropertiesIndex ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/pulsePropertiesIndex", floatArray);
scenParams.indexParams.pulsePropertiesIndex.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.pulsePropertiesIndex.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/receiverConfigurationIndex ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/receiverConfigurationIndex", floatArray);
scenParams.indexParams.receiverConfigurationIndex.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.receiverConfigurationIndex.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/firstLineInFrame ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/firstLineInFrame", floatArray);
scenParams.indexParams.firstLineInFrame.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.firstLineInFrame.push_back(static_cast<bool>(floatArray[var]));
/**************** /sramParameters/indexParameters/lastLineInFrame ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/lastLineInFrame", floatArray);
scenParams.indexParams.lastLineInFrame.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.lastLineInFrame.push_back(static_cast<bool>(floatArray[var]));
/**************** /sramParameters/indexParameters/dLineNum ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/dLineNum", floatArray);
scenParams.indexParams.dLineNum.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.dLineNum.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/dEnsembleNum ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/dEnsembleNum", floatArray);
scenParams.indexParams.dEnsembleNum.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.dEnsembleNum.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/txParameters/txFocusXPos ********************/
@ -2846,6 +2842,11 @@ void MainWindow::setScenario(const string &h5Path)
scenParams.hwRegister.apodizationLut.push_back(tempApodization);
}
// for(auto j=0; j<100; j++)
// {
// qDebug() << scenParams.hwRegister.apodizationLut[3][j];
// }
/**************** /registerParameters/aTgcLut ********************/
datasetBranch <float_t>("/registerParameters/aTgcLut", floatArray);
scenParams.hwRegister.atgcLut.clear();
@ -2876,6 +2877,14 @@ void MainWindow::setScenario(const string &h5Path)
scenParams.hwRegister.lpfLut.push_back(tempLpf);
}
/**************** /registerParameters/lineFilter ********************/
//datasetBranch <float_t>("/registerParameters/lpfLut", floatArray);
QVector<float> lineFilter;
lineFilter.push_back(0x0);
lineFilter.push_back(0x0);
lineFilter.push_back(0x1);
_trx.setLineFilterCoefficient(lineFilter);
/**************** /registerParameters/pulseProperties/halfPeriod ********************/
datasetBranch <float_t>("/registerParameters/pulseProperties/halfPeriod", floatArray);
QList<quint32> halfPeriod;
@ -3088,31 +3097,31 @@ void MainWindow::setScenario(const string &h5Path)
}
/**************** /registerParameters/receiverConfigProperties/dpeEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/dpeEn", floatArray);
QList<quint32> dpeEn;
// datasetBranch <float_t>("/registerParameters/receiverConfigProperties/dpeEn", floatArray);
// QList<quint32> dpeEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
dpeEn.push_back(static_cast<quint32>(floatArray[j]));
}
// for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
// {
// dpeEn.push_back(static_cast<quint32>(floatArray[j]));
// }
/**************** /registerParameters/receiverConfigProperties/ddcEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/ddcEn", floatArray);
QList<quint32> ddcEn;
// datasetBranch <float_t>("/registerParameters/receiverConfigProperties/ddcEn", floatArray);
// QList<quint32> ddcEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
ddcEn.push_back(static_cast<quint32>(floatArray[j]));
}
// for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
// {
// ddcEn.push_back(static_cast<quint32>(floatArray[j]));
// }
/**************** /registerParameters/receiverConfigProperties/wmfEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/wmfEn", floatArray);
QList<quint32> wmfEn;
// datasetBranch <float_t>("/registerParameters/receiverConfigProperties/wmfEn", floatArray);
// QList<quint32> wmfEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
wmfEn.push_back(static_cast<quint32>(floatArray[j]));
}
// for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
// {
// wmfEn.push_back(static_cast<quint32>(floatArray[j]));
// }
/**************** /registerParameters/receiverConfigProperties ********************/
ReceiverConfig_t receiverCfgObj;
@ -3122,11 +3131,14 @@ void MainWindow::setScenario(const string &h5Path)
{
receiverCfgObj.mla = receiverCfgMla.at(j);
receiverCfgObj.stb = stb.at(j);
receiverCfgObj.ddcn = ddcEn.at(j);
//receiverCfgObj.ddcn = ddcEn.at(j);
receiverCfgObj.ddcn = 1;
receiverCfgObj.absEn = absEn.at(j);
receiverCfgObj.dpeEn = dpeEn.at(j);
//receiverCfgObj.dpeEn = dpeEn.at(j);
receiverCfgObj.dpeEn = 0;
receiverCfgObj.stbEn = stbEn.at(j);
receiverCfgObj.wmfEn = wmfEn.at(j);
//receiverCfgObj.wmfEn = wmfEn.at(j);
receiverCfgObj.wmfEn = 0;
receiverCfgObj.lpfSel = lpfSel.at(j);
receiverCfgObj.aTgcSel = aTgcSel.at(j);
receiverCfgObj.focusNo = focusNo.at(j);
@ -3149,61 +3161,154 @@ void MainWindow::setScenario(const string &h5Path)
qDebug() << e.what();
}
ui->btn_scenStart->setText("Scenario Start");
ui->btn_emulator->setText("Emulator Start");
//QString saveFile = QFileDialog::getSaveFileName(this, "Save");
QString saveFile = "/home/hasis/Desktop/Develop_HardwareTest/saveSram.bin";
QFile sramFile(saveFile);
if (!sramFile.open(QIODevice::WriteOnly)){
QMessageBox::warning(this, "Warning", "Cann't save the file: " + sramFile.errorString());
return;
}
ui->l_scenFillingDone->setText("done");
changeLabelTextColor(ui->l_scenFillingDone, Qt::green);
}
quint32 num(0);
quint64 value(0);
while (num < SRAM_SIZE/4)
{
value = _usd->device->device.readLong(BAR_SRAM, static_cast<quint32>(num));
sramFile.write(Uint2ByteArray<quint64>(value));
num += sizeof (quint64);
}
/*************************************************************************************************/
void MainWindow::on_btn_setScenario_clicked()
{
_timeout->stop();
ui->l_scenFillingDone->setText("doing");
changeLabelTextColor(ui->l_scenFillingDone, Qt::red);
sramFile.flush();
sramFile.close();
QString sramScenario = "/scenGenOutput/scenario.h5";
QString h5Path = ui->tb_scenFilesPath->text() + sramScenario;
ui->l_scenFillingDone->setText("done");
changeLabelTextColor(ui->l_scenFillingDone, Qt::green);
auto scenFuture = QtConcurrent::run(this, &MainWindow::setScenario, h5Path.toStdString());
scenEndWather.setFuture(scenFuture);
}
/*************************************************************************************************/
void MainWindow::on_btn_h5Browse_clicked()
void MainWindow::on_btn_scenBrowse_clicked()
{
QFileDialog fileDialog;
fileDialog.setNameFilters({"Scenario file (*.h5)"});
fileDialog.setFileMode(QFileDialog::Directory);
fileDialog.setOption(QFileDialog::ShowDirsOnly);
auto result = fileDialog.exec();
if(result)
{
auto selectedPath = fileDialog.selectedFiles()[0];
ui->tb_h5File->setText(selectedPath);
ui->tb_scenFilesPath->setText(selectedPath);
_settings->setValue(SCENARIO_FILE_PATH, selectedPath);
}
}
/*************************************************************************************************/
void MainWindow::on_btn_setScenario_clicked()
void MainWindow::verifySramParams(QString& sramParamsPath)
{
}
/*************************************************************************************************/
void MainWindow::on_btn_sramParamsVerifying_clicked()
{
}
/*************************************************************************************************/
void MainWindow::verifyRegisterParams(QString& regParamsPath)
{
QString registerScenario = "/hardware/register.csv";
QString regReadParamsPath = regParamsPath + registerScenario;
QFile csvReadFile(regReadParamsPath);
if(!csvReadFile.open(QFile::ReadOnly))
{
MESSAGE_BOX("Could not open the register's scenario params.");
return;
}
QString registerCompareScenario = "/hardware/registerCompare.csv";
QString regCompareParamsPath = regParamsPath + registerCompareScenario;
QFile csvWriteFile(regCompareParamsPath);
csvWriteFile.open(QFile::WriteOnly);
quint32 bar = 0;
qint64 readSize = 0;
QString line;
auto size = csvReadFile.size();
while(readSize < size)
{
line = csvReadFile.readLine();
auto sl = line.split(',');
auto address = sl[0].toUInt(Q_NULLPTR, 16);
auto baseValue = sl[1].toUInt(Q_NULLPTR, 16);
auto boardValue = _usd->readWord(address, bar);
auto res = "NOK";
if (boardValue == baseValue)
{
res = "OK";
}
auto str = QStringLiteral("%1,%2,%3,%4")
.arg(address, 8, 16, QLatin1Char('0'))
.arg(baseValue, 8, 16, QLatin1Char('0'))
.arg(boardValue, 8, 16, QLatin1Char('0')).arg(res);
csvWriteFile.write(str.toStdString().c_str(), str.length());
csvWriteFile.write("\r\n", 2);
readSize += static_cast<qint64>(line.length());
//delay(1);
}
csvReadFile.close();
csvWriteFile.flush();
csvWriteFile.close();
ui->l_verifyRegisterParams->setText("done");
changeLabelTextColor(ui->l_verifyRegisterParams, Qt::green);
}
/*************************************************************************************************/
void MainWindow::on_btn_registerParamsVerifying_clicked()
{
_timeout->stop();
ui->l_scenFillingDone->setText("doing");
changeLabelTextColor(ui->l_scenFillingDone, Qt::red);
ui->l_verifyRegisterParams->setText("doing");
changeLabelTextColor(ui->l_verifyRegisterParams, Qt::red);
QString h5Path = ui->tb_h5File->text();
QString regParamsPath = ui->tb_scenFilesPath->text();
auto scenFuture = QtConcurrent::run(this, &MainWindow::setScenario, h5Path.toStdString());
auto scenFuture = QtConcurrent::run(this, &MainWindow::verifyRegisterParams, regParamsPath);
scenEndWather.setFuture(scenFuture);
}
/*************************************************************************************************/
void MainWindow::on_btn_sramParamsGenerating_clicked()
{
//QString saveFile = QFileDialog::getSaveFileName(this, "Save");
QString saveFile = "/home/hasis/Desktop/Develop_HardwareTest/saveSram.bin";
QFile sramFile(saveFile);
if (!sramFile.open(QIODevice::WriteOnly)){
QMessageBox::warning(this, "Warning", "Cann't save the file: " + sramFile.errorString());
return;
}
quint32 num(0);
quint64 value(0);
while (num < SRAM_SIZE/4)
{
value = _usd->device->device.readLong(BAR_SRAM, static_cast<quint32>(num));
sramFile.write(Uint2ByteArray<quint64>(value));
num += sizeof (quint64);
}
sramFile.flush();
sramFile.close();
}
/*************************************************************************************************/
void MainWindow::on_btn_setAtgcMode_clicked()
{

14
mainwindow.h

@ -125,8 +125,6 @@ private:
H5File _file;
// int32_t intArray [MAX_ARRAY_DEPTH][MAX_ARRAY_LENGTH];
// float_t floatArray[MAX_ARRAY_DEPTH][MAX_ARRAY_LENGTH];
float_t floatArray[MAX_ARRAY_DEPTH];
template<class T>
@ -137,6 +135,10 @@ private:
void setScenario(const string& h5Path);
void verifyRegisterParams(QString& regParamsPath);
void verifySramParams(QString& sramParamsPath);
void fpgaProgrammer(QString path);
void timeout();
@ -349,10 +351,16 @@ private slots:
void on_btn_afeConfig_clicked();
void on_btn_h5Browse_clicked();
void on_btn_scenBrowse_clicked();
void on_btn_setScenario_clicked();
void on_btn_sramParamsVerifying_clicked();
void on_btn_registerParamsVerifying_clicked();
void on_btn_sramParamsGenerating_clicked();
signals:
// void updateBlockProgressValue(int percentage, QProgressBar* prg);
// void updateFpgaProgressValue(int percentage);

201
mainwindow.ui

@ -27,7 +27,7 @@
<string/>
</property>
<property name="currentIndex">
<number>1</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@ -404,10 +404,10 @@
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>0</x>
<y>230</y>
<width>370</width>
<height>71</height>
<x>449</x>
<y>210</y>
<width>351</width>
<height>91</height>
</rect>
</property>
<property name="title">
@ -449,7 +449,7 @@
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>150</x>
<x>140</x>
<y>40</y>
<width>38</width>
<height>15</height>
@ -462,7 +462,7 @@
<widget class="QLineEdit" name="tb_aTgcValue">
<property name="geometry">
<rect>
<x>190</x>
<x>180</x>
<y>40</y>
<width>71</width>
<height>23</height>
@ -472,7 +472,7 @@
<widget class="QPushButton" name="btn_setAtgcMode">
<property name="geometry">
<rect>
<x>280</x>
<x>260</x>
<y>40</y>
<width>80</width>
<height>23</height>
@ -487,9 +487,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>120</y>
<width>481</width>
<height>111</height>
<y>210</y>
<width>431</width>
<height>91</height>
</rect>
</property>
<property name="title">
@ -498,8 +498,8 @@
<widget class="QComboBox" name="cb_afeSlaveSelect">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<x>0</x>
<y>40</y>
<width>71</width>
<height>23</height>
</rect>
@ -526,8 +526,8 @@
<widget class="QLineEdit" name="tb_afeRegAddr">
<property name="geometry">
<rect>
<x>90</x>
<y>50</y>
<x>80</x>
<y>40</y>
<width>71</width>
<height>23</height>
</rect>
@ -539,8 +539,8 @@
<widget class="QPushButton" name="btn_afeRead">
<property name="geometry">
<rect>
<x>180</x>
<y>50</y>
<x>160</x>
<y>40</y>
<width>80</width>
<height>23</height>
</rect>
@ -552,8 +552,8 @@
<widget class="QPlainTextEdit" name="tb_afeRegsValueArray">
<property name="geometry">
<rect>
<x>280</x>
<y>30</y>
<x>250</x>
<y>20</y>
<width>71</width>
<height>71</height>
</rect>
@ -571,14 +571,14 @@
<widget class="QPushButton" name="btn_afeConfig">
<property name="geometry">
<rect>
<x>380</x>
<y>50</y>
<width>91</width>
<x>330</x>
<y>40</y>
<width>95</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Config</string>
<string>Default Config</string>
</property>
</widget>
</widget>
@ -587,8 +587,8 @@
<rect>
<x>0</x>
<y>10</y>
<width>741</width>
<height>105</height>
<width>791</width>
<height>181</height>
</rect>
</property>
<property name="sizePolicy">
@ -606,7 +606,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>105</height>
<height>200</height>
</size>
</property>
<property name="font">
@ -624,7 +624,7 @@
<rect>
<x>10</x>
<y>30</y>
<width>721</width>
<width>771</width>
<height>27</height>
</rect>
</property>
@ -632,15 +632,15 @@
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>HDF5 file:</string>
<string>Scenario Files Path:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_h5File"/>
<widget class="QLineEdit" name="tb_scenFilesPath"/>
</item>
<item>
<widget class="QPushButton" name="btn_h5Browse">
<widget class="QPushButton" name="btn_scenBrowse">
<property name="text">
<string>Browse...</string>
</property>
@ -648,44 +648,153 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget_3">
<widget class="QWidget" name="verticalLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<x>690</x>
<y>70</y>
<width>82</width>
<height>17</height>
<width>91</width>
<height>48</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_29">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="label_83">
<widget class="QPushButton" name="btn_setScenario">
<property name="text">
<string>Filling:</string>
<string>Set Scenario</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_scenFillingDone">
<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>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_3">
<property name="geometry">
<rect>
<x>480</x>
<y>130</y>
<width>130</width>
<height>48</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QPushButton" name="btn_sramParamsVerifying">
<property name="text">
<string>doing</string>
<string>Verify Sram Params</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_30">
<item>
<widget class="QLabel" name="label_84">
<property name="text">
<string>Verifying:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_verifySramParams">
<property name="text">
<string>doing</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QPushButton" name="btn_setScenario">
<widget class="QWidget" name="verticalLayoutWidget_4">
<property name="geometry">
<rect>
<x>633</x>
<y>70</y>
<width>101</width>
<height>23</height>
<x>310</x>
<y>130</y>
<width>148</width>
<height>48</height>
</rect>
</property>
<property name="text">
<string>Set Scenario</string>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QPushButton" name="btn_registerParamsVerifying">
<property name="text">
<string>Verify Register Params</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_31">
<item>
<widget class="QLabel" name="label_94">
<property name="text">
<string>Verifying:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_verifyRegisterParams">
<property name="text">
<string>doing</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_5">
<property name="geometry">
<rect>
<x>10</x>
<y>130</y>
<width>150</width>
<height>48</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QPushButton" name="btn_sramParamsGenerating">
<property name="text">
<string>Create Sram Binary</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_35">
<item>
<widget class="QLabel" name="label_95">
<property name="text">
<string>Creating:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_createSramBinary">
<property name="text">
<string>doing</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</widget>

0
qcustomplot.cpp

0
qcustomplot.h

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

@ -34,9 +34,9 @@ void TrxBoard::readData()
_device.copy(_hwCounter - 1, _swCounter);
auto temp = QByteArray::fromRawData(_device.getBufferPtr(_swCounter), BUFFER_SIZE);
//packetEngine.newData(temp);
packetEngine.newData(temp);
emit sendFramePacket(temp);
//emit sendFramePacket(temp);
_swCounter++;
if(_swCounter >= SW_BUFFER_NUM)
@ -208,6 +208,8 @@ void TrxBoard::init()
void TrxBoard::setScenario(ScenGenHardwareOutput_t scenGenHw)
{
scenPlayerStop();
emulatorStop();
scenParams->focusTypeNumber = scenGenHw.focusTypeNumber;
scenParams->totalTxShotNumber = scenGenHw.totalTxShotNumber;
scenParams->rxBeamFormerNumber = scenGenHw.rxBeamFormerNumber.toVector();
@ -682,6 +684,9 @@ void TrxBoard::emulatorInit(EmulatorProperties* config) const
void TrxBoard::fillRam(QString path)
{
scenPlayerStop();
emulatorStop();
QFile emulFile(path);
QByteArray sramData;
QByteArray temp;
@ -920,8 +925,9 @@ void TrxBoard::mpsSetAo(float voltA, float voltB) const
this->_bCtrlMngt->mpsHvSet(voltA, voltB);
}
void TrxBoard::selectProbe(eSelectProbe prbSel) const
void TrxBoard::selectProbe(eSelectProbe prbSel)
{
scenPlayerStop();
this->_bCtrlMngt->setProbeSelect(prbSel);
}

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

@ -635,9 +635,15 @@ void BoardsCtrlMngt::mpsHvSet(float &hva, float &hvb) const
{
if (hva > hvb && hva <= HVA_MAX_VALUE)
{
_mpsDacs->cwdValue = 0.0f;
_mpsDacs->hvaValue = hva;
_mpsDacs->hvbValue = hvb;
if (hva > 3.3f){
_mpsDacs->cwdValue = 0.0f;
_mpsDacs->hvaValue = 3.3f;
_mpsDacs->hvbValue = 1.53f;
}
// _mpsDacs->cwdValue = 0.0f;
// _mpsDacs->hvaValue = hva;
// _mpsDacs->hvbValue = hvb;
getSupervisorI2cTimeout();
setMpsDacsValue (_mpsDacs);

18
src/model/hardware/core/register/fpgaProgram/FpgaProgram.cpp

@ -30,12 +30,12 @@ void FpgaProgram::program(QByteArray& bitFileData, quint8 number)
setSlaveFpgaNumber(number);
QProgressDialog progress;
progress.setMinimumSize(300,100);
progress.setLabelText("Please wait...");
progress.setWindowTitle("Slaves FPGA Programming");
progress.setRange(0,bitFileData.size());
progress.setModal(true);
// QProgressDialog progress;
// progress.setMinimumSize(300,100);
// progress.setLabelText("Please wait...");
// progress.setWindowTitle("Slaves FPGA Programming");
// progress.setRange(0,bitFileData.size());
// progress.setModal(true);
while(progByte < bitFileData.size())
{
@ -70,9 +70,9 @@ void FpgaProgram::program(QByteArray& bitFileData, quint8 number)
"Timeout is happened and the programming of the slave FPGAs is failed");
}
progress.setValue(progByte);
if (progress.wasCanceled())
throw SonoException("Slaves fpga programming is canceled");
// progress.setValue(progByte);
// if (progress.wasCanceled())
// throw SonoException("Slaves fpga programming is canceled");
temp.clear();
progByte += sizeof(quint32);

Loading…
Cancel
Save