Browse Source
Scen stop calling is depend to scen start Set scenario compare is added Eeproms are modified to new structuresmaster
Arash Aletayeb
3 years ago
24 changed files with 2434 additions and 2171 deletions
@ -0,0 +1,676 @@ |
|||
#include "hdf5Scenario.h" |
|||
|
|||
template<class T> |
|||
void Hdf5::datasetBranch(const string &branchPath, T datasetValue[MAX_ARRAY_DEPTH]) |
|||
{ |
|||
const H5std_string datasetPath(branchPath); |
|||
DataSet datasetType = _file.openDataSet(datasetPath); |
|||
|
|||
datasetType.read(datasetValue, PredType::NATIVE_FLOAT, H5S_ALL, H5S_ALL); |
|||
} |
|||
|
|||
void Hdf5::hdf5Path(const string &h5Path) |
|||
{ |
|||
const H5std_string filePath(h5Path); |
|||
H5File file (filePath, H5F_ACC_RDONLY); |
|||
_file = file; |
|||
} |
|||
|
|||
void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams) |
|||
{ |
|||
/****************** /sramParameters/frameType ******************/ |
|||
datasetBranch <float_t>("/sramParameters/frameType", floatArray); |
|||
scenParams.frameType = static_cast<quint8>(floatArray[0]); |
|||
|
|||
/****************** /sramParameters/totalTxShotNo ******************/ |
|||
datasetBranch <float_t>("/sramParameters/totalTxShotNo", floatArray); |
|||
scenParams.totalTxShotNumber = static_cast<quint32>(floatArray[0]); |
|||
|
|||
/******************* /sramParameters/focusTypeNo *******************/ |
|||
datasetBranch <float_t>("/sramParameters/focusTypeNo", floatArray); |
|||
scenParams.focusTypeNumber = static_cast<quint32>(floatArray[0]); |
|||
|
|||
/******************* /sramParameters/rxBeamformerNo *******************/ |
|||
datasetBranch <float_t>("/sramParameters/rxBeamformerNo", floatArray); |
|||
scenParams.rxBeamFormerNumber.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.rxBeamFormerNumber.push_back(static_cast<quint8>(floatArray[var])); |
|||
|
|||
/**************** /sramParameters/pulseInterval ********************/ |
|||
datasetBranch <float_t>("/sramParameters/pulseInterval", floatArray); |
|||
scenParams.pulseInterval.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.pulseInterval.push_back(floatArray[var]); |
|||
|
|||
/**************** /sramParameters/indexParameters/shotPropertiesIndex ********************/ |
|||
datasetBranch <float_t>("/sramParameters/indexParameters/shotPropertiesIndex", floatArray); |
|||
scenParams.indexParams.shotPropertiesIndex.clear(); |
|||
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.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.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.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.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.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.totalTxShotNumber; var++) |
|||
scenParams.indexParams.dEnsembleNum.push_back(static_cast<quint32>(floatArray[var])); |
|||
|
|||
/**************** /sramParameters/txParameters/txFocusXPos ********************/ |
|||
datasetBranch <float_t>("/sramParameters/txParameters/txFocusXPos", floatArray); |
|||
scenParams.txParams.txFocusXPos.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.txParams.txFocusXPos.push_back(floatArray[var]); |
|||
|
|||
/**************** /sramParameters/txParameters/txFocusYPos ********************/ |
|||
datasetBranch <float_t>("/sramParameters/txParameters/txFocusYPos", floatArray); |
|||
scenParams.txParams.txFocusYPos.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.txParams.txFocusYPos.push_back(floatArray[var]); |
|||
|
|||
/**************** /sramParameters/txParameters/txFocusZPos ********************/ |
|||
datasetBranch <float_t>("/sramParameters/txParameters/txFocusZPos", floatArray); |
|||
scenParams.txParams.txFocusZPos.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.txParams.txFocusZPos.push_back(floatArray[var]); |
|||
|
|||
/**************** /sramParameters/txParameters/txStartActiveElementNo ********************/ |
|||
datasetBranch <float_t>("/sramParameters/txParameters/txStartActiveElementNo", floatArray); |
|||
scenParams.txParams.txStartActiveElementNumber.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.txParams.txStartActiveElementNumber.push_back(static_cast<quint32>(floatArray[var])); |
|||
|
|||
/**************** /sramParameters/txParameters/txActiveElementNo ********************/ |
|||
datasetBranch <float_t>("/sramParameters/txParameters/txActiveElementNo", floatArray); |
|||
scenParams.txParams.txActiveElementNumber.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.txParams.txActiveElementNumber.push_back(static_cast<quint32>(floatArray[var])); |
|||
|
|||
/**************** /sramParameters/txParameters/maxDelayQ ********************/ |
|||
datasetBranch <float_t>("/sramParameters/txParameters/maxDelayQ", floatArray); |
|||
scenParams.txParams.maxDelayQ.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.txParams.maxDelayQ.push_back(static_cast<quint32>(floatArray[var])); |
|||
|
|||
/**************** /sramParameters/rxParameters/rxR0CenterActiveElementNo ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/rxR0CenterActiveElementNo", floatArray); |
|||
scenParams.rxParams.rxR0CenterActiveElementNumber.clear(); |
|||
quint32 accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.rxR0CenterActiveElementNumber.push_back(static_cast<quint32>(floatArray[accum])); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/rxR0ActiveElementNo ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/rxR0ActiveElementNo", floatArray); |
|||
scenParams.rxParams.rxR0ActiveElementNumber.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.rxR0ActiveElementNumber.push_back(static_cast<quint32>(floatArray[accum])); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/rxActiveElementStep ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/rxActiveElementStep", floatArray); |
|||
scenParams.rxParams.rxActiveElementStep.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.rxParams.rxActiveElementStep.push_back(floatArray[var]); |
|||
|
|||
/**************** /sramParameters/rxParameters/interceptPointFiringTime ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/interceptPointFiringTime", floatArray); |
|||
scenParams.rxParams.interceptPointFiringTime.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.rxParams.interceptPointFiringTime.push_back(static_cast<quint32>(floatArray[var])); |
|||
|
|||
/**************** /sramParameters/rxParameters/rxFocusPointNo ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/rxFocusPointNo", floatArray); |
|||
scenParams.rxParams.rxFocusPointNumber.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.rxParams.rxFocusPointNumber.push_back(static_cast<quint32>(floatArray[var])); |
|||
|
|||
/**************** /sramParameters/rxParameters/r0Position ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/r0Position", floatArray); |
|||
scenParams.rxParams.r0Position.clear(); |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
scenParams.rxParams.r0Position.push_back(floatArray[var]); |
|||
|
|||
/**************** /sramParameters/rxParameters/thetaCos ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/thetaCos", floatArray); |
|||
scenParams.rxParams.thetaCos.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.thetaCos.push_back(floatArray[accum]); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/thetaSin ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/thetaSin", floatArray); |
|||
scenParams.rxParams.thetaSin.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.thetaSin.push_back(floatArray[accum]); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/phiCos ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/phiCos", floatArray); |
|||
scenParams.rxParams.phiCos.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.phiCos.push_back(floatArray[accum]); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/phiSin ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/phiSin", floatArray); |
|||
scenParams.rxParams.phiSin.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.phiSin.push_back(floatArray[accum]); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/interceptXPos ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/interceptXPos", floatArray); |
|||
scenParams.rxParams.interceptXPos.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.interceptXPos.push_back(floatArray[accum]); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/interceptYPos ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/interceptYPos", floatArray); |
|||
scenParams.rxParams.interceptYPos.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.interceptYPos.push_back(floatArray[accum]); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/interceptZPos ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/interceptZPos", floatArray); |
|||
scenParams.rxParams.interceptZPos.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.interceptZPos.push_back(floatArray[accum]); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/txR0MinDelayQ ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/txR0MinDelayQ", floatArray); |
|||
scenParams.rxParams.txR0MinDelayQ.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.txR0MinDelayQ.push_back(static_cast<quint32>(floatArray[accum])); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/rxR0MinDelayQ ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/rxR0MinDelayQ", floatArray); |
|||
scenParams.rxParams.rxR0MinDelayQ.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.rxR0MinDelayQ.push_back(static_cast<quint32>(floatArray[accum])); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /sramParameters/rxParameters/rxR0MaxDelayQ ********************/ |
|||
datasetBranch <float_t>("/sramParameters/rxParameters/rxR0MaxDelayQ", floatArray); |
|||
scenParams.rxParams.rxR0MaxDelayQ.clear(); |
|||
accum = 0; |
|||
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|||
for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast<qint32>(var)]; var1++) |
|||
{ |
|||
scenParams.rxParams.rxR0MaxDelayQ.push_back(static_cast<quint32>(floatArray[accum])); |
|||
accum++; |
|||
} |
|||
|
|||
/**************** /registerParameters/pulseTypeNo ********************/ |
|||
datasetBranch <float_t>("/registerParameters/pulseTypeNo", floatArray); |
|||
scenParams.hwRegister.pulseTypeNumber = static_cast<quint8>(floatArray[0]); |
|||
|
|||
/**************** /registerParameters/rxBeamformerTypeNo ********************/ |
|||
datasetBranch <float_t>("/registerParameters/rxBeamformerTypeNo", floatArray); |
|||
scenParams.hwRegister.rxBeamFormerTypeNumber = static_cast<quint8>(floatArray[0]); |
|||
|
|||
/**************** /registerParameters/receiverConfigTypeNo ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigTypeNo", floatArray); |
|||
scenParams.hwRegister.receiverConfigTypeNumber = static_cast<quint8>(floatArray[0]); |
|||
|
|||
/**************** /registerParameters/blendWeight ********************/ |
|||
datasetBranch <float_t>("/registerParameters/blendWeight", floatArray); |
|||
scenParams.hwRegister.blendWeight.clear(); |
|||
QVector <float> tempBlendWeight; |
|||
|
|||
for (quint32 i = 0; i < 4; i++) |
|||
{ |
|||
tempBlendWeight.clear(); |
|||
for (quint32 j = 0; j < 512; j++) |
|||
{ |
|||
tempBlendWeight.push_back(floatArray[j + i * 512]); |
|||
} |
|||
scenParams.hwRegister.blendWeight.push_back(tempBlendWeight); |
|||
} |
|||
|
|||
/**************** /registerParameters/freqLut ********************/ |
|||
datasetBranch <float_t>("/registerParameters/freqLut", floatArray); |
|||
scenParams.hwRegister.freqLut.clear(); |
|||
for (quint32 var = 0; var < 8; var++) |
|||
scenParams.hwRegister.freqLut.push_back(floatArray[var]); |
|||
|
|||
/**************** /registerParameters/dTgcLut ********************/ |
|||
datasetBranch <float_t>("/registerParameters/dTgcLut", floatArray); |
|||
scenParams.hwRegister.dtgcLut.clear(); |
|||
for (quint32 var = 0; var < 1024; var++) |
|||
scenParams.hwRegister.dtgcLut.push_back(floatArray[var]); |
|||
|
|||
/**************** /registerParameters/elementXPositions ********************/ |
|||
datasetBranch <float_t>("/registerParameters/elementXPositions", floatArray); |
|||
scenParams.hwRegister.elementXPosition.clear(); |
|||
for (quint32 var = 0; var < 192; var++) |
|||
scenParams.hwRegister.elementXPosition.push_back(floatArray[var]); |
|||
|
|||
/**************** /registerParameters/elementYPositions ********************/ |
|||
datasetBranch <float_t>("/registerParameters/elementYPositions", floatArray); |
|||
scenParams.hwRegister.elementYPosition.clear(); |
|||
for (quint32 var = 0; var < 192; var++) |
|||
scenParams.hwRegister.elementYPosition.push_back(floatArray[var]); |
|||
|
|||
/**************** /registerParameters/elementZPositions ********************/ |
|||
datasetBranch <float_t>("/registerParameters/elementZPositions", floatArray); |
|||
scenParams.hwRegister.elementZPosition.clear(); |
|||
for (quint32 var = 0; var < 192; var++) |
|||
scenParams.hwRegister.elementZPosition.push_back(floatArray[var]); |
|||
|
|||
/**************** /registerParameters/scenarioStartIndex ********************/ |
|||
datasetBranch <float_t>("/registerParameters/scenarioStartIndex", floatArray); |
|||
scenParams.hwRegister.scenarioStartIndex = static_cast<quint32>(floatArray[0]); |
|||
|
|||
/**************** /registerParameters/scenarioEndIndex ********************/ |
|||
datasetBranch <float_t>("/registerParameters/scenarioEndIndex", floatArray); |
|||
scenParams.hwRegister.scenarioEndIndex = static_cast<quint32>(floatArray[0]); |
|||
|
|||
/**************** /registerParameters/pulseProperties/halfPeriod ********************/ |
|||
datasetBranch <float_t>("/registerParameters/pulseProperties/halfPeriod", floatArray); |
|||
QList<quint32> halfPeriod; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|||
{ |
|||
halfPeriod.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
|
|||
/**************** /registerParameters/pulseProperties/halfCycleNo ********************/ |
|||
datasetBranch <float_t>("/registerParameters/pulseProperties/halfCycleNo", floatArray); |
|||
QList<quint32> halfCycleNo; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|||
{ |
|||
halfCycleNo.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/pulseProperties/pulseVoltSel ********************/ |
|||
datasetBranch <float_t>("/registerParameters/pulseProperties/pulseVoltSel", floatArray); |
|||
QList<bool> pulseVoltSel; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|||
{ |
|||
pulseVoltSel.push_back(static_cast<bool>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/pulseProperties/startPhase ********************/ |
|||
datasetBranch <float_t>("/registerParameters/pulseProperties/startPhase", floatArray); |
|||
QList<bool> startPhase; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|||
{ |
|||
startPhase.push_back(static_cast<bool>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/pulseProperties/dampingPulseWidth ********************/ |
|||
datasetBranch <float_t>("/registerParameters/pulseProperties/dampingPulseWidth", floatArray); |
|||
QList<quint32> dampingPulseWidth; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|||
{ |
|||
dampingPulseWidth.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/pulseProperties ********************/ |
|||
Pulse_t pulseObj; |
|||
scenParams.hwRegister.pulseProps.clear(); |
|||
|
|||
for (qint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|||
{ |
|||
pulseObj.halfPeriod = halfPeriod.at(j); |
|||
pulseObj.startPhase = startPhase.at(j); |
|||
pulseObj.halfCycleNo = halfCycleNo.at(j); |
|||
pulseObj.pulseVoltSel = pulseVoltSel.at(j); |
|||
pulseObj.dampingPulseWidth = dampingPulseWidth.at(j); |
|||
|
|||
scenParams.hwRegister.pulseProps.push_back(pulseObj); |
|||
} |
|||
|
|||
|
|||
/**************** /registerParameters/rxBeamformerProperties/mla ********************/ |
|||
datasetBranch <float_t>("/registerParameters/rxBeamformerProperties/mla", floatArray); |
|||
QList<quint32> mla; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) |
|||
{ |
|||
mla.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/rxBeamformerProperties/lag ********************/ |
|||
datasetBranch <float_t>("/registerParameters/rxBeamformerProperties/lag", floatArray); |
|||
QList<quint32> lag; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) |
|||
{ |
|||
lag.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/rxBeamformerProperties/apodizationSel ********************/ |
|||
datasetBranch <float_t>("/registerParameters/rxBeamformerProperties/apodizationSel", floatArray); |
|||
QList<quint32> apodizationSel; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) |
|||
{ |
|||
apodizationSel.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/rxBeamformerProperties ********************/ |
|||
RxBeamFormer_t rxBeamformerObj; |
|||
scenParams.hwRegister.rxBeamFormerProps.clear(); |
|||
|
|||
for (qint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) |
|||
{ |
|||
rxBeamformerObj.mla = mla.at(j); |
|||
rxBeamformerObj.lag = lag.at(j); |
|||
rxBeamformerObj.apodizationSel = apodizationSel.at(j); |
|||
|
|||
scenParams.hwRegister.rxBeamFormerProps.push_back(rxBeamformerObj); |
|||
} |
|||
|
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/mla ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/mla", floatArray); |
|||
QList<quint32> receiverCfgMla; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
receiverCfgMla.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/lineMode ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/lineMode", floatArray); |
|||
QList<quint32> lineMode; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
lineMode.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/aTgcSel ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/aTgcSel", floatArray); |
|||
QList<quint32> aTgcSel; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
aTgcSel.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/stbEn ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/stbEn", floatArray); |
|||
QList<quint32> stbEn; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
stbEn.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/stb ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/stb", floatArray); |
|||
QList<quint32> stb; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
stb.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/subtractFilterEn ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/subtractFilterEn", floatArray); |
|||
QList<quint32> subtractFilterEn; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
subtractFilterEn.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/dcCancelEn ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/dcCancelEn", floatArray); |
|||
QList<quint32> dcCancelEn; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
dcCancelEn.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/ncoFreqSel ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/ncoFreqSel", floatArray); |
|||
QList<quint32> ncoFreqSel; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
ncoFreqSel.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/lpfSel ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/lpfSel", floatArray); |
|||
QList<quint32> lpfSel; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
lpfSel.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/absEn ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/absEn", floatArray); |
|||
QList<quint32> absEn; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
absEn.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/focusNo ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/focusNo", floatArray); |
|||
QList<quint32> focusNo; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
focusNo.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/lineFilterEn ********************/ |
|||
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/lineFilterEn", floatArray); |
|||
QList<quint32> lineFilterEn; |
|||
|
|||
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
lineFilterEn.push_back(static_cast<quint32>(floatArray[j])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/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])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/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])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties/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])); |
|||
} |
|||
|
|||
/**************** /registerParameters/receiverConfigProperties ********************/ |
|||
ReceiverConfig_t receiverCfgObj; |
|||
scenParams.hwRegister.receiverConfigProps.clear(); |
|||
|
|||
for (qint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|||
{ |
|||
receiverCfgObj.mla = receiverCfgMla.at(j); |
|||
receiverCfgObj.stb = stb.at(j); |
|||
receiverCfgObj.ddcn = ddcEn.at(j); |
|||
receiverCfgObj.absEn = absEn.at(j); |
|||
receiverCfgObj.dpeEn = dpeEn.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.dcCancelEn = dcCancelEn.at(j); |
|||
receiverCfgObj.ncoFreqSel = ncoFreqSel.at(j); |
|||
receiverCfgObj.lineFilterEn = lineFilterEn.at(j); |
|||
receiverCfgObj.subtractFilterEn = subtractFilterEn.at(j); |
|||
|
|||
scenParams.hwRegister.receiverConfigProps.push_back(receiverCfgObj); |
|||
} |
|||
} |
|||
|
|||
|
|||
void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams) |
|||
{ |
|||
/**************** /registerParameters/apodizationLut ********************/ |
|||
datasetBranch <float_t>("/registerParameters/apodizationLut", floatArray); |
|||
prbDepParams.prbDepParams.apodizationLut.clear(); |
|||
QVector <quint32> tempApodization; |
|||
|
|||
for (quint32 i = 0; i < 4; i++) |
|||
{ |
|||
tempApodization.clear(); |
|||
for (quint32 j = 0; j < 3057; j++) |
|||
{ |
|||
tempApodization.push_back(static_cast<quint32>(floatArray[j + i * 3057])); |
|||
} |
|||
prbDepParams.prbDepParams.apodizationLut.push_back(tempApodization); |
|||
} |
|||
|
|||
/**************** /registerParameters/aTgcLut ********************/ |
|||
datasetBranch <float_t>("/registerParameters/aTgcLut", floatArray); |
|||
prbDepParams.prbDepParams.atgcLut.clear(); |
|||
QVector <quint32> tempAtgc; |
|||
|
|||
for (quint32 i = 0; i < 4; i++) |
|||
{ |
|||
tempAtgc.clear(); |
|||
for (quint32 j = 0; j < 128; j++) |
|||
{ |
|||
tempAtgc.push_back(static_cast<quint32>(floatArray[j + i * 128])); |
|||
} |
|||
prbDepParams.prbDepParams.atgcLut.push_back(tempAtgc); |
|||
} |
|||
|
|||
/**************** /registerParameters/lpfLut ********************/ |
|||
datasetBranch <float_t>("/registerParameters/lpfLut", floatArray); |
|||
prbDepParams.prbDepParams.lpfLut.clear(); |
|||
QVector <quint32> tempLpf; |
|||
|
|||
for (quint32 i = 0; i < 4; i++) |
|||
{ |
|||
tempLpf.clear(); |
|||
for (quint32 j = 0; j < 48; j++) |
|||
{ |
|||
tempLpf.push_back(static_cast<quint32>(floatArray[j + i * 48])); |
|||
} |
|||
prbDepParams.prbDepParams.lpfLut.push_back(tempLpf); |
|||
} |
|||
} |
|||
|
|||
|
|||
QVector<quint32> Hdf5::stbRead() |
|||
{ |
|||
/**************** /registerParameters/stbLutQ ********************/ |
|||
datasetBranch <float_t>("/registerParameters/stbLutQ", floatArray); |
|||
QVector<quint32> stb; |
|||
for (quint8 var = 0; var < 8; var++) |
|||
stb.push_back(static_cast<quint32>(floatArray[var])); |
|||
return stb; |
|||
} |
|||
|
|||
QVector<float> Hdf5::lineFilterRead() |
|||
{ |
|||
/**************** /registerParameters/lineFilterLutQ ********************/ |
|||
datasetBranch <float_t>("/registerParameters/lineFilterLutQ", floatArray); |
|||
QVector<float> lineFilter; |
|||
for (quint8 var = 0; var < 3; var++) |
|||
lineFilter.push_back(floatArray[var]); |
|||
return lineFilter; |
|||
} |
@ -0,0 +1,35 @@ |
|||
#ifndef HDF5SCENARIO_H |
|||
#define HDF5SCENARIO_H |
|||
|
|||
#include "H5Cpp.h" |
|||
#include "hdf5.h" |
|||
#include "H5File.h" |
|||
#include "model/hardware/core/TrxBoard.h" |
|||
|
|||
#define MAX_ARRAY_DEPTH 131072U |
|||
|
|||
using namespace std; |
|||
using namespace H5; |
|||
|
|||
class Hdf5 |
|||
{ |
|||
private: |
|||
H5File _file; |
|||
|
|||
float_t floatArray[MAX_ARRAY_DEPTH]; |
|||
|
|||
template<class T> |
|||
void datasetBranch(const string& branchPath, T datasetValue[MAX_ARRAY_DEPTH]); |
|||
|
|||
public: |
|||
void hdf5Path (const string &h5Path); |
|||
|
|||
void scenarioRead (ScenGenHardwareOutput_t &scenParams); |
|||
void prbDependParamsRead (ScenPrbDepHardwareParam &prbDepParams); |
|||
|
|||
QVector<quint32> stbRead (void); |
|||
QVector<float> lineFilterRead (void); |
|||
|
|||
}; |
|||
|
|||
#endif // HDF5SCENARIO_H
|
@ -0,0 +1,10 @@ |
|||
#ifndef PREPROCESSORDEF_H |
|||
#define PREPROCESSORDEF_H |
|||
|
|||
#define MPS_BOARD |
|||
//#undef MPS_BOARD
|
|||
|
|||
#define DEVELOP_UI |
|||
#undef DEVELOP_UI |
|||
|
|||
#endif // PREPROCESSORDEF_H
|
@ -0,0 +1,28 @@ |
|||
#ifndef SCENPARAMSRANGE_H |
|||
#define SCENPARAMSRANGE_H |
|||
|
|||
/****************** DSP ******************/ |
|||
#define RRECEIVER_CONFIGURATION_LUT_MAX 8U |
|||
#define STB_COEFFICIENT_LUT_MAX 8 |
|||
#define LINE_FILTER_LUT_MAX 3 |
|||
#define BLENDWEIGHT_LUT_MAX 4 |
|||
#define FREQUENCY_LUT_MAX 8 |
|||
#define DTGC_LUT_MAX 1024 |
|||
#define ATGC_LUT_MAX 4 |
|||
#define LPF_LUT_MAX 4 |
|||
|
|||
/************** Beam Former **************/ |
|||
#define ELEMENT_POSITION_LUT_MAX 192 |
|||
#define APODIZATIONLUT_LUT_MAX 4 |
|||
#define RXBEAMFORMER_LUT_MAX 8U |
|||
#define PULSE_LUT_MAX 8U |
|||
|
|||
/****************** SRAM *****************/ |
|||
#define TOTAL_TX_SHOT_NUMBER_MAX 131072U |
|||
#define RX_BEAMFORMER_NUMBER_MAX 11264 |
|||
#define FOCUS_TYPE_NUMBER_MAX 11264U |
|||
|
|||
/************* Scenario Index ************/ |
|||
#define SCENARIO_INDEX_MAX 131072U |
|||
|
|||
#endif // SCENPARAMSRANGE_H
|
@ -0,0 +1,37 @@ |
|||
#ifndef ADCSYNCSTATUS_H |
|||
#define ADCSYNCSTATUS_H |
|||
|
|||
#include "model/hardware/core/register/Register.h" |
|||
#include "model/hardware/core/register/RegUtils.h" |
|||
|
|||
#undef BAR |
|||
|
|||
#define GEN_SYNC_CHECKER_MASK 0x0000000C |
|||
#define SYNC_CHECK_DONE_MASK 0x0000000C |
|||
#define SYNC_CHECK_ERROR_MASK 0x0000000C |
|||
#define LNA_HPF_PROG_MASK 0x0000000C |
|||
|
|||
#define BAR 0U |
|||
#define OFFSET 0x43C384 |
|||
|
|||
class AdcSyncStatus : public Register |
|||
{ |
|||
|
|||
public: |
|||
Field* lnaHpfProg; |
|||
|
|||
AdcSyncStatus(SonoDevice* device, quint32 offset) : Register(BAR, OFFSET + offset, device) |
|||
{ |
|||
ADD_UNSIGNED_FIELD(lnaHpfProg, LNA_HPF_PROG_MASK); |
|||
ADD_UNSIGNED_FIELD(lnaHpfProg, LNA_HPF_PROG_MASK); |
|||
ADD_UNSIGNED_FIELD(lnaHpfProg, LNA_HPF_PROG_MASK); |
|||
ADD_UNSIGNED_FIELD(lnaHpfProg, LNA_HPF_PROG_MASK); |
|||
} |
|||
}; |
|||
|
|||
#undef LNA_HPF_PROG_MASK |
|||
|
|||
#undef BAR |
|||
#undef OFFSET |
|||
|
|||
#endif // ADCSYNCSTATUS_H
|
File diff suppressed because it is too large
File diff suppressed because it is too large
Loading…
Reference in new issue