Browse Source

temp commit

develop
Arash Aletayeb 3 years ago
parent
commit
ceefa3fae9
  1. 2
      developHw.pro.user
  2. 109
      hdf5Scenario/hdf5Scenario.cpp
  3. 2
      include/model/hardware/core/lowLevelApi/TrxBoard.h
  4. 2
      include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h
  5. 8
      include/model/hardware/core/lowLevelApi/register/dsp/Dsp.h
  6. 28
      include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/AtgcLut.h
  7. 44
      include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/MlaOffset.h
  8. 31
      include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/NoiseRejectValue.h
  9. 56
      include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/ReceiverConfigurationLut.h
  10. 2
      include/model/hardware/core/lowLevelApi/register/misc/registerDefinition/FrameLostCount.h
  11. 55
      include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/Index.h
  12. 10
      include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/SramStructures.h
  13. 7
      include/model/scenarioGenerator/core/scenario/type/misc/ReceiverConfig.h
  14. 2
      include/model/scenarioGenerator/dto/hardware/HwScenarioDependent.h
  15. 8
      include/model/scenarioGenerator/dto/hardware/SramIndex.h
  16. 24
      src/model/hardware/core/lowLevelApi/TrxBoard.cpp
  17. 22
      src/model/hardware/core/lowLevelApi/register/dsp/Dsp.cpp
  18. 2
      src/model/scenarioGenerator/core/scenario/B/BModeScenario.cpp
  19. 2
      src/model/scenarioGenerator/core/scenario/Bm/BmModeScenario.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-02-07T15:58:24. -->
<!-- Written by QtCreator 4.10.0, 2022-02-09T13:00:24. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

109
hdf5Scenario/hdf5Scenario.cpp

