|
|
@ -2545,7 +2545,7 @@ void MainWindow::on_btn_getFpgaVersion_clicked() |
|
|
|
/*************************************************************************************************/ |
|
|
|
|
|
|
|
template<class T> |
|
|
|
void MainWindow::datasetBranch(const string &branchPath, T datasetValue[][3057]) |
|
|
|
void MainWindow::datasetBranch(const string &branchPath, T datasetValue[MAX_ARRAY_DEPTH]) |
|
|
|
{ |
|
|
|
const H5std_string datasetPath(branchPath); |
|
|
|
DataSet datasetType = _file.openDataSet(datasetPath); |
|
|
@ -2565,213 +2565,218 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
{ |
|
|
|
/****************** /sramParameters/frameType ******************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/frameType", floatArray); |
|
|
|
scenParams.frameType = static_cast<quint8>(floatArray[0][0]); |
|
|
|
scenParams.frameType = static_cast<quint8>(floatArray[0]); |
|
|
|
|
|
|
|
/****************** /sramParameters/totalTxShotNo ******************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/totalTxShotNo", floatArray); |
|
|
|
scenParams.totalTxShotNumber = static_cast<quint32>(floatArray[0][0]); |
|
|
|
scenParams.totalTxShotNumber = static_cast<quint32>(floatArray[0]); |
|
|
|
|
|
|
|
/******************* /sramParameters/focusTypeNo *******************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/focusTypeNo", floatArray); |
|
|
|
scenParams.focusTypeNumber = static_cast<quint32>(floatArray[0][0]); |
|
|
|
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[0][var])); |
|
|
|
scenParams.rxBeamFormerNumber.push_back(static_cast<quint8>(floatArray[var])); |
|
|
|
|
|
|
|
// for(auto j=0; j<scenParams.focusTypeNumber; j++)
|
|
|
|
// {
|
|
|
|
// qDebug() << scenParams.rxBeamFormerNumber[j];
|
|
|
|
// }
|
|
|
|
|
|
|
|
/**************** /sramParameters/pulseInterval ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/pulseInterval", floatArray); |
|
|
|
scenParams.pulseInterval.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.pulseInterval.push_back(floatArray[0][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.focusTypeNumber; var++) |
|
|
|
scenParams.indexParams.shotPropertiesIndex.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.indexParams.shotPropertiesIndex.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/indexParameters/pulsePropertiesIndex ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/indexParameters/pulsePropertiesIndex", floatArray); |
|
|
|
scenParams.indexParams.pulsePropertiesIndex.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.indexParams.pulsePropertiesIndex.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.indexParams.pulsePropertiesIndex.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/indexParameters/receiverConfigurationIndex ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/indexParameters/receiverConfigurationIndex", floatArray); |
|
|
|
scenParams.indexParams.receiverConfigurationIndex.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.indexParams.receiverConfigurationIndex.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.indexParams.receiverConfigurationIndex.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/indexParameters/firstLineInFrame ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/indexParameters/firstLineInFrame", floatArray); |
|
|
|
scenParams.indexParams.firstLineInFrame.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.indexParams.firstLineInFrame.push_back(static_cast<bool>(floatArray[0][var])); |
|
|
|
scenParams.indexParams.firstLineInFrame.push_back(static_cast<bool>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/indexParameters/lastLineInFrame ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/indexParameters/lastLineInFrame", floatArray); |
|
|
|
scenParams.indexParams.lastLineInFrame.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.indexParams.lastLineInFrame.push_back(static_cast<bool>(floatArray[0][var])); |
|
|
|
scenParams.indexParams.lastLineInFrame.push_back(static_cast<bool>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/indexParameters/dLineNum ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/indexParameters/dLineNum", floatArray); |
|
|
|
scenParams.indexParams.dLineNum.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.indexParams.dLineNum.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.indexParams.dLineNum.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/indexParameters/dEnsembleNum ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/indexParameters/dEnsembleNum", floatArray); |
|
|
|
scenParams.indexParams.dEnsembleNum.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.indexParams.dEnsembleNum.push_back(static_cast<quint32>(floatArray[0][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[0][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[0][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[0][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[0][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[0][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[0][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(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.rxR0CenterActiveElementNumber.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.rxParams.rxR0CenterActiveElementNumber.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/rxR0ActiveElementNo ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/rxR0ActiveElementNo", floatArray); |
|
|
|
scenParams.rxParams.rxR0ActiveElementNumber.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.rxR0ActiveElementNumber.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.rxParams.rxR0ActiveElementNumber.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /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[0][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[0][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[0][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[0][var]); |
|
|
|
scenParams.rxParams.r0Position.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/thetaCos ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/thetaCos", floatArray); |
|
|
|
scenParams.rxParams.thetaCos.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.thetaCos.push_back(floatArray[0][var]); |
|
|
|
scenParams.rxParams.thetaCos.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/thetaSin ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/thetaSin", floatArray); |
|
|
|
scenParams.rxParams.thetaSin.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.thetaSin.push_back(floatArray[0][var]); |
|
|
|
scenParams.rxParams.thetaSin.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/phiCos ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/phiCos", floatArray); |
|
|
|
scenParams.rxParams.phiCos.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.phiCos.push_back(floatArray[0][var]); |
|
|
|
scenParams.rxParams.phiCos.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/phiSin ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/phiSin", floatArray); |
|
|
|
scenParams.rxParams.phiSin.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.phiSin.push_back(floatArray[0][var]); |
|
|
|
scenParams.rxParams.phiSin.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/interceptXPos ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/interceptXPos", floatArray); |
|
|
|
scenParams.rxParams.interceptXPos.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.interceptXPos.push_back(floatArray[0][var]); |
|
|
|
scenParams.rxParams.interceptXPos.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/interceptYPos ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/interceptYPos", floatArray); |
|
|
|
scenParams.rxParams.interceptYPos.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.interceptYPos.push_back(floatArray[0][var]); |
|
|
|
scenParams.rxParams.interceptYPos.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/interceptZPos ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/interceptZPos", floatArray); |
|
|
|
scenParams.rxParams.interceptZPos.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.interceptZPos.push_back(floatArray[0][var]); |
|
|
|
scenParams.rxParams.interceptZPos.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/txR0MinDelayQ ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/txR0MinDelayQ", floatArray); |
|
|
|
scenParams.rxParams.txR0MinDelayQ.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.txR0MinDelayQ.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.rxParams.txR0MinDelayQ.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/rxR0MinDelayQ ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/rxR0MinDelayQ", floatArray); |
|
|
|
scenParams.rxParams.rxR0MinDelayQ.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.rxR0MinDelayQ.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.rxParams.rxR0MinDelayQ.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /sramParameters/rxParameters/rxR0MaxDelayQ ********************/ |
|
|
|
datasetBranch <float_t>("/sramParameters/rxParameters/rxR0MaxDelayQ", floatArray); |
|
|
|
scenParams.rxParams.rxR0MaxDelayQ.clear(); |
|
|
|
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) |
|
|
|
scenParams.rxParams.rxR0MaxDelayQ.push_back(static_cast<quint32>(floatArray[0][var])); |
|
|
|
scenParams.rxParams.rxR0MaxDelayQ.push_back(static_cast<quint32>(floatArray[var])); |
|
|
|
|
|
|
|
/**************** /registerParameters/pulseTypeNo ********************/ |
|
|
|
datasetBranch <float_t>("/registerParameters/pulseTypeNo", floatArray); |
|
|
|
scenParams.hwRegister.pulseTypeNumber = static_cast<quint8>(floatArray[0][0]); |
|
|
|
scenParams.hwRegister.pulseTypeNumber = static_cast<quint8>(floatArray[0]); |
|
|
|
|
|
|
|
/**************** /registerParameters/rxBeamformerTypeNo ********************/ |
|
|
|
datasetBranch <float_t>("/registerParameters/rxBeamformerTypeNo", floatArray); |
|
|
|
scenParams.hwRegister.rxBeamFormerTypeNumber = static_cast<quint8>(floatArray[0][0]); |
|
|
|
scenParams.hwRegister.rxBeamFormerTypeNumber = static_cast<quint8>(floatArray[0]); |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigTypeNo ********************/ |
|
|
|
datasetBranch <float_t>("/registerParameters/receiverConfigTypeNo", floatArray); |
|
|
|
scenParams.hwRegister.receiverConfigTypeNumber = static_cast<quint8>(floatArray[0][0]); |
|
|
|
scenParams.hwRegister.receiverConfigTypeNumber = static_cast<quint8>(floatArray[0]); |
|
|
|
|
|
|
|
/**************** /registerParameters/blendWeight ********************/ |
|
|
|
datasetBranch <float_t>("/registerParameters/blendWeight", floatArray); |
|
|
@ -2783,7 +2788,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
tempBlendWeight.clear(); |
|
|
|
for (quint32 j = 0; j < 512; j++) |
|
|
|
{ |
|
|
|
tempBlendWeight.push_back(floatArray[i][j]); |
|
|
|
tempBlendWeight.push_back(floatArray[j + i * 512]); |
|
|
|
} |
|
|
|
scenParams.hwRegister.blendWeight.push_back(tempBlendWeight); |
|
|
|
} |
|
|
@ -2792,39 +2797,39 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
datasetBranch <float_t>("/registerParameters/freqLut", floatArray); |
|
|
|
scenParams.hwRegister.freqLut.clear(); |
|
|
|
for (quint32 var = 0; var < 8; var++) |
|
|
|
scenParams.hwRegister.freqLut.push_back(floatArray[0][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[0][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[0][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[0][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[0][var]); |
|
|
|
scenParams.hwRegister.elementZPosition.push_back(floatArray[var]); |
|
|
|
|
|
|
|
/**************** /registerParameters/scenarioStartIndex ********************/ |
|
|
|
datasetBranch <float_t>("/registerParameters/scenarioStartIndex", floatArray); |
|
|
|
scenParams.hwRegister.scenarioStartIndex = static_cast<quint32>(floatArray[0][0]); |
|
|
|
scenParams.hwRegister.scenarioStartIndex = static_cast<quint32>(floatArray[0]); |
|
|
|
|
|
|
|
/**************** /registerParameters/scenarioEndIndex ********************/ |
|
|
|
datasetBranch <float_t>("/registerParameters/scenarioEndIndex", floatArray); |
|
|
|
scenParams.hwRegister.scenarioEndIndex = static_cast<quint32>(floatArray[0][0]); |
|
|
|
scenParams.hwRegister.scenarioEndIndex = static_cast<quint32>(floatArray[0]); |
|
|
|
|
|
|
|
/**************** /registerParameters/apodizationLut ********************/ |
|
|
|
datasetBranch <float_t>("/registerParameters/apodizationLut", floatArray); |
|
|
@ -2836,7 +2841,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
tempApodization.clear(); |
|
|
|
for (quint32 j = 0; j < 3057; j++) |
|
|
|
{ |
|
|
|
tempApodization.push_back(static_cast<quint32>(floatArray[i][j])); |
|
|
|
tempApodization.push_back(static_cast<quint32>(floatArray[j + i * 3057])); |
|
|
|
} |
|
|
|
scenParams.hwRegister.apodizationLut.push_back(tempApodization); |
|
|
|
} |
|
|
@ -2851,7 +2856,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
tempAtgc.clear(); |
|
|
|
for (quint32 j = 0; j < 128; j++) |
|
|
|
{ |
|
|
|
tempAtgc.push_back(static_cast<quint32>(floatArray[i][j])); |
|
|
|
tempAtgc.push_back(static_cast<quint32>(floatArray[j + i * 128])); |
|
|
|
} |
|
|
|
scenParams.hwRegister.atgcLut.push_back(tempAtgc); |
|
|
|
} |
|
|
@ -2866,7 +2871,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
tempLpf.clear(); |
|
|
|
for (quint32 j = 0; j < 48; j++) |
|
|
|
{ |
|
|
|
tempLpf.push_back(static_cast<quint32>(floatArray[i][j])); |
|
|
|
tempLpf.push_back(static_cast<quint32>(floatArray[j + i * 48])); |
|
|
|
} |
|
|
|
scenParams.hwRegister.lpfLut.push_back(tempLpf); |
|
|
|
} |
|
|
@ -2877,7 +2882,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|
|
|
{ |
|
|
|
halfPeriod.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
halfPeriod.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2887,7 +2892,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|
|
|
{ |
|
|
|
halfCycleNo.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
halfCycleNo.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/pulseProperties/pulseVoltSel ********************/ |
|
|
@ -2896,7 +2901,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|
|
|
{ |
|
|
|
pulseVoltSel.push_back(static_cast<bool>(floatArray[0][j])); |
|
|
|
pulseVoltSel.push_back(static_cast<bool>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/pulseProperties/startPhase ********************/ |
|
|
@ -2905,7 +2910,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|
|
|
{ |
|
|
|
startPhase.push_back(static_cast<bool>(floatArray[0][j])); |
|
|
|
startPhase.push_back(static_cast<bool>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/pulseProperties/dampingPulseWidth ********************/ |
|
|
@ -2914,7 +2919,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) |
|
|
|
{ |
|
|
|
dampingPulseWidth.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
dampingPulseWidth.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/pulseProperties ********************/ |
|
|
@ -2939,7 +2944,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) |
|
|
|
{ |
|
|
|
mla.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
mla.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/rxBeamformerProperties/lag ********************/ |
|
|
@ -2948,7 +2953,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) |
|
|
|
{ |
|
|
|
lag.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
lag.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/rxBeamformerProperties/apodizationSel ********************/ |
|
|
@ -2957,7 +2962,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) |
|
|
|
{ |
|
|
|
apodizationSel.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
apodizationSel.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/rxBeamformerProperties ********************/ |
|
|
@ -2980,7 +2985,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
receiverCfgMla.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
receiverCfgMla.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/lineMode ********************/ |
|
|
@ -2989,7 +2994,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
lineMode.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
lineMode.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/aTgcSel ********************/ |
|
|
@ -2998,7 +3003,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
aTgcSel.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
aTgcSel.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/stbEn ********************/ |
|
|
@ -3007,7 +3012,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
stbEn.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
stbEn.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/stb ********************/ |
|
|
@ -3016,7 +3021,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
stb.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
stb.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/subtractFilterEn ********************/ |
|
|
@ -3025,7 +3030,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
subtractFilterEn.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
subtractFilterEn.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/dcCancelEn ********************/ |
|
|
@ -3034,7 +3039,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
dcCancelEn.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
dcCancelEn.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/ncoFreqSel ********************/ |
|
|
@ -3043,7 +3048,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
ncoFreqSel.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
ncoFreqSel.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/lpfSel ********************/ |
|
|
@ -3052,7 +3057,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
lpfSel.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
lpfSel.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/absEn ********************/ |
|
|
@ -3061,7 +3066,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
absEn.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
absEn.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/focusNo ********************/ |
|
|
@ -3070,7 +3075,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
focusNo.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
focusNo.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties/lineFilterEn ********************/ |
|
|
@ -3079,35 +3084,35 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
lineFilterEn.push_back(static_cast<quint32>(floatArray[0][j])); |
|
|
|
lineFilterEn.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
// /**************** /registerParameters/receiverConfigProperties/dpeEn ********************/
|
|
|
|
// datasetBranch <float_t>("/registerParameters/receiverConfigProperties/dpeEn", floatArray);
|
|
|
|
// QList<quint32> dpeEn;
|
|
|
|
/**************** /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[0][j]));
|
|
|
|
// }
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
dpeEn.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
// /**************** /registerParameters/receiverConfigProperties/ddcEn ********************/
|
|
|
|
// datasetBranch <float_t>("/registerParameters/receiverConfigProperties/ddcEn", floatArray);
|
|
|
|
// QList<quint32> ddcEn;
|
|
|
|
/**************** /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[0][j]));
|
|
|
|
// }
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
ddcEn.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
// /**************** /registerParameters/receiverConfigProperties/wmfEn ********************/
|
|
|
|
// datasetBranch <float_t>("/registerParameters/receiverConfigProperties/wmfEn", floatArray);
|
|
|
|
// QList<quint32> wmfEn;
|
|
|
|
/**************** /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[0][j]));
|
|
|
|
// }
|
|
|
|
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) |
|
|
|
{ |
|
|
|
wmfEn.push_back(static_cast<quint32>(floatArray[j])); |
|
|
|
} |
|
|
|
|
|
|
|
/**************** /registerParameters/receiverConfigProperties ********************/ |
|
|
|
ReceiverConfig_t receiverCfgObj; |
|
|
@ -3117,11 +3122,11 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
{ |
|
|
|
receiverCfgObj.mla = receiverCfgMla.at(j); |
|
|
|
receiverCfgObj.stb = stb.at(j); |
|
|
|
receiverCfgObj.ddcn = 1; |
|
|
|
receiverCfgObj.ddcn = ddcEn.at(j); |
|
|
|
receiverCfgObj.absEn = absEn.at(j); |
|
|
|
receiverCfgObj.dpeEn = 0; |
|
|
|
receiverCfgObj.dpeEn = dpeEn.at(j); |
|
|
|
receiverCfgObj.stbEn = stbEn.at(j); |
|
|
|
receiverCfgObj.wmfEn = 0; |
|
|
|
receiverCfgObj.wmfEn = wmfEn.at(j); |
|
|
|
receiverCfgObj.lpfSel = lpfSel.at(j); |
|
|
|
receiverCfgObj.aTgcSel = aTgcSel.at(j); |
|
|
|
receiverCfgObj.focusNo = focusNo.at(j); |
|
|
@ -3134,13 +3139,7 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
scenParams.hwRegister.receiverConfigProps.push_back(receiverCfgObj); |
|
|
|
} |
|
|
|
|
|
|
|
// for (auto i=0; i<1; i++)
|
|
|
|
// {
|
|
|
|
// for(auto j=0; j<20; j++)
|
|
|
|
// {
|
|
|
|
// qDebug() << scenParams.hwRegister.atgcLut[3][j];
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
_trx.setScenario(scenParams); |
|
|
|
|
|
|
@ -3150,6 +3149,29 @@ void MainWindow::setScenario(const string &h5Path) |
|
|
|
qDebug() << e.what(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//QString saveFile = QFileDialog::getSaveFileName(this, "Save");
|
|
|
|
QString saveFile = "/home/hasis/Desktop/Develop_HardwareTest/saveSram.bin"; |
|
|
|
|
|
|
|
QFile sramFile(saveFile); |
|
|
|
|
|
|
|
if (!sramFile.open(QIODevice::WriteOnly)){ |
|
|
|
QMessageBox::warning(this, "Warning", "Cann't save the file: " + sramFile.errorString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
quint32 num(0); |
|
|
|
quint64 value(0); |
|
|
|
while (num < SRAM_SIZE/4) |
|
|
|
{ |
|
|
|
value = _usd->device->device.readLong(BAR_SRAM, static_cast<quint32>(num)); |
|
|
|
sramFile.write(Uint2ByteArray<quint64>(value)); |
|
|
|
num += sizeof (quint64); |
|
|
|
} |
|
|
|
|
|
|
|
sramFile.flush(); |
|
|
|
sramFile.close(); |
|
|
|
|
|
|
|
ui->l_scenFillingDone->setText("done"); |
|
|
|
changeLabelTextColor(ui->l_scenFillingDone, Qt::green); |
|
|
|
} |
|
|
@ -3183,8 +3205,6 @@ void MainWindow::on_btn_setScenario_clicked() |
|
|
|
} |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::on_btn_setAtgcMode_clicked() |
|
|
|
{ |
|
|
|
auto aTgcMode = ui->cb_aTgcMode->currentIndex(); |
|
|
@ -3197,6 +3217,18 @@ void MainWindow::on_btn_setAtgcMode_clicked() |
|
|
|
_trx.setAtgcMode(Manual, static_cast<quint16>(aTgcValue)); |
|
|
|
} |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
template<class T> |
|
|
|
QByteArray MainWindow::Uint2ByteArray(T data) |
|
|
|
{ |
|
|
|
QByteArray byte; |
|
|
|
QDataStream out (&byte, QIODevice::WriteOnly); |
|
|
|
out.setByteOrder(QDataStream::LittleEndian); |
|
|
|
out << data; |
|
|
|
|
|
|
|
return byte; |
|
|
|
} |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
/**************************************** EEPROM *************************************************/ |
|
|
|
/*************************************************************************************************/ |
|
|
|