Browse Source

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.
develop
Arash Aletayeb 3 years ago
parent
commit
54c20af840
  1. 2
      developHw.pro.user
  2. 50
      hdf5Scenario/hdf5Scenario.cpp
  3. 2
      include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h
  4. 2
      include/model/hardware/core/lowLevelApi/register/dsp/Dsp.h
  5. 12
      include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/AtgcLut.h
  6. 12
      include/model/hardware/core/lowLevelApi/register/misc/Misc.h
  7. 118
      include/model/hardware/core/lowLevelApi/register/misc/registerDefinition/StatusVector.h
  8. 2
      include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/Index.h
  9. 2
      include/model/hardware/device/SonoDeviceConstant.h
  10. 104
      mainwindow.cpp
  11. 2
      mainwindow.h
  12. 68
      mainwindow.ui
  13. 2
      src/model/hardware/core/lowLevelApi/register/Register.cpp
  14. 4
      src/model/hardware/core/lowLevelApi/register/dsp/Dsp.cpp
  15. 12
      src/model/hardware/core/lowLevelApi/register/misc/Misc.cpp
  16. 20
      src/model/scenarioGenerator/core/scenario/B/BModeScenario.cpp
  17. 14
      src/model/scenarioGenerator/core/scenario/Bm/BmModeScenario.cpp

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2022-02-09T13:00:24. -->
<!-- Written by QtCreator 4.10.0, 2022-03-08T17:17:29. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

50
hdf5Scenario/hdf5Scenario.cpp

@ -19,9 +19,9 @@ void Hdf5::hdf5Path(const string &h5Path)
void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
{
/****************** /sramParameters/frameType ******************/
datasetBranch <float_t>("/sramParameters/frameType", floatArray);
scenParams.frameType = static_cast<quint8>(floatArray[0]);
// /****************** /sramParameters/frameType ******************/
// datasetBranch <float_t>("/sramParameters/frameType", floatArray);
// scenParams.frameType = static_cast<quint8>(floatArray[0]);
/****************** /sramParameters/totalTxShotNo ******************/
datasetBranch <float_t>("/sramParameters/totalTxShotNo", floatArray);
@ -668,28 +668,42 @@ void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams)
}
// /**************** /registerParameters/aTgcLut ********************/
// datasetBranch <float_t>("/registerParameters/aTgcLut", floatArray);
// QList <quint32> atgc;
/************ /registerParameters/aTgcParameters/aTgcLut ****************/
datasetBranch <float_t>("/registerParameters/aTgcParameters/aTgcLut", floatArray);
QList<QList<quint32>> atgcLut;
// for (quint32 j = 0; j < 128; j++)
// {
// atgc.push_back(static_cast<quint32>(floatArray[j + i * 128]));
// }
for (quint32 i = 0; i < 4; i++)
{
QList<quint32> temp;
for (quint32 j = 0; j < 256; j++)
{
temp.push_back(static_cast<quint32>(floatArray[j + i * 256]));
}
atgcLut.push_back(temp);
}
/**************** /registerParameters/aTgcLut ********************/
datasetBranch <float_t>("/registerParameters/aTgcLut", floatArray);
prbDepParams.prbDepParams.atgcLut.clear();
QList <quint32> tempAtgc;
/******* /registerParameters/aTgcParameters/aTgcCompensationLut *********/
datasetBranch <float_t>("/registerParameters/aTgcParameters/aTgcCompensationLut", floatArray);
QList<QVector<float>> atgcCompensationLut;
for (quint32 i = 0; i < 4; i++)
{
tempAtgc.clear();
for (quint32 j = 0; j < 128; j++)
QVector<float> temp;
for (quint32 j = 0; j < 256; j++)
{
tempAtgc.push_back(static_cast<quint32>(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 ********************/

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

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

2
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<quint32>& dtgcLut) const;
void atgcLut (QList<Atgc*> atgcLut) const;
void atgcLut (QList<Atgc> atgcLut) const;
void lpfLut (QList<QList<quint32>>& lpfLut) const;
};

12
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<quint32> _atgcCompensateLutQ;
void prepareData(quint32 index) override
{
atgcLut->setValue(_atgc->atgcLut[static_cast<qint32>(index)]);
atgcLut->setValue(_atgc.atgcLut[static_cast<qint32>(index)]);
atgcCompensateLut->setValue(_atgcCompensateLutQ[static_cast<qint32>(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)

12
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;
};

118
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

2
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 );

2
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

104
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);
}
/*************************************************************************************************/

2
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);