@ -67,23 +67,35 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
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();
/**************** /sramParameters/indexParameters/startOfSubBatch ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/startOfSubBatch", floatArray);
scenParams.indexParams.startOfSubBatch.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.lastLineInFrame.push_back(static_cast<bool>(floatArray[var]));
scenParams.indexParams.startOfSubBatch.push_back(static_cast<bool>(floatArray[var]));
/**************** /sramParameters/indexParameters/dLineNum ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/dLineNum", floatArray);
scenParams.indexParams.dLineNum.clear();
/**************** /sramParameters/indexParameters/endOfSubBatch ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/endOfSubBatch", floatArray);
scenParams.indexParams.endOfSubBatch.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.dLineNum.push_back(static_cast<quint32>(floatArray[var]));
scenParams.indexParams.endOfSubBatch.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/dEnsembleNum ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/dEnsembleNum", floatArray);
scenParams.indexParams.dEnsembleNum.clear();
/**************** /sramParameters/indexParameters/endOfSubFrame ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/endOfSubFrame", floatArray);
scenParams.indexParams.endOfSubFrame.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.dEnsembleNum.push_back(static_cast<quint32>(floatArray[var]));
scenParams.indexParams.endOfSubFrame.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/endOfEnsemble ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/endOfEnsemble", floatArray);
scenParams.indexParams.endOfEnsemble.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.endOfEnsemble.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/isLastSubBatch ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/isLastSubBatch", floatArray);
scenParams.indexParams.isLastSubBatch.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.isLastSubBatch.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/txParameters/txFocusXPos ********************/
datasetBranch <float_t>("/sramParameters/txParameters/txFocusXPos", floatArray);
@ -544,22 +556,22 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
focusNo.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/lineFilterEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/lineFilterEn", floatArray);
QList<quint32> lineFilterEn;
/**************** /registerParameters/receiverConfigProperties/iqDataCrossEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/iqDataCrossEn", floatArray);
QList<quint32> iqDataCrossEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
lineFilterEn.push_back(static_cast<quint32>(floatArray[j]));
iqDataCrossEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/dpeEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/dpeEn", floatArray);
QList<quint32> dpeEn;
/**************** /registerParameters/receiverConfigProperties/logEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/logEn", floatArray);
QList<quint32> logEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
dpeEn.push_back(static_cast<quint32>(floatArray[j]));
logEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/ddcEn ********************/
@ -571,13 +583,22 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
ddcEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/wmfEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/wmfEn", floatArray);
QList<quint32> wmfEn;
/**************** /registerParameters/receiverConfigProperties/frameType ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/frameType", floatArray);
QList<quint32> frameType;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
frameType.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/noiseRejectEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/noiseRejectEn", floatArray);
QList<quint32> noiseRejectEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
wmfEn.push_back(static_cast<quint32>(floatArray[j]));
noiseRejectEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties ********************/
@ -586,24 +607,46 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
for (qint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
receiverCfgObj.mla = receiverCfgMla.at(j);
receiverCfgObj.stb = stb.at(j);
receiverCfgObj.ddcEn = ddcEn.at(j);
receiverCfgObj.absEn = absEn.at(j);
receiverCfgObj.dpeEn = dpeEn.at(j);
receiverCfgObj.logEn = logEn.at(j);
receiverCfgObj.stbEn = stbEn.at(j);
receiverCfgObj.wmfEn = wmfEn.at(j);
receiverCfgObj.lpfSel = lpfSel.at(j);
receiverCfgObj.aTgcSel = aTgcSel.at(j);
receiverCfgObj.focusNo = focusNo.at(j);
receiverCfgObj.lineMode = lineMode.at(j);
receiverCfgObj.mla = receiverCfgMla.at(j);
receiverCfgObj.frameType = frameType.at(j);
receiverCfgObj.dcCancelEn = dcCancelEn.at(j);
receiverCfgObj.ncoFreqSel = ncoFreqSel.at(j);
receiverCfgObj.lineFilterEn = lineFilterEn.at(j);
receiverCfgObj.iqDataCrossEn = iqDataCrossEn.at(j);
receiverCfgObj.noiseRejectEn = noiseRejectEn.at(j);
receiverCfgObj.subtractFilterEn = subtractFilterEn.at(j);
scenParams.hwRegister.receiverConfigProps.push_back(receiverCfgObj);
}
scenParams.hwRegister.mlaOffsetAddr.clear();
/**************** /registerParameters/sramFrameParameters/bOffset *****************/
datasetBranch <float_t>("/registerParameters/sramFrameParameters/bOffset", floatArray);
scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast<quint32>(floatArray[0]));
/**************** /registerParameters/sramFrameParameters/dOffset *****************/
datasetBranch <float_t>("/registerParameters/sramFrameParameters/dOffset", floatArray);
scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast<quint32>(floatArray[0]));
/**************** /registerParameters/sramFrameParameters/bLastOffset *****************/
datasetBranch <float_t>("/registerParameters/sramFrameParameters/bLastOffset", floatArray);
scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast<quint32>(floatArray[0]));
/**************** /registerParameters/sramFrameParameters/dLastOffset *****************/
datasetBranch <float_t>("/registerParameters/sramFrameParameters/dLastOffset", floatArray);
scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast<quint32>(floatArray[0]));
/**************** /registerParameters/noiseRejectValue *****************/
datasetBranch <float_t>("/registerParameters/noiseRejectValue", floatArray);
scenParams.hwRegister.noiseRejectValue = static_cast<quint32>(floatArray[0]);
}
@ -624,6 +667,16 @@ void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams)
prbDepParams.prbDepParams.apodizationLut.push_back(tempApodization);
}
// /**************** /registerParameters/aTgcLut ********************/
// datasetBranch <float_t>("/registerParameters/aTgcLut", floatArray);
// QList <quint32> atgc;
// for (quint32 j = 0; j < 128; j++)
// {
// atgc.push_back(static_cast<quint32>(floatArray[j + i * 128]));
// }
/**************** /registerParameters/aTgcLut ********************/
datasetBranch <float_t>("/registerParameters/aTgcLut", floatArray);
prbDepParams.prbDepParams.atgcLut.clear();

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

@ -123,6 +123,8 @@ private:
ReceiverConfiguration* configLut;
QVector<QVector<float> > blendWeight;
quint8 receiverConfigTypeNumber;
QList<quint32> mlaOffsetAddr;
quint32 noiseReject;
ScenHwRegister();
~ScenHwRegister();
};

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

@ -57,7 +57,7 @@ struct ScenPrbDepHwRegister
{
QList<quint8> lpfScaleCoeff;
QList<QList<quint32>> lpfLut;
QList<QList<quint32>> atgcLut;
QList<Atgc*> atgcLut;
QList<QList<quint32>> apodizationLut;
};

8
include/model/hardware/core/lowLevelApi/register/dsp/Dsp.h

