Browse Source

TrxBoard structures are updated & preprocessor changed to sono

v4.5
Arash Aletayeb 2 years ago
parent
commit
2789396089
  1. 2
      developHw.pro.user
  2. 8
      hdf5Scenario/hdf5Scenario.cpp
  3. 2
      hdf5Scenario/hdf5Scenario.h
  4. 33
      include/model/hardware/core/lowLevelApi/TrxBoard.h
  5. 2
      include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h
  6. 164
      include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h
  7. 2
      mainwindow.cpp
  8. 2
      src/model/hardware/core/lowLevelApi/TrxBoard.cpp

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2022-12-31T16:20:26. --> <!-- Written by QtCreator 4.10.0, 2023-01-01T14:04:50. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

8
hdf5Scenario/hdf5Scenario.cpp

@ -17,7 +17,7 @@ void Hdf5::hdf5Path(const string &h5Path)
_file = file; _file = file;
} }
void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams) void Hdf5::scenarioRead(ScenHardware &scenParams)
{ {
// /****************** /sramParameters/frameType ******************/ // /****************** /sramParameters/frameType ******************/
// datasetBranch <float_t>("/sramParameters/frameType", floatArray); // datasetBranch <float_t>("/sramParameters/frameType", floatArray);
@ -476,7 +476,7 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
} }
/**************** /registerParameters/pulseProperties ********************/ /**************** /registerParameters/pulseProperties ********************/
Pulse_t pulseObj; Pulse pulseObj;
scenParams.hwRegister.pulseProps.clear(); scenParams.hwRegister.pulseProps.clear();
for (qint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) for (qint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++)
@ -519,7 +519,7 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
} }
/**************** /registerParameters/rxBeamformerProperties ********************/ /**************** /registerParameters/rxBeamformerProperties ********************/
RxBeamFormer_t rxBeamformerObj; RxBeamFormer rxBeamformerObj;
scenParams.hwRegister.rxBeamFormerProps.clear(); scenParams.hwRegister.rxBeamFormerProps.clear();
for (qint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) for (qint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++)
@ -766,7 +766,7 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
} }
/**************** /registerParameters/receiverConfigProperties ********************/ /**************** /registerParameters/receiverConfigProperties ********************/
ReceiverConfig_t receiverCfgObj; ReceiverConfig receiverCfgObj;
scenParams.hwRegister.receiverConfigProps.clear(); scenParams.hwRegister.receiverConfigProps.clear();
for (qint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) for (qint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)

2
hdf5Scenario/hdf5Scenario.h

@ -24,7 +24,7 @@ private:
public: public:
void hdf5Path (const string &h5Path); void hdf5Path (const string &h5Path);
void scenarioRead (ScenGenHardwareOutput_t &scenParams); void scenarioRead (ScenHardware &scenParams);
void prbDependParamsRead (ScenPrbDepHardwareParam &prbDepParams); void prbDependParamsRead (ScenPrbDepHardwareParam &prbDepParams);
QVector<quint32> stbRead (void); QVector<quint32> stbRead (void);

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

