Browse Source

ApodizationParameters & DdcParameters are added.

Arash Aletayeb 2 years ago
parent
commit
9921dc7371
  1. 2
      developHw.pro.user
  2. 184
      hdf5Scenario/hdf5Scenario.cpp
  3. 4
      include/model/hardware/core/lowLevelApi/TrxBoard.h
  4. 2
      include/model/hardware/core/lowLevelApi/TrxBoardUtils/ScenParamsRanges.h
  5. 2
      include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h
  6. 4
      include/model/hardware/core/lowLevelApi/register/beamFormer/BeamFormer.h
  7. 9
      include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/ApoParams.h
  8. 4
      include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/MaxApertureSize.h
  9. 4
      include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/MinApertureSize.h
  10. 4
      include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/RxActiveElementPoint.h
  11. 4
      include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/RxActiveElementStep.h
  12. 4
      include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/WinOpenPoint.h
  13. 4
      include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/WinOpenVal.h
  14. 23
      include/model/scenarioGenerator/core/scenario/type/misc/ApodizationParameters.h
  15. 23
      include/model/scenarioGenerator/core/scenario/type/misc/ApodizationParams.h
  16. 20
      include/model/scenarioGenerator/core/scenario/type/misc/DdcParameters.h
  17. 11
      include/model/scenarioGenerator/core/scenario/type/misc/FrequencyPointLut.h
  18. 13
      include/model/scenarioGenerator/dto/hardware/HwScenarioDependent.h
  19. 111
      src/model/hardware/core/lowLevelApi/TrxBoard.cpp
  20. 2
      src/model/hardware/core/lowLevelApi/register/beamFormer/BeamFormer.cpp

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2022-12-04T11:15:41. -->
<!-- Written by QtCreator 4.10.0, 2022-12-31T16:09:58. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

184
hdf5Scenario/hdf5Scenario.cpp