@ -3,10 +3,12 @@
#include "registerDefinition/ReceiverConfigurationLut.h"
#include "registerDefinition/LineFilterCoefficient.h"
#include "registerDefinition/NoiseRejectValue.h"
#include "registerDefinition/StbCoefficient.h"
#include "registerDefinition/FrequencyLut.h"
#include "registerDefinition/BlendWeight.h"
#include "registerDefinition/ManualAtgc.h"
#include "registerDefinition/MlaOffset.h"
#include "registerDefinition/DtgcLut.h"
#include "registerDefinition/AtgcLut.h"
#include "registerDefinition/BfScale.h"
@ -27,10 +29,12 @@ class Dsp
private:
ReceiverConfigurationLut* _configLut;
LineFilterCoefficient* _lineFilterLut;
NoiseRejectValue* _noiseReject;
StbCoefficient* _stbLut;
FrequencyLut* _freqLut;
BlendWeight* _blendWeight;
ManualAtgc* _manualAtgc;
MlaOffset* _mlaOffset;
DtgcLut* _dtgcLut;
AtgcLut* _atgcLut;
BfScale* _bfScale;
@ -44,11 +48,13 @@ public:
void lineFilterCoefficient (QList<quint32>& lineFilterLut) const;
void lpfScaleCoefficient (QList<quint8>& lpfScaleCoeff) const;
void stbCoefficient (QList<quint32>& stbLut) const;
void mlaOffsetAddr(QList<quint32>& mlaLut) const;
void frequencyLut (QList<quint32>& freqLut) const;
void blendWeight (QList<QList<quint32>>& blendWeight) const;
void noiseReject(quint32& rejectValue) const;
void atgcMode (eAtgcMode mode, quint16 value) const;
void dtgcLut (QList<quint32>& dtgcLut) const;
void atgcLut (QList<QList<quint32>>& atgcLut) const;
void atgcLut (QList<Atgc*> atgcLut) const;
void lpfLut (QList<QList<quint32>>& lpfLut) const;
};

28
include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/AtgcLut.h