@ -10,27 +10,26 @@
#include <QTime> #include <QTime>
#include <QDebug> #include <QDebug>
#include "model/hardware/core/lowLevelApi/register/clockDistributer/ClockDistributer.h" #include "register/clockDistributer/ClockDistributer.h"
#include "model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.h" #include "register/boardsCtrlMngt/BoardsCtrlMngt.h"
#include "model/hardware/core/lowLevelApi/register/fpgaProgram/FpgaProgram.h" #include "register/fpgaProgram/FpgaProgram.h"
#include "model/hardware/core/lowLevelApi/register/builtInTest/BuiltInTest.h" #include "register/builtInTest/BuiltInTest.h"
#include "model/hardware/core/lowLevelApi/register/beamFormer/BeamFormer.h" #include "register/beamFormer/BeamFormer.h"
#include "model/hardware/core/lowLevelApi/register/scenPlayer/ScenPlayer.h" #include "register/scenPlayer/ScenPlayer.h"
#include "model/hardware/core/lowLevelApi/register/bpiFlash/BpiFlash.h" #include "register/bpiFlash/BpiFlash.h"
#include "model/hardware/core/lowLevelApi/register/emulator/Emulator.h" #include "register/emulator/Emulator.h"
#include "model/hardware/core/lowLevelApi/register/debug/Debug.h" #include "register/debug/Debug.h"
#include "model/hardware/core/lowLevelApi/register/misc/Misc.h" #include "register/misc/Misc.h"
#include "model/hardware/core/lowLevelApi/register/sram/Sram.h" #include "register/sram/Sram.h"
#include "model/hardware/core/lowLevelApi/register/dsp/Dsp.h" #include "register/dsp/Dsp.h"
#include "model/hardware/core/lowLevelApi/register/afe/Afe.h" #include "register/afe/Afe.h"
#include "model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h"
#include "model/hardware/device/SonoDevice.h" #include "model/hardware/device/SonoDevice.h"
#include "TrxBoardUtils/TrxBoardStructures.h" #include "TrxBoardUtils/TrxBoardStructures.h"
#include "TrxBoardUtils/ScenParamsRanges.h" #include "TrxBoardUtils/ScenParamsRanges.h"
#include "TrxBoardUtils/PreProcessorDef.h"
#include "TrxBoardUtils/TrxBoardEnums.h" #include "TrxBoardUtils/TrxBoardEnums.h"
#include "model/scenarioGenerator/dto/hardware/HardwareOutput.h"
#include "model/scenarioGenerator/core/general/Calculation.h" #include "model/scenarioGenerator/core/general/Calculation.h"
#include "model/hardware/service/HardwarePacketEngine.h" #include "model/hardware/service/HardwarePacketEngine.h"
@ -217,7 +216,7 @@ public:
////////////////////////////////// Scenario API /////////////////////////////// ////////////////////////////////// Scenario API ///////////////////////////////
void setProbeDependParams(ScenPrbDepHardwareParam& prbDepParams); void setProbeDependParams(ScenPrbDepHardwareParam& prbDepParams);
void setScenario(ScenGenHardwareOutput_t& scenGenHw); void setScenario(ScenHardware& scenGenHw);
void setLineFilterCoefficient(QVector<float>& lineFilterLut); void setLineFilterCoefficient(QVector<float>& lineFilterLut);
void setStbCoefficient(QVector<quint32>& stbLut); void setStbCoefficient(QVector<quint32>& stbLut);

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

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

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