@ -324,55 +324,78 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
/*********** /registerParameters/ddcParameters/startFreqLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/startFreqLut", floatArray);
scenParams.hwRegister.startFreqLut.clear();
scenParams.hwRegister.ddcParams.startFreqLut.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.startFreqLut.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.ddcParams.startFreqLut.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/endFreqLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/endFreqLut", floatArray);
scenParams.hwRegister.endFreqLut.clear();
scenParams.hwRegister.ddcParams.endFreqLut.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.endFreqLut.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.ddcParams.endFreqLut.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/startFreqPointLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/startFreqPointLut", floatArray);
QList<quint32> startFreqPoint;
scenParams.hwRegister.ddcParams.startFreqPoint.clear();
for (quint32 var = 0; var < 4; var++)
startFreqPoint.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.ddcParams.startFreqPoint.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/endFreqPointLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/endFreqPointLut", floatArray);
QList<quint32> endFreqPoint;
scenParams.hwRegister.ddcParams.endFreqPoint.clear();
for (quint32 var = 0; var < 4; var++)
endFreqPoint.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/freqPointLut ***************/
scenParams.hwRegister.freqPointLut.clear();
for (qint32 var = 0; var < 4; var++)
{
FrequencyPointLut_t frequencyPointLut;
frequencyPointLut.startFreqPoint = startFreqPoint.at(var);
frequencyPointLut.endFreqPoint = endFreqPoint.at(var);
scenParams.hwRegister.freqPointLut.push_back(frequencyPointLut);
}
scenParams.hwRegister.ddcParams.endFreqPoint.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/freqStepLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/freqStepLut", floatArray);
scenParams.hwRegister.freqStepLut.clear();
scenParams.hwRegister.ddcParams.freqStepLut.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.freqStepLut.push_back(floatArray[var]);
scenParams.hwRegister.ddcParams.freqStepLut.push_back(floatArray[var]);
/*********** /registerParameters/ddcParameters/lpfWeightStepLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/lpfWeightStepLut", floatArray);
scenParams.hwRegister.lpfWeightStepLut.clear();
scenParams.hwRegister.ddcParams.lpfWeightStepLut.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.lpfWeightStepLut.push_back(floatArray[var]);
scenParams.hwRegister.ddcParams.lpfWeightStepLut.push_back(floatArray[var]);
/*********** /registerParameters/ddcParameters/startLpfWeightLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/startLpfWeightLut", floatArray);
scenParams.hwRegister.startLpfWeightLut.clear();
scenParams.hwRegister.ddcParams.startLpfWeightLut.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.startLpfWeightLut.push_back(floatArray[var]);
scenParams.hwRegister.ddcParams.startLpfWeightLut.push_back(floatArray[var]);
/*********** /registerParameters/ddcParameters/startLpfLut ****************/
datasetBranch <float_t>("/registerParameters/ddcParameters/startLpfLut", floatArray);
scenParams.hwRegister.ddcParams.startLpf.clear();
for (quint32 i = 0; i < 4; i++)
{
QList<quint32> temp;
for (quint32 j = 0; j < 64; j++)
{
temp.push_back(static_cast<quint32>(floatArray[j + i * 64]));
}
scenParams.hwRegister.ddcParams.startLpf.push_back(temp);
}
/*********** /registerParameters/ddcParameters/endLpfLut ****************/
datasetBranch <float_t>("/registerParameters/ddcParameters/endLpfLut", floatArray);
scenParams.hwRegister.ddcParams.endLpf.clear();
for (quint32 i = 0; i < 4; i++)
{
QList<quint32> temp;
for (quint32 j = 0; j < 64; j++)
{
temp.push_back(static_cast<quint32>(floatArray[j + i * 64]));
}
scenParams.hwRegister.ddcParams.endLpf.push_back(temp);
}
/************* /registerParameters/ddcParameters/lpfScale *****************/
datasetBranch <float_t>("/registerParameters/ddcParameters/lpfScale", floatArray);
scenParams.hwRegister.ddcParams.lpfScale.clear();
for (quint8 i = 0; i < 4; i++)
scenParams.hwRegister.ddcParams.lpfScale.push_back(static_cast<quint8>(floatArray[i]));
/**************** /registerParameters/dTgcLut ********************/
datasetBranch <float_t>("/registerParameters/dTgcLut", floatArray);
@ -510,95 +533,75 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
/********* /registerParameters/apodizationParameters/maxApertureSize ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/maxApertureSize", floatArray);
QList<quint32> maxApertureSize;
scenParams.hwRegister.apodizationParams.maxApertureSize.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
maxApertureSize.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.apodizationParams.maxApertureSize.push_back(static_cast<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/winOpenStartPoint ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/winOpenStartPoint", floatArray);
QList<quint32> winOpenStartPoint;
scenParams.hwRegister.apodizationParams.winOpenStartPoint.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
winOpenStartPoint.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.apodizationParams.winOpenStartPoint.push_back(static_cast<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/winOpenStopPoint ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/winOpenStopPoint", floatArray);
QList<quint32> winOpenStopPoint;
scenParams.hwRegister.apodizationParams.winOpenStopPoint.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
winOpenStopPoint.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.apodizationParams.winOpenStopPoint.push_back(static_cast<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/winOpenStartVal ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/winOpenStartVal", floatArray);
QList<float> winOpenStartVal;
scenParams.hwRegister.apodizationParams.winOpenStartVal.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
winOpenStartVal.push_back(floatArray[var]);
scenParams.hwRegister.apodizationParams.winOpenStartVal.push_back(floatArray[var]);
/********* /registerParameters/apodizationParameters/winOpenStopVal ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/winOpenStopVal", floatArray);
QList<float> winOpenStopVal;
scenParams.hwRegister.apodizationParams.winOpenStopVal.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
winOpenStopVal.push_back(floatArray[var]);
scenParams.hwRegister.apodizationParams.winOpenStopVal.push_back(floatArray[var]);
/********* /registerParameters/apodizationParameters/winOpenStepVal ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/winOpenStepVal", floatArray);
QList<float> winOpenStepVal;
scenParams.hwRegister.apodizationParams.winOpenStepVal.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
winOpenStepVal.push_back(floatArray[var]);
scenParams.hwRegister.apodizationParams.winOpenStepVal.push_back(floatArray[var]);
/********* /registerParameters/apodizationParameters/minApertureSize ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/minApertureSize", floatArray);
QList<quint32> minApertureSize;
scenParams.hwRegister.apodizationParams.minApertureSize.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
minApertureSize.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.apodizationParams.minApertureSize.push_back(static_cast<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/rxActiveElementStep1 ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/rxActiveElementStep1", floatArray);
QList<float> rxActiveElementStep1;
scenParams.hwRegister.apodizationParams.rxActiveElementStep1.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
rxActiveElementStep1.push_back(floatArray[var]);
scenParams.hwRegister.apodizationParams.rxActiveElementStep1.push_back(floatArray[var]);
/********* /registerParameters/apodizationParameters/rxActiveElementStep2 ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/rxActiveElementStep2", floatArray);
QList<float> rxActiveElementStep2;
scenParams.hwRegister.apodizationParams.rxActiveElementStep2.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
rxActiveElementStep2.push_back(floatArray[var]);
scenParams.hwRegister.apodizationParams.rxActiveElementStep2.push_back(floatArray[var]);
/********* /registerParameters/apodizationParameters/rxActiveElementStepStartPoint ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/rxActiveElementStepStartPoint", floatArray);
QList<quint32> rxActiveElementStepStartPoint;
scenParams.hwRegister.apodizationParams.rxActiveElementStepStartPoint.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
rxActiveElementStepStartPoint.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.apodizationParams.rxActiveElementStepStartPoint.push_back(static_cast<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/rxActiveElementStepStopPoint ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/rxActiveElementStepStopPoint", floatArray);
QList<quint32> rxActiveElementStepStopPoint;
scenParams.hwRegister.apodizationParams.rxActiveElementStepStopPoint.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
rxActiveElementStepStopPoint.push_back(static_cast<quint32>(floatArray[var]));
scenParams.hwRegister.apodizationParams.rxActiveElementStepStopPoint.push_back(static_cast<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/rxActiveElementStepChangePoint ************/
datasetBranch <float_t>("/registerParameters/apodizationParameters/rxActiveElementStepChangePoint", floatArray);
QList<quint32> rxActiveElementStepChangePoint;
scenParams.hwRegister.apodizationParams.rxActiveElementStepChangePoint.clear();
for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
rxActiveElementStepChangePoint.push_back(static_cast<quint32>(floatArray[var]));
/*********** registerParameters/apodizationParameters ***************/
scenParams.hwRegister.apodizationParams.clear();
for (qint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++)
{
ApodizationParams_t apoParams;
apoParams.winOpenStepVal = winOpenStepVal.at(var);
apoParams.winOpenStopVal = winOpenStopVal.at(var);
apoParams.maxApertureSize = maxApertureSize.at(var);
apoParams.minApertureSize = minApertureSize.at(var);
apoParams.winOpenStartVal = winOpenStartVal.at(var);
apoParams.winOpenStopPoint = winOpenStopPoint.at(var);
apoParams.winOpenStartPoint = winOpenStartPoint.at(var);
apoParams.rxActiveElementStep1 = rxActiveElementStep1.at(var);
apoParams.rxActiveElementStep2 = rxActiveElementStep2.at(var);
apoParams.rxActiveElementStepStopPoint = rxActiveElementStepStopPoint.at(var);
apoParams.rxActiveElementStepStartPoint = rxActiveElementStepStartPoint.at(var);
apoParams.rxActiveElementStepChangePoint = rxActiveElementStepChangePoint.at(var);
scenParams.hwRegister.apodizationParams.push_back(apoParams);
}
scenParams.hwRegister.apodizationParams.rxActiveElementStepChangePoint.push_back(static_cast<quint32>(floatArray[var]));
/**************** /registerParameters/receiverConfigProperties/mla ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/mla", floatArray);
@ -869,51 +872,6 @@ void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams)
atgcObj.atgcCompensateLut = atgcCompensationLut.at(i);
prbDepParams.prbDepParams.atgcLut.push_back(atgcObj);
}
/*********** /registerParameters/ddcParameters/startLpfLut ****************/
datasetBranch <float_t>("/registerParameters/ddcParameters/startLpfLut", floatArray);
QList<QList<quint32>> startLpf;
for (quint32 i = 0; i < 4; i++)
{
QList<quint32> temp;
for (quint32 j = 0; j < 64; j++)
{
temp.push_back(static_cast<quint32>(floatArray[j + i * 64]));
}
startLpf.push_back(temp);
}
/*********** /registerParameters/ddcParameters/endLpfLut ****************/
datasetBranch <float_t>("/registerParameters/ddcParameters/endLpfLut", floatArray);
QList<QList<quint32>> endLpf;
for (quint32 i = 0; i < 4; i++)
{
QList<quint32> temp;
for (quint32 j = 0; j < 64; j++)
{
temp.push_back(static_cast<quint32>(floatArray[j + i * 64]));
}
endLpf.push_back(temp);
}
/******************* /registerParameters/ddcParameters/lpfLut **********************/
prbDepParams.prbDepParams.lpfLut.clear();
for (qint8 i = 0; i < 4; i++)
{
Lpf lpfObj;
lpfObj.startLpf = startLpf.at(i);
lpfObj.endLpf = endLpf.at(i);
prbDepParams.prbDepParams.lpfLut.push_back(lpfObj);
}
/************* /registerParameters/ddcParameters/lpfScale *****************/
datasetBranch <float_t>("/registerParameters/ddcParameters/lpfScale", floatArray);
prbDepParams.prbDepParams.lpfScaleCoeff.clear();
for (quint8 i = 0; i < 4; i++)
prbDepParams.prbDepParams.lpfScaleCoeff.push_back(static_cast<quint8>(floatArray[i]));
}