@ -3,39 +3,59 @@
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#include "model/scenarioGenerator/core/general/Calculation.h"
#undef BAR
#define ATGC_LUT_MASK 0x00000FFF
#define ATGC_COMPENSATE_LUT_MASK 0xFFFF0FFF
#define BAR 0
#define OFFSET 0x85000
#define LENGTH 128U
struct Atgc
{
QList<quint32> atgcLut;
QVector<float> atgcCompensateLut;
void clear()
{
atgcLut.clear();
atgcCompensateLut.clear();
}
};
class AtgcLut : public Register
{
private:
QList<quint32> _atgcLut;
Atgc* _atgc;
QVector<quint32> _atgcCompensateLutQ;
void prepareData(quint32 index) override
{
atgcLut->setValue(_atgcLut[static_cast<qint32>(index)]);
atgcLut->setValue(_atgc->atgcLut[static_cast<qint32>(index)]);
atgcCompensateLut->setValue(_atgcCompensateLutQ[static_cast<qint32>(index)]);
}
public:
Field* atgcLut;
Field* atgcCompensateLut;
void setAtgcLut (QList<quint32>& atgcLut) {
_atgcLut = atgcLut;
void setAtgcLut (Atgc* atgc)
{
_atgc = atgc;
_atgcCompensateLutQ = Calculation::qntzr(_atgc->atgcCompensateLut, 0, 16, 8, 0, true, false);
}
AtgcLut(SonoDevice* device) : Register(BAR, OFFSET, device, LENGTH)
{
ADD_UNSIGNED_FIELD(atgcLut, ATGC_LUT_MASK);
ADD_UNSIGNED_FIELD(atgcCompensateLut, ATGC_COMPENSATE_LUT_MASK);
}
};
#undef ATGC_LUT_MASK
#undef ATGC_COMPENSATE_LUT_MASK
#undef BAR
#undef OFFSET

44
include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/MlaOffset.h

@ -0,0 +1,44 @@
#ifndef MLAOFFSET_H
#define MLAOFFSET_H
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#undef BAR
#define OFFSET_ADDR_MASK 0x001FFFFF
#define BAR 0
#define OFFSET 0X86020
#define LENGTH 4U
class MlaOffset : public Register
{
private:
QList<quint32> _mlaLut;
void prepareData(quint32 index) override
{
mlaOffsetLut->setValue(_mlaLut[static_cast<qint32>(index)]);
}
public:
Field* mlaOffsetLut;
void setMlaOffsetLut (QList<quint32>& mlaLut) {
_mlaLut = mlaLut;
}
MlaOffset(SonoDevice* device) : Register(BAR, OFFSET, device, LENGTH)
{
ADD_UNSIGNED_FIELD(mlaOffsetLut, OFFSET_ADDR_MASK);
}
};
#undef OFFSET_ADDR_MASK
#undef BAR
#undef OFFSET
#undef LENGTH
#endif // MLAOFFSET_H

31
include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/NoiseRejectValue.h

@ -0,0 +1,31 @@
#ifndef NOISEREJECTVALUE_H
#define NOISEREJECTVALUE_H
#include "model/hardware/core/lowLevelApi/register/Register.h"
#include "model/hardware/core/lowLevelApi/register/RegUtils.h"
#undef BAR
#define REJECT_VALUE_MASK 0x00FFFFFF
#define BAR 0
#define OFFSET 0x86030
class NoiseRejectValue : public Register
{
public:
Field* rejectValue;
NoiseRejectValue(SonoDevice* device) : Register(BAR, OFFSET, device)
{
ADD_UNSIGNED_FIELD(rejectValue, REJECT_VALUE_MASK);
}
};
#undef REJECT_VALUE_MASK
#undef BAR
#undef OFFSET
#undef LENGTH
#endif // NOISEREJECTVALUE_H

56
include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/ReceiverConfigurationLut.h

@ -17,10 +17,11 @@
#define LPF_SEL_PRP_MASK 0x00060000
#define ABS_EN_PRP_MASK 0x00080000
#define FOCUS_NO_PRP_MASK 0x00300000
#define LINE_FILTER_EN_PRP_MASK 0x00400000
#define NOISE_REJECTION_EN_PRP_MASK 0x00400000
#define DDC_EN_PRP_MASK 0x00800000
#define WMF_EN_PRP_MASK 0x01000000
#define DPE_EN_PRP_MASK 0x02000000
#define FRAME_TYPE_PRP_MASK 0x0F000000
#define IQ_DATA_CROSS_EN_PRP_MASK 0x10000000
#define LOG_EN_PRP_MASK 0x20000000
#define BAR 0U
#define OFFSET 0X80000
@ -39,10 +40,11 @@ struct ReceiverConfiguration
QList<quint32> lpfSel;
QList<quint32> absEn;
QList<quint32> focusNo;
QList<quint32> lineFilterEn;
QList<quint32> noiseRejectionEn;
QList<quint32> ddcEn;
QList<quint32> wmfEn;
QList<quint32> dpeEn;
QList<quint32> frameType;
QList<quint32> iqDataCrossEn;
QList<quint32> logEn;
void clear()
{
mla.clear();
@ -56,10 +58,11 @@ struct ReceiverConfiguration
lpfSel.clear();
absEn.clear();
focusNo.clear();
lineFilterEn.clear();
noiseRejectionEn.clear();
ddcEn.clear();
wmfEn.clear();
dpeEn.clear();
frameType.clear();
iqDataCrossEn.clear();
logEn.clear();
}
};
@ -98,17 +101,19 @@ private:
focusNoPrp->setValue(_configLut->focusNo.at(static_cast<qint32>(index)) - 1);
//value = _configLut->lineFilterEn.at(static_cast<qint32>(index)) ? 1 : 0;
lineFilterEnPrp->setValue(_configLut->lineFilterEn.at(static_cast<qint32>(index)));
//value = _configLut->noiseRejectionEn.at(static_cast<qint32>(index)) ? 1 : 0;
noiseRejectionEnPrp->setValue(_configLut->noiseRejectionEn.at(static_cast<qint32>(index)));
//value = _configLut->ddcEn.at(static_cast<qint32>(index)) ? 1 : 0;
ddcEnPrp->setValue(_configLut->ddcEn.at(static_cast<qint32>(index)));
//value = _configLut->wmfEn.at(static_cast<qint32>(index)) ? 1 : 0;
wmfEnPrp->setValue(_configLut->wmfEn.at(static_cast<qint32>(index)));
frameTypePrp->setValue(_configLut->frameType.at(static_cast<qint32>(index)));
//value = _configLut->dpeEn.at(static_cast<qint32>(index)) ? 1 : 0;
dpeEnPrp->setValue(_configLut->dpeEn.at(static_cast<qint32>(index)));
//value = _configLut->iqDataCrc.at(static_cast<qint32>(index)) ? 1 : 0;
iqDataCrossEncPrp->setValue(_configLut->iqDataCrossEn.at(static_cast<qint32>(index)));
//value = _configLut->logEn.at(static_cast<qint32>(index)) ? 1 : 0;
logEnPrp->setValue(_configLut->logEn.at(static_cast<qint32>(index)));
}
public:
@ -123,10 +128,11 @@ public:
Field* lpfSelPrp;
Field* absEnPrp;
Field* focusNoPrp;
Field* lineFilterEnPrp;
Field* noiseRejectionEnPrp;
Field* ddcEnPrp;
Field* wmfEnPrp;
Field* dpeEnPrp;
Field* frameTypePrp;
Field* iqDataCrossEncPrp;
Field* logEnPrp;
void setReceiverConfigurationLut (ReceiverConfiguration* configLut)
{
@ -146,10 +152,11 @@ public:
ADD_UNSIGNED_FIELD(lpfSelPrp, LPF_SEL_PRP_MASK);
ADD_UNSIGNED_FIELD(absEnPrp, ABS_EN_PRP_MASK);
ADD_UNSIGNED_FIELD(focusNoPrp, FOCUS_NO_PRP_MASK);
ADD_UNSIGNED_FIELD(lineFilterEnPrp, LINE_FILTER_EN_PRP_MASK);
ADD_UNSIGNED_FIELD(noiseRejectionEnPrp, NOISE_REJECTION_EN_PRP_MASK);
ADD_UNSIGNED_FIELD(ddcEnPrp, DDC_EN_PRP_MASK);
ADD_UNSIGNED_FIELD(wmfEnPrp, WMF_EN_PRP_MASK);
ADD_UNSIGNED_FIELD(dpeEnPrp, DPE_EN_PRP_MASK);
ADD_UNSIGNED_FIELD(frameTypePrp, FRAME_TYPE_PRP_MASK);
ADD_UNSIGNED_FIELD(iqDataCrossEncPrp, IQ_DATA_CROSS_EN_PRP_MASK);
ADD_UNSIGNED_FIELD(logEnPrp, LOG_EN_PRP_MASK);
}
};
@ -164,10 +171,11 @@ public:
#undef LPF_SEL_PRP_MASK
#undef ABS_EN_PRP_MASK
#undef FOCUS_NO_PRP_MASK
#undef LINE_FILTER_EN_PRP_MASK
#undef NOISE_REJECTION_EN_PRP_MASK
#undef DDC_EN_PRP_MASK
#undef WMF_EN_PRP_MASK
#undef DPE_EN_PRP_MASK
#undef FRAME_TYPE_PRP_MASK
#undef IQ_DATA_CROSS_EN_PRP_MASK
#undef LOG_EN_PRP_MASK
#undef BAR
#undef OFFSET