@ -65,4 +65,168 @@ struct ScenPrbDepHardwareParam
ScenPrbDepHwRegister prbDepParams; ScenPrbDepHwRegister prbDepParams;
}; };
struct Pulse
{
quint32 halfPeriod;
quint32 halfCycleNo;
bool pulseVoltSel;
bool startPhase;
quint32 dampingPulseWidth;
};
struct RxBeamFormer
{
quint32 mla;
quint32 lag;
quint32 apodizationSel;
};
struct ReceiverConfig
{
quint32 mla;
quint32 lineMode;
quint32 aTgcSel;
quint32 stbEn;
quint32 stb;
quint32 subtractFilterEn;
quint32 dcCancelEn;
quint32 ncoFreqSel;
quint32 lpfSel;
quint32 absEn;
quint32 focusNo;
quint32 noiseRejectEn;
quint32 ddcEn;
quint32 frameType;
quint32 iqDataCrossEn;
quint32 logEn;
quint32 dTgcEn;
quint32 blendEn;
};
struct RxFreqResp
{
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;
};
struct ApodizationParameters
{
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;
};
struct HwRegister
{
QVector<float> dtgcLut;
QVector<QVector<float> > blendWeight;
QVector<float> elementXPosition;
QVector<float> elementYPosition;
QVector<float> elementZPosition;
QVector<float> freqLut;
quint32 scenarioStartIndex;
quint32 scenarioEndIndex;
QList<Pulse> pulseProps;
quint8 pulseTypeNumber;
quint8 rxBeamFormerTypeNumber;
QList<RxBeamFormer> rxBeamFormerProps;
quint8 receiverConfigTypeNumber;
QList<ReceiverConfig> receiverConfigProps;
QList<QVector<quint32>> lpfLut;
QList<QVector<quint32>> atgcLut;
QList<QVector<quint32>> apodizationLut;
QList<quint32> mlaOffsetAddr;
quint32 noiseRejectValue;
quint32 frameLoggerControl;
RxFreqResp ddcParams;
ApodizationParameters apodizationParams;
};
struct HwSramIndex
{
QVector<quint32> shotPropertiesIndex;
QVector<quint32> pulsePropertiesIndex;
QVector<quint32> receiverConfigurationIndex;
QVector<bool> firstLineInFrame;
QVector<bool> startOfSubBatch;
QVector<bool> endOfSubBatch;
QVector<bool> endOfSubFrame;
QVector<bool> endOfEnsemble;
QVector<bool> isLastSubBatch;
};
struct HwSramRx
{
QVector<quint32> rxR0CenterActiveElementNumber;
QVector<quint32> rxR0ActiveElementNumber;
QVector<float> rxActiveElementStep;
QVector<quint32> interceptPointFiringTime;
QVector<float> r0Position;
QVector<quint32> rxFocusPointNumber;
QVector<float> thetaCos;
QVector<float> thetaSin;
QVector<float> phiCos;
QVector<float> phiSin;
QVector<float> interceptXPos;
QVector<float> interceptYPos;
QVector<float> interceptZPos;
QVector<float> txR0MinDelay;
QVector<float> rxR0MinDelay;
QVector<float> rxR0MaxDelay;
QVector<quint32> txR0MinDelayQ;
QVector<quint32> rxR0MinDelayQ;
QVector<quint32> rxR0MaxDelayQ;
QVector<quint32> rxR0StartActiveElementNumber;
QVector<float> r0XPosition;
QVector<float> r0YPosition;
QVector<float> r0ZPosition;
};
struct HwSramTx
{
QVector<float> txFocusXPos;
QVector<float> txFocusYPos;
QVector<float> txFocusZPos;
QVector<quint32> txStartActiveElementNumber;
QVector<quint32> txActiveElementNumber;
QVector<float> minDelay;
QVector<float> maxDelay;
QVector<quint32> maxDelayQ;
QVector<float> interceptXPos;
QVector<float> interceptYPos;
QVector<float> interceptZPos;
};
struct ScenHardware
{
quint32 focusTypeNumber;
quint32 totalTxShotNumber;
QVector<quint8> rxBeamFormerNumber;
QVector<float> pulseInterval;
quint8 frameType;
HwRegister hwRegister;
HwSramIndex indexParams;
HwSramRx rxParams;
HwSramTx txParams;
};
#endif // TRXBOARDSTRUCTURES_H #endif // TRXBOARDSTRUCTURES_H

2
mainwindow.cpp

@ -2511,7 +2511,7 @@ void MainWindow::setScenario(const QString& h5Path)
afeConfig(afeConfigObj); afeConfig(afeConfigObj);
Hdf5 hdf; Hdf5 hdf;
ScenGenHardwareOutput_t scenParams; ScenHardware scenParams;
ScenPrbDepHardwareParam prbDepParams; ScenPrbDepHardwareParam prbDepParams;
QVector<float> lineFilterLut; QVector<float> lineFilterLut;
QVector<quint32> stbLut; QVector<quint32> stbLut;

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

@ -599,7 +599,7 @@ void TrxBoard::setProbeDependParams(ScenPrbDepHardwareParam& prbDepParams)
setAfePwr(afePwrdnEnable); setAfePwr(afePwrdnEnable);
} }
void TrxBoard::setScenario(ScenGenHardwareOutput_t& scenGenHw) void TrxBoard::setScenario(ScenHardware& scenGenHw)
{ {
if(this->_scenPlayer->control.getCommand()) if(this->_scenPlayer->control.getCommand())
{ {

Loading…
Cancel
Save