4
include/model/hardware/core/lowLevelApi/TrxBoard.h

@ -118,7 +118,7 @@ private:
struct ScenHwRegister
{
///////////// BeamFormer /////////////
QList<ApodizationParameters> apodizationParams;
QList<ApoParams> apodizationParams;
ProbeElementPosition* elementPosition;
RxBeamformerProperties* rxBeamformer;
PulseProperties* pulse;
@ -140,6 +140,8 @@ private:
QList<quint32> endFreqLut;
quint32 noiseReject;
quint32 frameLoggerControl;
QList<quint8> lpfScaleCoeff;
QList<Lpf> lpfLut;
ScenHwRegister();
~ScenHwRegister();
};

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

@ -9,7 +9,7 @@
#define BLENDWEIGHT_LUT_MAX 4
#define LINE_FILTER_LUT_MAX 3
#define START_FREQ_LUT_MAX 4U
#define FREQ_POINT_LUT_MAX 4U
#define FREQ_POINT_LUT_MAX 4
#define FREQ_STEP_LUT_MAX 4U
#define FREQUENCY_LUT_MAX 8
#define END_FREQ_LUT_MAX 4U

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

@ -55,8 +55,6 @@ struct ConnectedPrbInfo
struct ScenPrbDepHwRegister
{
QList<quint8> lpfScaleCoeff;
QList<Lpf> lpfLut;
QList<Atgc> atgcLut;
QList<QList<quint32>> apodizationLut;
};