2
include/model/hardware/core/lowLevelApi/register/misc/registerDefinition/FrameLostCount.h

@ -9,7 +9,7 @@
#define LOST_COUNT 0x000000FF
#define BAR 0U
#define OFFSET 0x86028
#define OFFSET 0x8603C
class FrameLostCount : public Register
{

55
include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/Index.h

@ -11,10 +11,11 @@
#define RECEIVER_CONFIGURATION_INDEX_MASK 0x0000000000E00000
#define PULSE_PROPERTIES_INDEX_MASK 0x0000000007000000
#define FIRST_LINE_IN_FRAME_MASK 0x0000000008000000
#define LAST_LINE_IN_FRAME_MASK 0x0000000010000000
#define D_LINE_NUM_MASK 0x0000001FE0000000
#define D_ENSEMBLE_NUM_MASK 0x000003E000000000
#define FRAME_TYPE_MASK 0xFF00000000000000
#define START_OF_SUB_BATCH_MASK 0x0000000010000000
#define END_OF_SUB_BATCH_MASK 0x0000000020000000
#define END_OF_SUB_FRAME_MASK 0x0000000040000000
#define END_OF_ENSEMBLE_MASK 0x0000000080000000
#define IS_LAST_SUB_BATCH_MASK 0x0000000100000000
#define BAR 1U
#define OFFSET 0x0
@ -41,17 +42,20 @@ private:
value = _index->firstLineInFrame[static_cast<qint32>(index)] ? 1 : 0;
firstLineInFrame->setValueLong(value);
value = _index->lastLineInFrame[static_cast<qint32>(index)] ? 1 : 0;
lastLineInFrame->setValueLong(value);
value = _index->startOfSubBatch[static_cast<qint32>(index)] ? 1 : 0;
startOfSubBatch->setValueLong(value);
dLineNum->setValueLong(_index->dLineNum[static_cast<qint32>(index)]);
value = _index->endOfSubBatch[static_cast<qint32>(index)] ? 1 : 0;
endOfSubBatch->setValueLong(value);
dEnsembleNum->setValueLong(_index->dEnsembleNum[static_cast<qint32>(index)]);
value = _index->endOfSubFrame[static_cast<qint32>(index)] ? 1 : 0;
endOfSubFrame->setValueLong(value);
if (index==0)
frameType->setValueLong(_index->frameType);
else
frameType->setValueLong(0);
value = _index->endOfEnsemble[static_cast<qint32>(index)] ? 1 : 0;
endOfEnsemble->setValueLong(value);
value = _index->isLastSubBatch[static_cast<qint32>(index)] ? 1 : 0;
isLastSubBatch->setValueLong(value);
}
public:
@ -59,10 +63,11 @@ public:
Field* receiverConfigurationIndex;
Field* pulsePropertiesIndex;
Field* firstLineInFrame;
Field* lastLineInFrame;
Field* dLineNum;
Field* dEnsembleNum;
Field* frameType;
Field* startOfSubBatch;
Field* endOfSubBatch;
Field* endOfSubFrame;
Field* endOfEnsemble;
Field* isLastSubBatch;
void setIndex (SramIndex* index)
{
@ -75,10 +80,11 @@ public:
ADD_UNSIGNED_FIELD_LONG(receiverConfigurationIndex, RECEIVER_CONFIGURATION_INDEX_MASK);
ADD_UNSIGNED_FIELD_LONG(pulsePropertiesIndex, PULSE_PROPERTIES_INDEX_MASK );
ADD_UNSIGNED_FIELD_LONG(firstLineInFrame, FIRST_LINE_IN_FRAME_MASK );
ADD_UNSIGNED_FIELD_LONG(lastLineInFrame, LAST_LINE_IN_FRAME_MASK );
ADD_UNSIGNED_FIELD_LONG(dLineNum, D_LINE_NUM_MASK );
ADD_UNSIGNED_FIELD_LONG(dEnsembleNum, D_ENSEMBLE_NUM_MASK );
ADD_UNSIGNED_FIELD_LONG(frameType, FRAME_TYPE_MASK );
ADD_UNSIGNED_FIELD_LONG(startOfSubBatch, START_OF_SUB_BATCH_MASK );
ADD_UNSIGNED_FIELD_LONG(endOfSubBatch, END_OF_SUB_BATCH_MASK );
ADD_UNSIGNED_FIELD_LONG(endOfSubFrame, END_OF_SUB_FRAME_MASK );
ADD_UNSIGNED_FIELD_LONG(endOfEnsemble, END_OF_ENSEMBLE_MASK );
ADD_UNSIGNED_FIELD_LONG(isLastSubBatch, IS_LAST_SUB_BATCH_MASK );
}
};
@ -86,10 +92,11 @@ public:
#undef PULSE_PROPERTIES_INDEX_MASK
#undef RECEIVER_CONFIGURATION_INDEX_MASK
#undef FIRST_LINE_IN_FRAME_MASK
#undef LAST_LINE_IN_FRAME_MASK
#undef D_LINE_NUM_MASK
#undef D_ENSEMBLE_NUM_MASK
#undef FRAME_TYPE_MASK
#undef START_OF_SUB_BATCH_MASK
#undef END_OF_SUB_BATCH_MASK
#undef END_OF_SUB_FRAME_MASK
#undef END_OF_ENSEMBLE_MASK
#undef IS_LAST_SUB_BATCH_MASK
#undef BAR
#undef OFFSET