68
mainwindow.ui

@ -4092,9 +4092,9 @@
</widget>
</item>
<item>
<widget class="QLabel" name="l_scenGt">
<widget class="QLabel" name="l_scenSyncAck">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Scen GT&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Scen Sync Ack&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>false</string>
@ -4168,7 +4168,7 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_34">
<layout class="QHBoxLayout" name="horizontalLayout_107">
<item>
<widget class="QLabel" name="l_thermal">
<property name="toolTip">
@ -4209,6 +4209,60 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_frameLost">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Frame Lost&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>false</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_dintrlvOffsetAddr">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;D Interleave Offset Addr&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>false</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_34">
<item>
<widget class="QLabel" name="l_dintrlvSramOver4M">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;D Interleave SRAM Over 4M&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>false</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_ddcLpfReload">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;DDC LPF Reload&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>false</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_adcFlagSync">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;ADC Flag Sync&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>false</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_emulDmaTrans">
<property name="toolTip">
@ -4229,14 +4283,10 @@
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_42">
<item>
<widget class="QLabel" name="l_frameLost">
<widget class="QLabel" name="l_Reserved">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Frame Lost&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;Reserved&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>false</string>

2
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);
}
}

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

@ -112,11 +112,11 @@ void Dsp::dtgcLut(QList<quint32> &dtgcLut) const
this->_dtgcLut->updateArray();
}
void Dsp::atgcLut(QList<Atgc*> atgcLut) const
void Dsp::atgcLut(QList<Atgc> atgcLut) const
{
quint32 baseOffset = this->_atgcLut->getCurrentOffset();
foreach (Atgc *tempObj, atgcLut)
foreach (Atgc tempObj, atgcLut)
{
this->_atgcLut->setAtgcLut(tempObj);
this->_atgcLut->updateArray();

12
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);
}

20
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<bool>(frameShotNumber - 1));
hardwareOuput.indexParams.lastLineInFrame.append(Calculation::ones<bool>(1));
// hardwareOuput.indexParams.lastLineInFrame.append(
// Calculation::zeros<bool>(frameShotNumber - 1));
// hardwareOuput.indexParams.lastLineInFrame.append(Calculation::ones<bool>(1));
hardwareOuput.indexParams.lastLineInFrame =
Calculation::repMat(hardwareOuput.indexParams.lastLineInFrame, criFrameNumber);
// hardwareOuput.indexParams.lastLineInFrame =
// Calculation::repMat(hardwareOuput.indexParams.lastLineInFrame, criFrameNumber);
hardwareOuput.indexParams.dLineNum = Calculation::zeros<quint32>(totalTxShotNumber);
hardwareOuput.indexParams.dEnsembleNum = Calculation::zeros<quint32>(totalTxShotNumber);
// hardwareOuput.indexParams.dLineNum = Calculation::zeros<quint32>(totalTxShotNumber);
// hardwareOuput.indexParams.dEnsembleNum = Calculation::zeros<quint32>(totalTxShotNumber);
}
/*************************************************************************************************/

14
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<bool>({false}, bTxShotNumber - 1));
hardwareOuput.indexParams.lastLineInFrame.append(
Calculation::repElem<bool>({false}, bTxShotNumber - 1));
hardwareOuput.indexParams.lastLineInFrame.append(true);
// hardwareOuput.indexParams.lastLineInFrame.append(
// Calculation::repElem<bool>({false}, bTxShotNumber - 1));
// hardwareOuput.indexParams.lastLineInFrame.append(true);
}
}
hardwareOuput.indexParams.dLineNum = Calculation::zeros<quint32>(totalTxShotNumber);
hardwareOuput.indexParams.dEnsembleNum = Calculation::zeros<quint32>(totalTxShotNumber);
// hardwareOuput.indexParams.dLineNum = Calculation::zeros<quint32>(totalTxShotNumber);
// hardwareOuput.indexParams.dEnsembleNum = Calculation::zeros<quint32>(totalTxShotNumber);
}
/*************************************************************************************************/

Loading…
Cancel
Save