4
include/model/hardware/core/lowLevelApi/register/beamFormer/BeamFormer.h

@ -1,7 +1,7 @@
#ifndef BEAMFORMER_H
#define BEAMFORMER_H
#include "registerDefinition/ApodizationParameters.h"
#include "registerDefinition/ApoParams.h"
#include "registerDefinition/ElementsActiveEnable.h"
#include "registerDefinition/RxActiveElementPoint.h"
#include "registerDefinition/RxActiveElementStep.h"
@ -42,7 +42,7 @@ public:
~BeamFormer();
void rxBeamformerProperties (quint8& rxBeamFormerTypeNumber, RxBeamformerProperties* rxBeamformer) const;
void apodizationParameters (QList<ApodizationParameters>& apoParams) const;
void apodizationParameters (QList<ApoParams>& apoParams) const;
void probeElementPosition (QList<QList<quint32>>& elementPosition) const;
void pulseProperties (quint8& pulseTypeNumber, PulseProperties* pulse) const;
void elementActiveEn(QList<quint32> &elements) const;

9
include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/ApodizationParameters.h → include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/ApoParams.h

@ -1,10 +1,11 @@
#ifndef APODIZATIONPARAMETERS_H
#define APODIZATIONPARAMETERS_H
#ifndef APOPARAMS_H
#define APOPARAMS_H
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
struct ApodizationParameters {
struct ApoParams
{
quint32 rxActiveElementStepStartPoint;
quint32 rxActiveElementStepStopPoint;
quint32 rxActiveElementStepChangePoint;
@ -20,4 +21,4 @@ struct ApodizationParameters {
float winOpenStopVal;
};
#endif // APODIZATIONPARAMETERS_H
#endif // APOPARAMS_H

4
include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/MaxApertureSize.h

@ -4,7 +4,7 @@
#include "model/scenarioGenerator/core/general/Calculation.h"
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#include "ApodizationParameters.h"
#include "ApoParams.h"
#undef BAR
@ -31,7 +31,7 @@ public:
Field* rxActiveElementStepChangePoint;
Field* maxApertureSize;
void setMaxApertureSize (ApodizationParameters* params)
void setMaxApertureSize (ApoParams* params)
{
_rxActiveElementStepChangePointQ = params->rxActiveElementStepChangePoint;
_maxApertureSizeQ = params->maxApertureSize;

4
include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/MinApertureSize.h

@ -4,7 +4,7 @@
#include "model/scenarioGenerator/core/general/Calculation.h"
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#include "ApodizationParameters.h"
#include "ApoParams.h"
#undef BAR
@ -31,7 +31,7 @@ public:
Field* winOpenStepVal;
Field* minApertureSize;
void setMinApertureSize (ApodizationParameters* params)
void setMinApertureSize (ApoParams* params)
{
QVector<float> temp;
temp.append(params->winOpenStepVal);

4
include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/RxActiveElementPoint.h

@ -4,7 +4,7 @@
#include "model/scenarioGenerator/core/general/Calculation.h"
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#include "ApodizationParameters.h"
#include "ApoParams.h"
#undef BAR
@ -31,7 +31,7 @@ public:
Field* rxActiveElementStepStartPoint;
Field* rxActiveElementStepStopPoint;
void setRxActiveElementPoint (ApodizationParameters* params)
void setRxActiveElementPoint (ApoParams* params)
{
_rxActiveElementStepStartPointQ = params->rxActiveElementStepStartPoint;
_rxActiveElementStepStopPointQ = params->rxActiveElementStepStopPoint;

4
include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/RxActiveElementStep.h

@ -4,7 +4,7 @@
#include "model/scenarioGenerator/core/general/Calculation.h"
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#include "ApodizationParameters.h"
#include "ApoParams.h"
#undef BAR
@ -31,7 +31,7 @@ public:
Field* rxActiveElementStep1;
Field* rxActiveElementStep2;
void setRxActiveElementStep (ApodizationParameters* params)
void setRxActiveElementStep (ApoParams* params)
{
QVector<float> temp;
temp.append(params->rxActiveElementStep1);

4
include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/WinOpenPoint.h

@ -4,7 +4,7 @@
#include "model/scenarioGenerator/core/general/Calculation.h"
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#include "ApodizationParameters.h"
#include "ApoParams.h"
#undef BAR
@ -31,7 +31,7 @@ public:
Field* winOpenStartPoint;
Field* winOpenStopPoint;
void setWinOpenPoint (ApodizationParameters* params)
void setWinOpenPoint (ApoParams* params)
{
_winOpenStartPointQ = params->winOpenStartPoint;
_winOpenStopPointQ = params->winOpenStopPoint;

4
include/model/hardware/core/lowLevelApi/register/beamFormer/registerDefinition/WinOpenVal.h

@ -4,7 +4,7 @@
#include "model/scenarioGenerator/core/general/Calculation.h"
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#include "ApodizationParameters.h"
#include "ApoParams.h"
#undef BAR
@ -31,7 +31,7 @@ public:
Field* winOpenStartVal;
Field* winOpenStopVal;
void setWinOpenVal (ApodizationParameters* params)
void setWinOpenVal (ApoParams* params)
{
QVector<float> temp;
temp.append(params->winOpenStartVal);

23
include/model/scenarioGenerator/core/scenario/type/misc/ApodizationParameters.h

@ -0,0 +1,23 @@
#ifndef APODIZATIONPARAMETERS_H
#define APODIZATIONPARAMETERS_H
#include <QObject>
struct ApodizationParameters_t
{
QList<quint32> rxActiveElementStepStartPoint;
QList<quint32> rxActiveElementStepStopPoint;
QList<quint32> rxActiveElementStepChangePoint;
QList<quint32> winOpenStartPoint;
QList<quint32> winOpenStopPoint;
QList<quint32> minApertureSize;
QList<quint32> maxApertureSize;
QVector<float> rxActiveElementStep1;
QVector<float> rxActiveElementStep2;
QVector<float> winOpenStartVal;
QVector<float> winOpenStepVal;
QVector<float> winOpenStopVal;
};
#endif // APODIZATIONPARAMETERS_H

23
include/model/scenarioGenerator/core/scenario/type/misc/ApodizationParams.h

@ -1,23 +0,0 @@
#ifndef APODIZATIONPARAMS_H
#define APODIZATIONPARAMS_H
#include <QObject>
struct ApodizationParams_t
{
quint32 rxActiveElementStepStartPoint;
quint32 rxActiveElementStepStopPoint;
quint32 rxActiveElementStepChangePoint;
quint32 winOpenStartPoint;
quint32 winOpenStopPoint;
quint32 minApertureSize;
quint32 maxApertureSize;
float rxActiveElementStep1;
float rxActiveElementStep2;
float winOpenStartVal;
float winOpenStepVal;
float winOpenStopVal;
};
#endif // APODIZATIONPARAMS_H

20
include/model/scenarioGenerator/core/scenario/type/misc/DdcParameters.h

@ -0,0 +1,20 @@
#ifndef DDCPARAMETERS_H
#define DDCPARAMETERS_H
#include <QObject>
struct DdcParameters_t
{
QList<quint32> startFreqLut;
QList<quint32> endFreqLut;
QList<quint32> startFreqPoint;
QList<quint32> endFreqPoint;
QVector<float> freqStepLut;
QVector<float> lpfWeightStepLut;
QVector<float> startLpfWeightLut;
QList<QList<quint32>> startLpf;
QList<QList<quint32>> endLpf;
QList<quint8> lpfScale;
};
#endif // DDCPARAMETERS_H

11
include/model/scenarioGenerator/core/scenario/type/misc/FrequencyPointLut.h

@ -1,11 +0,0 @@
#ifndef FREQUENCYPOINTLUT_H
#define FREQUENCYPOINTLUT_H
#include <QObject>
struct FrequencyPointLut_t {
quint32 startFreqPoint;
quint32 endFreqPoint;
};
#endif // FREQUENCYPOINTLUT_H

13
include/model/scenarioGenerator/dto/hardware/HwScenarioDependent.h

@ -5,8 +5,8 @@
#include "model/scenarioGenerator/core/scenario/type/misc/Pulse.h"
#include "model/scenarioGenerator/core/scenario/type/misc/RxBeamFormer.h"
#include "model/scenarioGenerator/core/scenario/type/misc/ReceiverConfig.h"
#include "model/scenarioGenerator/core/scenario/type/misc/FrequencyPointLut.h"
#include "model/scenarioGenerator/core/scenario/type/misc/ApodizationParams.h"
#include "model/scenarioGenerator/core/scenario/type/misc/DdcParameters.h"
#include "model/scenarioGenerator/core/scenario/type/misc/ApodizationParameters.h"
struct HwRegister_t {
QVector<float> dtgcLut;
@ -26,16 +26,11 @@ struct HwRegister_t {
QList<QVector<quint32>> lpfLut;
QList<QVector<quint32>> atgcLut;
QList<QVector<quint32>> apodizationLut;
QList<ApodizationParams_t> apodizationParams;
QList<quint32> mlaOffsetAddr;
quint32 noiseRejectValue;
quint32 frameLoggerControl;
QList<quint32> startFreqLut;
QList<quint32> endFreqLut;
QList<FrequencyPointLut_t> freqPointLut;
QVector<float> freqStepLut;
QVector<float> lpfWeightStepLut;
QVector<float> startLpfWeightLut;
DdcParameters_t ddcParams;
ApodizationParameters_t apodizationParams;
};

111
src/model/hardware/core/lowLevelApi/TrxBoard.cpp

@ -360,8 +360,8 @@ TrxBoard::ScenHwRegister::ScenHwRegister()
elementPosition = new ProbeElementPosition;
rxBeamformer = new RxBeamformerProperties;
configLut = new ReceiverConfiguration;
pulse = new PulseProperties;
freqPoint = new FreqPoint;
pulse = new PulseProperties;
}
TrxBoard::ScenGenHardwareParam::ScenGenHardwareParam()
@ -592,22 +592,8 @@ void TrxBoard::setProbeDependParams(ScenPrbDepHardwareParam& prbDepParams)
{
throw SonoException("Atgc lut is out of range");
}
this->_dsp->atgcLut(prbDepParams.prbDepParams.atgcLut);
if(prbDepParams.prbDepParams.lpfLut.size() != LPF_LUT_MAX)
{
throw SonoException("Lpf lut is out of range");
}
this->_dsp->lpfLut(prbDepParams.prbDepParams.lpfLut);
if(prbDepParams.prbDepParams.lpfScaleCoeff.size() != LPF_SCALE_MAX)
{
throw SonoException("Lpf scale coefficient is out of range");
}
this->_dsp->lpfScaleCoefficient(prbDepParams.prbDepParams.lpfScaleCoeff);
/////////////////////////// AFE setting ///////////////////////////
setAfeConfig(prbDepParams.afeCfg);
setAfePwr(afePwrdnEnable);
@ -714,71 +700,100 @@ void TrxBoard::setScenario(ScenGenHardwareOutput_t& scenGenHw)
_scenParams->hwRegister->receiverConfigTypeNumber =
scenGenHw.hwRegister.receiverConfigTypeNumber;
if(scenGenHw.hwRegister.startFreqLut.size() != START_FREQ_LUT_MAX)
if(scenGenHw.hwRegister.ddcParams.startLpf.size() != LPF_LUT_MAX)
{
throw SonoException("Start lpf lut is out of range");
}
if(scenGenHw.hwRegister.ddcParams.endLpf.size() != LPF_LUT_MAX)
{
throw SonoException("End lpf lut is out of range");
}
_scenParams->hwRegister->lpfLut.clear();
for (qint8 i = 0; i < LPF_LUT_MAX; i++)
{
Lpf lpfObj;
lpfObj.startLpf = scenGenHw.hwRegister.ddcParams.startLpf.at(i);
lpfObj.endLpf = scenGenHw.hwRegister.ddcParams.endLpf.at(i);
_scenParams->hwRegister->lpfLut.push_back(lpfObj);
}
if(scenGenHw.hwRegister.ddcParams.lpfScale.size() != LPF_SCALE_MAX)
{
throw SonoException("Lpf scale coefficient is out of range");
}
_scenParams->hwRegister->lpfScaleCoeff = scenGenHw.hwRegister.ddcParams.lpfScale;
if(scenGenHw.hwRegister.ddcParams.startFreqLut.size() != START_FREQ_LUT_MAX)
{
throw SonoException("Start freq lut is out of range");
}
_scenParams->hwRegister->startFreqLut = scenGenHw.hwRegister.startFreqLut;
_scenParams->hwRegister->startFreqLut = scenGenHw.hwRegister.ddcParams.startFreqLut;
if(scenGenHw.hwRegister.endFreqLut.size() != END_FREQ_LUT_MAX)
if(scenGenHw.hwRegister.ddcParams.endFreqLut.size() != END_FREQ_LUT_MAX)
{
throw SonoException("End freq lut is out of range");
}
_scenParams->hwRegister->endFreqLut = scenGenHw.hwRegister.endFreqLut;
_scenParams->hwRegister->endFreqLut = scenGenHw.hwRegister.ddcParams.endFreqLut;
if(scenGenHw.hwRegister.freqPointLut.size() != FREQ_POINT_LUT_MAX)
if(scenGenHw.hwRegister.ddcParams.startFreqPoint.size() != FREQ_POINT_LUT_MAX)
{
throw SonoException("Start freq point lut is out of range");
}
if(scenGenHw.hwRegister.ddcParams.endFreqPoint.size() != FREQ_POINT_LUT_MAX)
{
throw SonoException("Freq point lut is out of range");
throw SonoException("End freq point lut is out of range");
}
_scenParams->hwRegister->freqPoint->clear();
foreach(auto i, scenGenHw.hwRegister.freqPointLut)
for (qint8 i = 0; i < FREQ_POINT_LUT_MAX; i++)
{
_scenParams->hwRegister->freqPoint->startFreqPoint.append(i.startFreqPoint);
_scenParams->hwRegister->freqPoint->endFreqPoint.append(i.endFreqPoint);
_scenParams->hwRegister->freqPoint->startFreqPoint = scenGenHw.hwRegister.ddcParams.startFreqPoint;
_scenParams->hwRegister->freqPoint->endFreqPoint = scenGenHw.hwRegister.ddcParams.endFreqPoint;
}
if(scenGenHw.hwRegister.freqStepLut.size() != FREQ_STEP_LUT_MAX)
if(scenGenHw.hwRegister.ddcParams.freqStepLut.size() != FREQ_STEP_LUT_MAX)
{
throw SonoException("Freq step lut is out of range");
}
_scenParams->hwRegister->freqStepLut = scenGenHw.hwRegister.freqStepLut;
_scenParams->hwRegister->freqStepLut = scenGenHw.hwRegister.ddcParams.freqStepLut;
if(scenGenHw.hwRegister.lpfWeightStepLut.size() != LPF_WEIGHT_STEP_LUT_MAX)
if(scenGenHw.hwRegister.ddcParams.lpfWeightStepLut.size() != LPF_WEIGHT_STEP_LUT_MAX)
{
throw SonoException("Lpf weight step lut is out of range");
}
_scenParams->hwRegister->lpfWeightStepLut = scenGenHw.hwRegister.lpfWeightStepLut;
_scenParams->hwRegister->lpfWeightStepLut = scenGenHw.hwRegister.ddcParams.lpfWeightStepLut;
if(scenGenHw.hwRegister.startLpfWeightLut.size() != START_LPF_WEIGHT_LUT_MAX)
if(scenGenHw.hwRegister.ddcParams.startLpfWeightLut.size() != START_LPF_WEIGHT_LUT_MAX)
{
throw SonoException("Lpf weight step lut is out of range");
}
_scenParams->hwRegister->startLpfWeightLut = scenGenHw.hwRegister.startLpfWeightLut;
_scenParams->hwRegister->startLpfWeightLut = scenGenHw.hwRegister.ddcParams.startLpfWeightLut;
if(scenGenHw.hwRegister.apodizationParams.size() > RXBEAMFORMER_LUT_MAX)
if(scenGenHw.hwRegister.apodizationParams.winOpenStartPoint.size() > RXBEAMFORMER_LUT_MAX)
{
throw SonoException("Apodization parameters is out of range");
}
_scenParams->hwRegister->apodizationParams.clear();
foreach(auto temp, scenGenHw.hwRegister.apodizationParams)
for (qint32 j = 0; j < scenGenHw.hwRegister.apodizationParams.winOpenStartPoint.size(); j++)
{
ApodizationParameters params;
params.winOpenStepVal = temp.winOpenStepVal;
params.winOpenStopVal = temp.winOpenStopVal;
params.maxApertureSize = temp.maxApertureSize;
params.minApertureSize = temp.minApertureSize;
params.winOpenStartVal = temp.winOpenStartVal;
params.winOpenStopPoint = temp.winOpenStopPoint;
params.winOpenStartPoint = temp.winOpenStartPoint;
params.rxActiveElementStep1 = temp.rxActiveElementStep1;
params.rxActiveElementStep2 = temp.rxActiveElementStep2;
params.rxActiveElementStepStopPoint = temp.rxActiveElementStepStopPoint;
params.rxActiveElementStepStartPoint = temp.rxActiveElementStepStartPoint;
params.rxActiveElementStepChangePoint = temp.rxActiveElementStepChangePoint;
ApoParams params;
params.winOpenStepVal = scenGenHw.hwRegister.apodizationParams.winOpenStepVal.at(j);
params.winOpenStopVal = scenGenHw.hwRegister.apodizationParams.winOpenStopVal.at(j);
params.maxApertureSize = scenGenHw.hwRegister.apodizationParams.maxApertureSize.at(j);
params.minApertureSize = scenGenHw.hwRegister.apodizationParams.minApertureSize.at(j);
params.winOpenStartVal = scenGenHw.hwRegister.apodizationParams.winOpenStartVal.at(j);
params.winOpenStopPoint = scenGenHw.hwRegister.apodizationParams.winOpenStopPoint.at(j);
params.winOpenStartPoint = scenGenHw.hwRegister.apodizationParams.winOpenStartPoint.at(j);
params.rxActiveElementStep1 = scenGenHw.hwRegister.apodizationParams.rxActiveElementStep1.at(j);
params.rxActiveElementStep2 = scenGenHw.hwRegister.apodizationParams.rxActiveElementStep2.at(j);
params.rxActiveElementStepStopPoint = scenGenHw.hwRegister.apodizationParams.rxActiveElementStepStopPoint.at(j);
params.rxActiveElementStepStartPoint = scenGenHw.hwRegister.apodizationParams.rxActiveElementStepStartPoint.at(j);
params.rxActiveElementStepChangePoint = scenGenHw.hwRegister.apodizationParams.rxActiveElementStepChangePoint.at(j);
_scenParams->hwRegister->apodizationParams.append(params);
_scenParams->hwRegister->apodizationParams.push_back(params);
}
_scenParams->hwRegister->pulse->clear();
@ -1020,6 +1035,10 @@ void TrxBoard::setScenario (ScenGenHardwareParam* _scenParams)
this->_dsp->frameLoggerCtrl(_scenParams->hwRegister->frameLoggerControl);
this->_dsp->lpfLut(_scenParams->hwRegister->lpfLut);
this->_dsp->lpfScaleCoefficient(_scenParams->hwRegister->lpfScaleCoeff);
///////////////////////////////// Sram setting ///////////////////////////////
this->_sram->setSramIndex(_scenParams->totalTxShotNumber, _scenParams->indexParams);

2
src/model/hardware/core/lowLevelApi/register/beamFormer/BeamFormer.cpp

@ -55,7 +55,7 @@ void BeamFormer::rxBeamformerProperties(quint8& rxBeamFormerTypeNumber, RxBeamfo
this->_rxBeamformer->updateArray(true, rxBeamFormerTypeNumber);
}
void BeamFormer::apodizationParameters(QList<ApodizationParameters> &apoParams) const
void BeamFormer::apodizationParameters(QList<ApoParams> &apoParams) const
{
quint32 rxActiveElementPointBaseOffset = this->_rxActiveElementPoint->getCurrentOffset();
quint32 rxActiveElementStepBaseOffset = this->_rxActiveElementStep->getCurrentOffset();

Loading…
Cancel
Save