10
include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/SramStructures.h

@ -9,13 +9,13 @@ struct SramIndex {
QVector<quint32> receiverConfigurationIndex;
QVector<quint32> pulsePropertiesIndex;
QVector<bool> firstLineInFrame;
QVector<bool> lastLineInFrame;
QVector<quint32> dLineNum;
QVector<quint32> dEnsembleNum;
quint8 frameType;
QVector<bool> startOfSubBatch;
QVector<bool> endOfSubBatch;
QVector<bool> endOfSubFrame;
QVector<bool> endOfEnsemble;
QVector<bool> isLastSubBatch;
};
struct SramRx {
QVector<float> rxActiveElementStep;
QVector<quint32> interceptPointFiringTime;

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

@ -15,10 +15,11 @@ struct ReceiverConfig_t {
quint32 lpfSel;
quint32 absEn;
quint32 focusNo;
quint32 lineFilterEn;
quint32 noiseRejectEn;
quint32 ddcEn;
quint32 wmfEn;
quint32 dpeEn;
quint32 frameType;
quint32 iqDataCrossEn;
quint32 logEn;
};
#endif //RECEIVERCONFIG_H

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

@ -24,6 +24,8 @@ struct HwRegister_t {
QList<QVector<quint32>> lpfLut;
QList<QVector<quint32>> atgcLut;
QList<QVector<quint32>> apodizationLut;
QList<quint32> mlaOffsetAddr;
quint32 noiseRejectValue;
};

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

@ -8,9 +8,11 @@ struct SramIndex_t {
QVector<quint32> pulsePropertiesIndex;
QVector<quint32> receiverConfigurationIndex;
QVector<bool> firstLineInFrame;
QVector<bool> lastLineInFrame;
QVector<quint32> dLineNum;
QVector<quint32> dEnsembleNum;
QVector<bool> startOfSubBatch;
QVector<bool> endOfSubBatch;
QVector<bool> endOfSubFrame;
QVector<bool> endOfEnsemble;
QVector<bool> isLastSubBatch;
};
#endif //SRAMINDEX_H

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

@ -738,23 +738,29 @@ void TrxBoard::setScenario(ScenGenHardwareOutput_t& scenGenHw)
_scenParams->hwRegister->configLut->stb.append(k.stb);
_scenParams->hwRegister->configLut->absEn.append(k.absEn);
_scenParams->hwRegister->configLut->ddcEn.append(k.ddcEn);
_scenParams->hwRegister->configLut->dpeEn.append(k.dpeEn);
_scenParams->hwRegister->configLut->logEn.append(k.logEn);
_scenParams->hwRegister->configLut->stbEn.append(k.stbEn);
_scenParams->hwRegister->configLut->wmfEn.append(k.wmfEn);
_scenParams->hwRegister->configLut->lpfSel.append(k.lpfSel);
_scenParams->hwRegister->configLut->aTgcSel.append(k.aTgcSel);
_scenParams->hwRegister->configLut->focusNo.append(k.focusNo);
_scenParams->hwRegister->configLut->lineMode.append(k.lineMode);
_scenParams->hwRegister->configLut->frameType.append(k.frameType);
_scenParams->hwRegister->configLut->iqDataCrossEn.append(k.iqDataCrossEn);
_scenParams->hwRegister->configLut->ncoFreqSel.append(k.ncoFreqSel);
_scenParams->hwRegister->configLut->dcCancelerEn.append(k.dcCancelEn);
_scenParams->hwRegister->configLut->lineFilterEn.append(k.lineFilterEn);
_scenParams->hwRegister->configLut->noiseRejectionEn.append(k.noiseRejectEn);
_scenParams->hwRegister->configLut->subtractFilterEn.append(k.subtractFilterEn);
}
_scenParams->indexParams->dLineNum = scenGenHw.indexParams.dLineNum;
_scenParams->indexParams->frameType = scenGenHw.frameType;
_scenParams->indexParams->dEnsembleNum = scenGenHw.indexParams.dEnsembleNum;
_scenParams->indexParams->lastLineInFrame = scenGenHw.indexParams.lastLineInFrame;
_scenParams->hwRegister->mlaOffsetAddr = scenGenHw.hwRegister.mlaOffsetAddr;
_scenParams->hwRegister->noiseReject = scenGenHw.hwRegister.noiseRejectValue;
_scenParams->indexParams->endOfEnsemble = scenGenHw.indexParams.endOfEnsemble;
_scenParams->indexParams->endOfSubBatch = scenGenHw.indexParams.endOfSubBatch;
_scenParams->indexParams->endOfSubFrame = scenGenHw.indexParams.endOfSubFrame;
_scenParams->indexParams->isLastSubBatch = scenGenHw.indexParams.isLastSubBatch;
_scenParams->indexParams->startOfSubBatch = scenGenHw.indexParams.startOfSubBatch;
_scenParams->indexParams->firstLineInFrame = scenGenHw.indexParams.firstLineInFrame;
_scenParams->indexParams->shotPropertiesIndex = scenGenHw.indexParams.shotPropertiesIndex;
_scenParams->indexParams->pulsePropertiesIndex = scenGenHw.indexParams.pulsePropertiesIndex;
@ -912,6 +918,10 @@ void TrxBoard::setScenario (ScenGenHardwareParam* _scenParams)
}
this->_dsp->blendWeight(blendWeightQ);
this->_dsp->mlaOffsetAddr(_scenParams->hwRegister->mlaOffsetAddr);
this->_dsp->noiseReject(_scenParams->hwRegister->noiseReject);
///////////////////////////////// Sram setting ///////////////////////////////
this->_sram->setSramIndex(_scenParams->totalTxShotNumber, _scenParams->indexParams);

