From 54c20af840410cbcc4440ba1c7880b0db6f02a01 Mon Sep 17 00:00:00 2001 From: Arash Aletayeb Date: Tue, 8 Mar 2022 17:28:48 +0100 Subject: [PATCH] Improve software for adding doppler mode, include of: Atgc compensation is added. Index params in sram are changed and add some new features. Mla offsets register are added. Status vector is improved. Line filter is omitted. Frame lost address is changed. --- developHw.pro.user | 2 +- hdf5Scenario/hdf5Scenario.cpp | 50 +++++--- .../TrxBoardUtils/TrxBoardStructures.h | 2 +- .../core/lowLevelApi/register/dsp/Dsp.h | 2 +- .../register/dsp/registerDefinition/AtgcLut.h | 12 +- .../core/lowLevelApi/register/misc/Misc.h | 12 +- .../misc/registerDefinition/StatusVector.h | 118 ++++++++++-------- .../register/sram/registerDefinition/Index.h | 2 +- .../hardware/device/SonoDeviceConstant.h | 2 +- mainwindow.cpp | 104 ++++++++------- mainwindow.h | 2 + mainwindow.ui | 68 ++++++++-- .../core/lowLevelApi/register/Register.cpp | 2 +- .../core/lowLevelApi/register/dsp/Dsp.cpp | 4 +- .../core/lowLevelApi/register/misc/Misc.cpp | 12 +- .../core/scenario/B/BModeScenario.cpp | 20 +-- .../core/scenario/Bm/BmModeScenario.cpp | 14 +-- 17 files changed, 268 insertions(+), 160 deletions(-) diff --git a/developHw.pro.user b/developHw.pro.user index 7c75ee7..24a6304 100644 --- a/developHw.pro.user +++ b/developHw.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/hdf5Scenario/hdf5Scenario.cpp b/hdf5Scenario/hdf5Scenario.cpp index a11cdbd..ff375da 100644 --- a/hdf5Scenario/hdf5Scenario.cpp +++ b/hdf5Scenario/hdf5Scenario.cpp @@ -19,9 +19,9 @@ void Hdf5::hdf5Path(const string &h5Path) void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams) { - /****************** /sramParameters/frameType ******************/ - datasetBranch ("/sramParameters/frameType", floatArray); - scenParams.frameType = static_cast(floatArray[0]); +// /****************** /sramParameters/frameType ******************/ +// datasetBranch ("/sramParameters/frameType", floatArray); +// scenParams.frameType = static_cast(floatArray[0]); /****************** /sramParameters/totalTxShotNo ******************/ datasetBranch ("/sramParameters/totalTxShotNo", floatArray); @@ -668,28 +668,42 @@ void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams) } -// /**************** /registerParameters/aTgcLut ********************/ -// datasetBranch ("/registerParameters/aTgcLut", floatArray); -// QList atgc; + /************ /registerParameters/aTgcParameters/aTgcLut ****************/ + datasetBranch ("/registerParameters/aTgcParameters/aTgcLut", floatArray); + QList> atgcLut; -// for (quint32 j = 0; j < 128; j++) -// { -// atgc.push_back(static_cast(floatArray[j + i * 128])); -// } + for (quint32 i = 0; i < 4; i++) + { + QList temp; + for (quint32 j = 0; j < 256; j++) + { + temp.push_back(static_cast(floatArray[j + i * 256])); + } + atgcLut.push_back(temp); + } - /**************** /registerParameters/aTgcLut ********************/ - datasetBranch ("/registerParameters/aTgcLut", floatArray); - prbDepParams.prbDepParams.atgcLut.clear(); - QList tempAtgc; + /******* /registerParameters/aTgcParameters/aTgcCompensationLut *********/ + datasetBranch ("/registerParameters/aTgcParameters/aTgcCompensationLut", floatArray); + QList> atgcCompensationLut; for (quint32 i = 0; i < 4; i++) { - tempAtgc.clear(); - for (quint32 j = 0; j < 128; j++) + QVector temp; + for (quint32 j = 0; j < 256; j++) { - tempAtgc.push_back(static_cast(floatArray[j + i * 128])); + temp.push_back(floatArray[j + i * 256]); } - prbDepParams.prbDepParams.atgcLut.push_back(tempAtgc); + atgcCompensationLut.push_back(temp); + } + + /******************* /registerParameters/aTgc **********************/ + for (qint8 i = 0; i < 4; i++) + { + Atgc atgcObj; + atgcObj.clear(); + atgcObj.atgcLut = atgcLut.at(i); + atgcObj.atgcCompensateLut = atgcCompensationLut.at(i); + prbDepParams.prbDepParams.atgcLut.push_back(atgcObj); } /**************** /registerParameters/lpfLut ********************/ diff --git a/include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h b/include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h index 76c586e..1c84700 100644 --- a/include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h +++ b/include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h @@ -57,7 +57,7 @@ struct ScenPrbDepHwRegister { QList lpfScaleCoeff; QList> lpfLut; - QList atgcLut; + QList atgcLut; QList> apodizationLut; }; diff --git a/include/model/hardware/core/lowLevelApi/register/dsp/Dsp.h b/include/model/hardware/core/lowLevelApi/register/dsp/Dsp.h index 6de642f..f59e227 100644 --- a/include/model/hardware/core/lowLevelApi/register/dsp/Dsp.h +++ b/include/model/hardware/core/lowLevelApi/register/dsp/Dsp.h @@ -54,7 +54,7 @@ public: void noiseReject(quint32& rejectValue) const; void atgcMode (eAtgcMode mode, quint16 value) const; void dtgcLut (QList& dtgcLut) const; - void atgcLut (QList atgcLut) const; + void atgcLut (QList atgcLut) const; void lpfLut (QList>& lpfLut) const; }; diff --git a/include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/AtgcLut.h b/include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/AtgcLut.h index 50eadf6..9bd594a 100644 --- a/include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/AtgcLut.h +++ b/include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/AtgcLut.h @@ -8,11 +8,11 @@ #undef BAR #define ATGC_LUT_MASK 0x00000FFF -#define ATGC_COMPENSATE_LUT_MASK 0xFFFF0FFF +#define ATGC_COMPENSATE_LUT_MASK 0xFFFF0000 #define BAR 0 #define OFFSET 0x85000 -#define LENGTH 128U +#define LENGTH 256U struct Atgc { @@ -28,12 +28,12 @@ struct Atgc class AtgcLut : public Register { private: - Atgc* _atgc; + Atgc _atgc; QVector _atgcCompensateLutQ; void prepareData(quint32 index) override { - atgcLut->setValue(_atgc->atgcLut[static_cast(index)]); + atgcLut->setValue(_atgc.atgcLut[static_cast(index)]); atgcCompensateLut->setValue(_atgcCompensateLutQ[static_cast(index)]); } @@ -41,10 +41,10 @@ public: Field* atgcLut; Field* atgcCompensateLut; - void setAtgcLut (Atgc* atgc) + void setAtgcLut (Atgc atgc) { _atgc = atgc; - _atgcCompensateLutQ = Calculation::qntzr(_atgc->atgcCompensateLut, 0, 16, 8, 0, true, false); + _atgcCompensateLutQ = Calculation::qntzr(_atgc.atgcCompensateLut, 0, 16, 8, 0, true, false); } AtgcLut(SonoDevice* device) : Register(BAR, OFFSET, device, LENGTH) diff --git a/include/model/hardware/core/lowLevelApi/register/misc/Misc.h b/include/model/hardware/core/lowLevelApi/register/misc/Misc.h index fe88960..f3544af 100644 --- a/include/model/hardware/core/lowLevelApi/register/misc/Misc.h +++ b/include/model/hardware/core/lowLevelApi/register/misc/Misc.h @@ -17,10 +17,10 @@ struct StatusVec bool sram2ParityErr; bool mpsErr; bool scenPriErr; - bool scenGtErr; + bool scenSyncAckErr; bool scenSramErr; - bool syncFifoErr; - bool syncPointErr; + bool mlaSyncFifoErr; + bool mlaSyncPointErr; bool dintrlvFifoErr; bool dintrlvPointErr; bool pulserThd; @@ -28,7 +28,11 @@ struct StatusVec bool pgErr; bool probeDisconnectErr; bool fanFault; - bool frameLost; + bool dintrlvFrameLost; + bool dintrlvOffsetAddrErr; + bool dintrlvSramOver4MErr; + bool ddcLpfReloadErr; + bool adcFlagSyncErr; bool emulDmaTransferErr; bool dmaCtrlTransferErr; }; diff --git a/include/model/hardware/core/lowLevelApi/register/misc/registerDefinition/StatusVector.h b/include/model/hardware/core/lowLevelApi/register/misc/registerDefinition/StatusVector.h index 3e7d6cd..8781025 100644 --- a/include/model/hardware/core/lowLevelApi/register/misc/registerDefinition/StatusVector.h +++ b/include/model/hardware/core/lowLevelApi/register/misc/registerDefinition/StatusVector.h @@ -7,24 +7,28 @@ #undef BAR #define PROBE_DETECTION_INTERRUPT_MASK 0x00000001 -#define SRAM_1_PARITY_Err_MASK 0x00000002 -#define SRAM_2_PARITY_Err_MASK 0x00000004 -#define MPS_Err_MASK 0x00000008 -#define SCEN_RPI_Err_MASK 0x00000010 -#define SCEN_GT_Err_MASK 0x00000020 -#define SCEN_SRAM_Err_MASK 0x00000040 -#define SYNC_FIFO_Err_MASK 0x00000080 -#define SYNC_POINT_Err_MASK 0x00000100 -#define DINTRLV_FIFO_Err_MASK 0x00000200 -#define DINTRLV_POINT_Err_MASK 0x00000400 +#define SRAM_1_PARITY_ERR_MASK 0x00000002 +#define SRAM_2_PARITY_ERR_MASK 0x00000004 +#define MPS_ERR_MASK 0x00000008 +#define SCEN_RPI_ERR_MASK 0x00000010 +#define SCEN_SYNC_ACK_ERR_MASK 0x00000020 +#define SCEN_SRAM_ERR_MASK 0x00000040 +#define MLA_SYNC_FIFO_ERR_MASK 0x00000080 +#define MLA_SYNC_POINT_ERR_MASK 0x00000100 +#define DINTRLV_FIFO_ERR_MASK 0x00000200 +#define DINTRLV_POINT_ERR_MASK 0x00000400 #define PULSER_THD_MASK 0x00000800 -#define THERMAL_Err_MASK 0x00001000 -#define PG_Err_MASK 0x00002000 -#define PROBE_DISCONNECT_Err_MASK 0x00004000 +#define THERMAL_ERR_MASK 0x00001000 +#define PG_ERR_MASK 0x00002000 +#define PROBE_DISCONNECT_ERR_MASK 0x00004000 #define FAN_FAULT_MASK 0x00008000 -#define FRAME_LOST_MASK 0x00020000 -#define EMUL_DMA_TRANSFER_Err_MASK 0x40000000 -#define DMA_CTRL_TRANSFER_Err_MASK 0x80000000 +#define DINTRLV_FRAME_LOST_MASK 0x00020000 +#define DINTRLV_OFFSET_ADDR_ERR_MASK 0x00040000 +#define DINTRLV_SRAM_OVER_4M_ERR_MASK 0x00080000 +#define DDC_LPF_RELOAD_ERR_MASK 0x00100000 +#define ADC_FLAG_SYNC_ERR_MASK 0x00200000 +#define EMUL_DMA_TRANSFER_ERR_MASK 0x40000000 +#define DMA_CTRL_TRANSFER_ERR_MASK 0x80000000 #define BAR 0U #define OFFSET 0x0 @@ -37,10 +41,10 @@ public: Field* sram2ParityErr; Field* mpsErr; Field* scenPriErr; - Field* scenGtErr; + Field* scenSyncAckErr; Field* scenSramErr; - Field* syncFifoErr; - Field* syncPointErr; + Field* mlaSyncFifoErr; + Field* mlaSyncPointErr; Field* dintrlvFifoErr; Field* dintrlvPointErr; Field* pulserThd; @@ -48,52 +52,64 @@ public: Field* pgErr; Field* probeDisconnectErr; Field* fanFault; - Field* frameLost; + Field* dintrlvFrameLost; + Field* dintrlvOffsetAddrErr; + Field* dintrlvSramOver4MErr; + Field* ddcLpfReloadErr; + Field* adcFlagSyncErr; Field* emulDmaTransferErr; Field* dmaCtrlTransferErr; StatusVector(SonoDevice* device) : Register(BAR, OFFSET, device) { ADD_UNSIGNED_FIELD(probeDetChanInterrupt, PROBE_DETECTION_INTERRUPT_MASK); - ADD_UNSIGNED_FIELD(sram1ParityErr, SRAM_1_PARITY_Err_MASK); - ADD_UNSIGNED_FIELD(sram2ParityErr, SRAM_2_PARITY_Err_MASK); - ADD_UNSIGNED_FIELD(mpsErr, MPS_Err_MASK); - ADD_UNSIGNED_FIELD(scenPriErr, SCEN_RPI_Err_MASK); - ADD_UNSIGNED_FIELD(scenGtErr, SCEN_GT_Err_MASK); - ADD_UNSIGNED_FIELD(scenSramErr, SCEN_SRAM_Err_MASK); - ADD_UNSIGNED_FIELD(syncFifoErr, SYNC_FIFO_Err_MASK); - ADD_UNSIGNED_FIELD(syncPointErr, SYNC_POINT_Err_MASK); - ADD_UNSIGNED_FIELD(dintrlvFifoErr, DINTRLV_FIFO_Err_MASK); - ADD_UNSIGNED_FIELD(dintrlvPointErr, DINTRLV_POINT_Err_MASK); + ADD_UNSIGNED_FIELD(sram1ParityErr, SRAM_1_PARITY_ERR_MASK); + ADD_UNSIGNED_FIELD(sram2ParityErr, SRAM_2_PARITY_ERR_MASK); + ADD_UNSIGNED_FIELD(mpsErr, MPS_ERR_MASK); + ADD_UNSIGNED_FIELD(scenPriErr, SCEN_RPI_ERR_MASK); + ADD_UNSIGNED_FIELD(scenSyncAckErr, SCEN_SYNC_ACK_ERR_MASK); + ADD_UNSIGNED_FIELD(scenSramErr, SCEN_SRAM_ERR_MASK); + ADD_UNSIGNED_FIELD(mlaSyncFifoErr, MLA_SYNC_FIFO_ERR_MASK); + ADD_UNSIGNED_FIELD(mlaSyncPointErr, MLA_SYNC_POINT_ERR_MASK); + ADD_UNSIGNED_FIELD(dintrlvFifoErr, DINTRLV_FIFO_ERR_MASK); + ADD_UNSIGNED_FIELD(dintrlvPointErr, DINTRLV_POINT_ERR_MASK); ADD_UNSIGNED_FIELD(pulserThd, PULSER_THD_MASK); - ADD_UNSIGNED_FIELD(thermalErr, THERMAL_Err_MASK); - ADD_UNSIGNED_FIELD(pgErr, PG_Err_MASK); - ADD_UNSIGNED_FIELD(probeDisconnectErr, PROBE_DISCONNECT_Err_MASK); + ADD_UNSIGNED_FIELD(thermalErr, THERMAL_ERR_MASK); + ADD_UNSIGNED_FIELD(pgErr, PG_ERR_MASK); + ADD_UNSIGNED_FIELD(probeDisconnectErr, PROBE_DISCONNECT_ERR_MASK); ADD_UNSIGNED_FIELD(fanFault, FAN_FAULT_MASK); - ADD_UNSIGNED_FIELD(frameLost, FRAME_LOST_MASK); - ADD_UNSIGNED_FIELD(emulDmaTransferErr, EMUL_DMA_TRANSFER_Err_MASK); - ADD_UNSIGNED_FIELD(dmaCtrlTransferErr, DMA_CTRL_TRANSFER_Err_MASK); + ADD_UNSIGNED_FIELD(dintrlvFrameLost, DINTRLV_FRAME_LOST_MASK); + ADD_UNSIGNED_FIELD(dintrlvOffsetAddrErr, DINTRLV_OFFSET_ADDR_ERR_MASK); + ADD_UNSIGNED_FIELD(dintrlvSramOver4MErr, DINTRLV_SRAM_OVER_4M_ERR_MASK); + ADD_UNSIGNED_FIELD(ddcLpfReloadErr, DDC_LPF_RELOAD_ERR_MASK); + ADD_UNSIGNED_FIELD(adcFlagSyncErr, ADC_FLAG_SYNC_ERR_MASK); + ADD_UNSIGNED_FIELD(emulDmaTransferErr, EMUL_DMA_TRANSFER_ERR_MASK); + ADD_UNSIGNED_FIELD(dmaCtrlTransferErr, DMA_CTRL_TRANSFER_ERR_MASK); } }; #undef PROBE_DETECTION_INTERRUPT_MASK -#undef SRAM_1_PARITY_Err_MASK -#undef SRAM_2_PARITY_Err_MASK -#undef MPS_Err_MASK -#undef SCEN_RPI_Err_MASK -#undef SCEN_GT_Err_MASK -#undef SCEN_SRAM_Err_MASK -#undef SYNC_FIFO_Err_MASK -#undef SYNC_POINT_Err_MASK -#undef DINTRLV_FIFO_Err_MASK -#undef DINTRLV_POINT_Err_MASK +#undef SRAM_1_PARITY_ERR_MASK +#undef SRAM_2_PARITY_ERR_MASK +#undef MPS_ERR_MASK +#undef SCEN_RPI_ERR_MASK +#undef SCEN_SYNC_ACK_ERR_MASK +#undef SCEN_SRAM_ERR_MASK +#undef MLA_SYNC_FIFO_ERR_MASK +#undef MLA_SYNC_POINT_ERR_MASK +#undef DINTRLV_FIFO_ERR_MASK +#undef DINTRLV_POINT_ERR_MASK #undef PULSER_THD_MASK -#undef THERMAL_Err_MASK -#undef PG_Err_MASK -#undef PROBE_DISCONNECT_Err_MASK +#undef THERMAL_ERR_MASK +#undef PG_ERR_MASK +#undef PROBE_DISCONNECT_ERR_MASK #undef FAN_FAULT_MASK -#undef FRAME_LOST_MASK -#undef EMUL_DMA_TRANSFER_Err_MASK +#undef DINTRLV_FRAME_LOST_MASK +#undef DINTRLV_OFFSET_ADDR_ERR_MASK +#undef DINTRLV_SRAM_OVER_4M_ERR_MASK +#undef DDC_LPF_RELOAD_ERR_MASK +#undef ADC_FLAG_SYNC_ERR_MASK +#undef EMUL_DMA_TRANSFER_ERR_MASK #undef DMA_CTRL_TRANSFER_Err_MASK #undef BAR diff --git a/include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/Index.h b/include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/Index.h index 0ef25ea..4810242 100644 --- a/include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/Index.h +++ b/include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/Index.h @@ -80,7 +80,7 @@ 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(startOfSubBatch, START_OF_SUB_BATCH_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 ); diff --git a/include/model/hardware/device/SonoDeviceConstant.h b/include/model/hardware/device/SonoDeviceConstant.h index d233475..a2b3f9f 100644 --- a/include/model/hardware/device/SonoDeviceConstant.h +++ b/include/model/hardware/device/SonoDeviceConstant.h @@ -20,7 +20,7 @@ #define DMA_CTRL_REG 0x00000008 #define START_COMMAND 0x00000001 -#define STOP_COMMAND 0x11111110 +#define STOP_COMMAND 0xFFFFFFFE #define COUNTER_MASK 0x0000001F diff --git a/mainwindow.cpp b/mainwindow.cpp index 8d17722..8b14623 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -447,7 +447,7 @@ void MainWindow::timeout() changeLabelTextColor(ui->l_mps, color); delay(1); - bool frameLost = _vec->frameLost; + bool frameLost = _vec->dintrlvFrameLost; ui->l_frameLost->setText(QVariant(frameLost).toString()); color = frameLost ? Qt::red : Qt::green; changeLabelTextColor(ui->l_frameLost, color); @@ -465,10 +465,10 @@ void MainWindow::timeout() changeLabelTextColor(ui->l_pulserThd, color); delay(1); - bool scenGtErr = _vec->scenGtErr; - ui->l_scenGt->setText(QVariant(scenGtErr).toString()); - color = scenGtErr ? Qt::red : Qt::green; - changeLabelTextColor(ui->l_scenGt, color); + bool scenSyncAckErr = _vec->scenSyncAckErr; + ui->l_scenSyncAck->setText(QVariant(scenSyncAckErr).toString()); + color = scenSyncAckErr ? Qt::red : Qt::green; + changeLabelTextColor(ui->l_scenSyncAck, color); delay(1); bool scenPriErr = _vec->scenPriErr; @@ -489,13 +489,13 @@ void MainWindow::timeout() changeLabelTextColor(ui->l_scenSram, color); delay(1); - bool syncFifoErr = _vec->syncFifoErr; + bool syncFifoErr = _vec->mlaSyncFifoErr; ui->l_syncFifo->setText(QVariant(syncFifoErr).toString()); color = syncFifoErr ? Qt::red : Qt::green; changeLabelTextColor(ui->l_syncFifo, color); delay(1); - bool syncPointErr = _vec->syncPointErr; + bool syncPointErr = _vec->mlaSyncPointErr; ui->l_syncPoint->setText(QVariant(syncPointErr).toString()); color = syncPointErr ? Qt::red : Qt::green; changeLabelTextColor(ui->l_syncPoint, color); @@ -549,6 +549,30 @@ void MainWindow::timeout() changeLabelTextColor(ui->l_prbDetChg, color); delay(1); + bool adcFlagSyncErr = _vec->adcFlagSyncErr; + ui->l_adcFlagSync->setText(QVariant(adcFlagSyncErr).toString()); + color = adcFlagSyncErr ? Qt::red : Qt::green; + changeLabelTextColor(ui->l_adcFlagSync, color); + delay(1); + + bool ddcLpfReloadErr = _vec->ddcLpfReloadErr; + ui->l_ddcLpfReload->setText(QVariant(ddcLpfReloadErr).toString()); + color = ddcLpfReloadErr ? Qt::red : Qt::green; + changeLabelTextColor(ui->l_ddcLpfReload, color); + delay(1); + + bool dintrlvOffsetAddrErr = _vec->dintrlvOffsetAddrErr; + ui->l_dintrlvOffsetAddr->setText(QVariant(dintrlvOffsetAddrErr).toString()); + color = dintrlvOffsetAddrErr ? Qt::red : Qt::green; + changeLabelTextColor(ui->l_dintrlvOffsetAddr, color); + delay(1); + + bool dintrlvSramOver4MErr = _vec->dintrlvSramOver4MErr; + ui->l_dintrlvSramOver4M->setText(QVariant(dintrlvSramOver4MErr).toString()); + color = dintrlvSramOver4MErr ? Qt::red : Qt::green; + changeLabelTextColor(ui->l_dintrlvSramOver4M, color); + delay(1); + if(_statusLogEn) { emit statusLogPS(_usd->readWord(0, 0)); @@ -2482,22 +2506,9 @@ void MainWindow::setScenario(const QString& h5Path) throw SonoException("No file is selected."); } - AfeConfig _afeConfig; - _afeConfig.lowNf = lowNfDisable; - _afeConfig.lnaHpf = lnaHpfEnable; - _afeConfig.pgaHpf = pgaHpfEnable; - _afeConfig.lpfProg = LpfProg10MHz; - _afeConfig.pgaGain = pgaGain30db; - _afeConfig.pgaClamp = pgaClampDisable; - _afeConfig.powModes = lowNoise; - _afeConfig.actTermEn = actTermEnable; - _afeConfig.lnaGainGbl = lnaGainGbl24db; - _afeConfig.lnaHpfProg = lnaHpfProg200Khz; - _afeConfig.gblActiveTerm = gblActiveTerm50; - _afeConfig.pgaClampLevel = minus2dbfs; - _afeConfig.activeTermIndRes = actTermIndRes0; - _afeConfig.activeTermIndResEn = actTermIndResDisable; - _afeConfig.inputClampLevel = inputClampLvlAuto; + AfeConfig afeConfigObj; + + afeConfig(afeConfigObj); Hdf5 hdf; ScenGenHardwareOutput_t scenParams; @@ -2509,14 +2520,14 @@ void MainWindow::setScenario(const QString& h5Path) hdf.scenarioRead(scenParams); hdf.prbDependParamsRead(prbDepParams); - prbDepParams.afeCfg = _afeConfig; + prbDepParams.afeCfg = afeConfigObj; stbLut = hdf.stbRead(); - lineFilterLut = hdf.lineFilterRead(); + //lineFilterLut = hdf.lineFilterRead(); _trx.setScenario(scenParams); _trx.setProbeDependParams(prbDepParams); - _trx.setLineFilterCoefficient(lineFilterLut); + //_trx.setLineFilterCoefficient(lineFilterLut); _trx.setStbCoefficient(stbLut); } catch(SonoException& e) @@ -3211,25 +3222,32 @@ void MainWindow::on_btn_afeRead_clicked() } /*************************************************************************************************/ +void MainWindow::afeConfig(AfeConfig &afeConfig) +{ + afeConfig.lowNf = lowNfDisable; + afeConfig.lnaHpf = lnaHpfEnable; + afeConfig.pgaHpf = pgaHpfEnable; + afeConfig.lpfProg = LpfProg10MHz; + afeConfig.pgaGain = pgaGain30db; + afeConfig.pgaClamp = pgaClampDisable; + afeConfig.powModes = lowNoise; + afeConfig.actTermEn = actTermEnable; + afeConfig.lnaGainGbl = lnaGainGbl24db; + afeConfig.lnaHpfProg = lnaHpfProg200Khz; + afeConfig.gblActiveTerm = gblActiveTerm50; + afeConfig.pgaClampLevel = minus2dbfs; + afeConfig.activeTermIndRes = actTermIndRes0; + afeConfig.activeTermIndResEn = actTermIndResDisable; + afeConfig.inputClampLevel = inputClampLvlAuto; +} + void MainWindow::setAfeConfig() { - AfeConfig _afeConfig; - _afeConfig.lowNf = lowNfDisable; - _afeConfig.lnaHpf = lnaHpfEnable; - _afeConfig.pgaHpf = pgaHpfEnable; - _afeConfig.lpfProg = LpfProg10MHz; - _afeConfig.pgaGain = pgaGain30db; - _afeConfig.pgaClamp = pgaClampDisable; - _afeConfig.powModes = lowNoise; - _afeConfig.actTermEn = actTermEnable; - _afeConfig.lnaGainGbl = lnaGainGbl24db; - _afeConfig.lnaHpfProg = lnaHpfProg200Khz; - _afeConfig.gblActiveTerm = gblActiveTerm50; - _afeConfig.pgaClampLevel = minus2dbfs; - _afeConfig.activeTermIndRes = actTermIndRes0; - _afeConfig.activeTermIndResEn = actTermIndResDisable; - _afeConfig.inputClampLevel = inputClampLvlAuto; - _trx.setAfeConfig(_afeConfig); + AfeConfig afeConfigObj; + + afeConfig(afeConfigObj); + + _trx.setAfeConfig(afeConfigObj); } /*************************************************************************************************/ diff --git a/mainwindow.h b/mainwindow.h index cef90a1..d5aa767 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -152,6 +152,8 @@ private: void changeLabelTextColor(QLabel* label, QColor color); + void afeConfig (AfeConfig &afeConfig); + void setAfeConfig (void); void logPcie(QString logPath, quint32 logCount, QLCDNumber* lcdCounter); diff --git a/mainwindow.ui b/mainwindow.ui index e348689..31b377f 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -4092,9 +4092,9 @@ - + - <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">Scen GT</span></p></body></html> + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">Scen Sync Ack</span></p></body></html> false @@ -4168,7 +4168,7 @@ - + @@ -4209,6 +4209,60 @@ + + + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">Frame Lost</span></p></body></html> + + + false + + + + + + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">D Interleave Offset Addr</span></p></body></html> + + + false + + + + + + + + + + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">D Interleave SRAM Over 4M</span></p></body></html> + + + false + + + + + + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">DDC LPF Reload</span></p></body></html> + + + false + + + + + + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">ADC Flag Sync</span></p></body></html> + + + false + + + @@ -4229,14 +4283,10 @@ - - - - - + - <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">Frame Lost</span></p></body></html> + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">Reserved</span></p></body></html> false diff --git a/src/model/hardware/core/lowLevelApi/register/Register.cpp b/src/model/hardware/core/lowLevelApi/register/Register.cpp index 8395d83..f916571 100644 --- a/src/model/hardware/core/lowLevelApi/register/Register.cpp +++ b/src/model/hardware/core/lowLevelApi/register/Register.cpp @@ -107,7 +107,7 @@ void Register::updateArray(bool isVariable, quint16 arrayLength) //update arr value |= _fields[j]->getRegisterWriteValue(); } - _device->device.writeWord(_bar, _offset + i * 4, value); + _device->device.writeWord(_bar, _offset + i * 4, value); } } diff --git a/src/model/hardware/core/lowLevelApi/register/dsp/Dsp.cpp b/src/model/hardware/core/lowLevelApi/register/dsp/Dsp.cpp index e371f17..e8050da 100644 --- a/src/model/hardware/core/lowLevelApi/register/dsp/Dsp.cpp +++ b/src/model/hardware/core/lowLevelApi/register/dsp/Dsp.cpp @@ -112,11 +112,11 @@ void Dsp::dtgcLut(QList &dtgcLut) const this->_dtgcLut->updateArray(); } -void Dsp::atgcLut(QList atgcLut) const +void Dsp::atgcLut(QList atgcLut) const { quint32 baseOffset = this->_atgcLut->getCurrentOffset(); - foreach (Atgc *tempObj, atgcLut) + foreach (Atgc tempObj, atgcLut) { this->_atgcLut->setAtgcLut(tempObj); this->_atgcLut->updateArray(); diff --git a/src/model/hardware/core/lowLevelApi/register/misc/Misc.cpp b/src/model/hardware/core/lowLevelApi/register/misc/Misc.cpp index e97f861..1b6153e 100644 --- a/src/model/hardware/core/lowLevelApi/register/misc/Misc.cpp +++ b/src/model/hardware/core/lowLevelApi/register/misc/Misc.cpp @@ -46,21 +46,25 @@ void Misc::getStatusVector(StatusVec *status) const status->pgErr = ((this->_status->pgErr->getValue()) != 0); status->mpsErr = ((this->_status->mpsErr->getValue()) != 0); status->fanFault = ((this->_status->fanFault->getValue()) != 0); - status->frameLost = ((this->_status->frameLost->getValue()) != 0); status->pulserThd = ((this->_status->pulserThd->getValue()) != 0); - status->scenGtErr = ((this->_status->scenGtErr->getValue()) != 0); status->scenPriErr = ((this->_status->scenPriErr->getValue()) != 0); status->thermalErr = ((this->_status->thermalErr->getValue()) != 0); - status->syncFifoErr = ((this->_status->syncFifoErr->getValue()) != 0); status->scenSramErr = ((this->_status->scenSramErr->getValue()) != 0); - status->syncPointErr = ((this->_status->syncPointErr->getValue()) != 0); + status->scenSyncAckErr = ((this->_status->scenSyncAckErr->getValue()) != 0); + status->mlaSyncFifoErr = ((this->_status->mlaSyncFifoErr->getValue()) != 0); status->dintrlvFifoErr = ((this->_status->dintrlvFifoErr->getValue()) != 0); + status->adcFlagSyncErr = ((this->_status->adcFlagSyncErr->getValue()) != 0); status->sram1ParityErr = ((this->_status->sram1ParityErr->getValue()) != 0); status->sram2ParityErr = ((this->_status->sram2ParityErr->getValue()) != 0); + status->mlaSyncPointErr = ((this->_status->mlaSyncPointErr->getValue()) != 0); + status->ddcLpfReloadErr = ((this->_status->ddcLpfReloadErr->getValue()) != 0); status->dintrlvPointErr = ((this->_status->dintrlvPointErr->getValue()) != 0); + status->dintrlvFrameLost = ((this->_status->dintrlvFrameLost->getValue()) != 0); status->dmaCtrlTransferErr = ((this->_status->dmaCtrlTransferErr->getValue()) != 0); status->emulDmaTransferErr = ((this->_status->emulDmaTransferErr->getValue()) != 0); status->probeDisconnectErr = ((this->_status->probeDisconnectErr->getValue()) != 0); + status->dintrlvOffsetAddrErr = ((this->_status->dintrlvOffsetAddrErr->getValue()) != 0); + status->dintrlvSramOver4MErr = ((this->_status->dintrlvSramOver4MErr->getValue()) != 0); status->probeDetChanInterrupt = ((this->_status->probeDetChanInterrupt->getValue()) != 0); } diff --git a/src/model/scenarioGenerator/core/scenario/B/BModeScenario.cpp b/src/model/scenarioGenerator/core/scenario/B/BModeScenario.cpp index 2f8ceb5..a3f1856 100644 --- a/src/model/scenarioGenerator/core/scenario/B/BModeScenario.cpp +++ b/src/model/scenarioGenerator/core/scenario/B/BModeScenario.cpp @@ -64,9 +64,9 @@ void BModeScenario::calcIndexParameters() hardwareOuput.indexParams.receiverConfigurationIndex.clear(); hardwareOuput.indexParams.shotPropertiesIndex.clear(); hardwareOuput.indexParams.firstLineInFrame.clear(); - hardwareOuput.indexParams.lastLineInFrame.clear(); - hardwareOuput.indexParams.dLineNum.clear(); - hardwareOuput.indexParams.dEnsembleNum.clear(); +// hardwareOuput.indexParams.lastLineInFrame.clear(); +// hardwareOuput.indexParams.dLineNum.clear(); +// hardwareOuput.indexParams.dEnsembleNum.clear(); auto criFrameNumber = softwareOutput.scenarioDependent.criFrameNumber; auto frameLineNumber = frameParams[0]->txLineNumber * criFrameNumber; @@ -112,15 +112,15 @@ void BModeScenario::calcIndexParameters() hardwareOuput.indexParams.firstLineInFrame = Calculation::repMat(hardwareOuput.indexParams.firstLineInFrame, criFrameNumber); - hardwareOuput.indexParams.lastLineInFrame.append( - Calculation::zeros(frameShotNumber - 1)); - hardwareOuput.indexParams.lastLineInFrame.append(Calculation::ones(1)); +// hardwareOuput.indexParams.lastLineInFrame.append( +// Calculation::zeros(frameShotNumber - 1)); +// hardwareOuput.indexParams.lastLineInFrame.append(Calculation::ones(1)); - hardwareOuput.indexParams.lastLineInFrame = - Calculation::repMat(hardwareOuput.indexParams.lastLineInFrame, criFrameNumber); +// hardwareOuput.indexParams.lastLineInFrame = +// Calculation::repMat(hardwareOuput.indexParams.lastLineInFrame, criFrameNumber); - hardwareOuput.indexParams.dLineNum = Calculation::zeros(totalTxShotNumber); - hardwareOuput.indexParams.dEnsembleNum = Calculation::zeros(totalTxShotNumber); +// hardwareOuput.indexParams.dLineNum = Calculation::zeros(totalTxShotNumber); +// hardwareOuput.indexParams.dEnsembleNum = Calculation::zeros(totalTxShotNumber); } /*************************************************************************************************/ diff --git a/src/model/scenarioGenerator/core/scenario/Bm/BmModeScenario.cpp b/src/model/scenarioGenerator/core/scenario/Bm/BmModeScenario.cpp index 5493ace..b33d44b 100644 --- a/src/model/scenarioGenerator/core/scenario/Bm/BmModeScenario.cpp +++ b/src/model/scenarioGenerator/core/scenario/Bm/BmModeScenario.cpp @@ -265,7 +265,7 @@ void BmModeScenario::calcIndexParameters() hardwareOuput.indexParams.shotPropertiesIndex.clear(); hardwareOuput.indexParams.firstLineInFrame.clear(); - hardwareOuput.indexParams.lastLineInFrame.clear(); +// hardwareOuput.indexParams.lastLineInFrame.clear(); hardwareOuput.indexParams.firstLineInFrame.push_back(true); @@ -275,7 +275,7 @@ void BmModeScenario::calcIndexParameters() { hardwareOuput.indexParams.shotPropertiesIndex.push_back(1); hardwareOuput.indexParams.firstLineInFrame.push_back(false); - hardwareOuput.indexParams.lastLineInFrame.push_back(false); +// hardwareOuput.indexParams.lastLineInFrame.push_back(false); } else { @@ -291,14 +291,14 @@ void BmModeScenario::calcIndexParameters() hardwareOuput.indexParams.firstLineInFrame.append( Calculation::repElem({false}, bTxShotNumber - 1)); - hardwareOuput.indexParams.lastLineInFrame.append( - Calculation::repElem({false}, bTxShotNumber - 1)); - hardwareOuput.indexParams.lastLineInFrame.append(true); +// hardwareOuput.indexParams.lastLineInFrame.append( +// Calculation::repElem({false}, bTxShotNumber - 1)); +// hardwareOuput.indexParams.lastLineInFrame.append(true); } } - hardwareOuput.indexParams.dLineNum = Calculation::zeros(totalTxShotNumber); - hardwareOuput.indexParams.dEnsembleNum = Calculation::zeros(totalTxShotNumber); +// hardwareOuput.indexParams.dLineNum = Calculation::zeros(totalTxShotNumber); +// hardwareOuput.indexParams.dEnsembleNum = Calculation::zeros(totalTxShotNumber); } /*************************************************************************************************/