22
src/model/hardware/core/lowLevelApi/register/dsp/Dsp.cpp

@ -4,10 +4,12 @@ Dsp::Dsp(SonoDevice *device)
{
_configLut = new ReceiverConfigurationLut (device);
_lineFilterLut = new LineFilterCoefficient (device);
_noiseReject = new NoiseRejectValue (device);
_stbLut = new StbCoefficient (device);
_freqLut = new FrequencyLut (device);
_blendWeight = new BlendWeight (device);
_manualAtgc = new ManualAtgc (device);
_mlaOffset = new MlaOffset (device);
_dtgcLut = new DtgcLut (device);
_atgcLut = new AtgcLut (device);
_bfScale = new BfScale (device);
@ -19,8 +21,10 @@ Dsp::~Dsp()
{
delete _lineFilterLut;
delete _blendWeight;
delete _noiseReject;
delete _manualAtgc;
delete _configLut;
delete _mlaOffset;
delete _freqLut;
delete _dtgcLut;
delete _atgcLut;
@ -108,13 +112,13 @@ void Dsp::dtgcLut(QList<quint32> &dtgcLut) const
this->_dtgcLut->updateArray();
}
void Dsp::atgcLut(QList<QList<quint32> > &atgcLut) const
void Dsp::atgcLut(QList<Atgc*> atgcLut) const
{
quint32 baseOffset = this->_atgcLut->getCurrentOffset();
foreach (QList<quint32> temp, atgcLut)
foreach (Atgc *tempObj, atgcLut)
{
this->_atgcLut->setAtgcLut(temp);
this->_atgcLut->setAtgcLut(tempObj);
this->_atgcLut->updateArray();
quint32 curOffset = this->_atgcLut->getCurrentOffset();
this->_atgcLut->changeOffset(curOffset + ATGC_OFFSET);
@ -137,3 +141,15 @@ void Dsp::lpfLut(QList<QList<quint32>> &lpfLut) const
this->_lpfLut->changeOffset(baseOffset);
}
void Dsp::mlaOffsetAddr(QList<quint32> &mlaLut) const
{
this->_mlaOffset->setMlaOffsetLut(mlaLut);
this->_mlaOffset->updateArray();
}
void Dsp::noiseReject(quint32 &rejectValue) const
{
this->_noiseReject->rejectValue->setValue(rejectValue);
this->_noiseReject->update();
}

2
src/model/scenarioGenerator/core/scenario/B/BModeScenario.cpp

@ -255,7 +255,7 @@ void BModeScenario::calcReceiverConfigProperties()
temp.lpfSel = 1;
temp.absEn = true;
temp.focusNo = frameParams[0]->focusNumber;
temp.lineFilterEn = true;
//temp.lineFilterEn = true;
hardwareOuput.hwRegister.receiverConfigProps.append(temp);
}

2
src/model/scenarioGenerator/core/scenario/Bm/BmModeScenario.cpp

@ -412,7 +412,7 @@ void BmModeScenario::calcReceiverConfigProperties()
ReceiverConfig_t temp;
temp.lineMode = lineModeVals[i];
temp.stbEn = stbEnVals[i];
temp.lineFilterEn = lineFilterEnVals[i];
//temp.lineFilterEn = lineFilterEnVals[i];
temp.mla = frameParams[i]->mla;
temp.aTgcSel = 1;
temp.stb = frameParams[i]->stb;

Loading…
Cancel
Save