@ -36,7 +36,7 @@ void TrxBoard::readData()
auto temp = QByteArray : : fromRawData ( _device . getBufferPtr ( _swCounter ) , BUFFER_SIZE ) ;
packetEngine . newData ( temp ) ;
emit sendFramePacket ( temp ) ;
//emit sendFramePacket(temp);
_swCounter + + ;
if ( _swCounter > = SW_BUFFER_NUM )
@ -212,48 +212,48 @@ void TrxBoard::setScenario(ScenGenHardwareOutput_t scenGenHw)
scenParams - > focusTypeNumber = scenGenHw . focusTypeNumber ;
scenParams - > totalTxShotNumber = scenGenHw . totalTxShotNumber ;
scenParams - > rxBeamFormerNumber = scenGenHw . rxBeamFormerNumber ;
scenParams - > scenarioStartIndex = scenGenHw . hwRegister . scenarioStartIndex ;
scenParams - > scenarioEndIndex = scenGenHw . hwRegister . scenarioEndIndex ;
scenParams - > scenarioStartIndex = scenGenHw . hwRegister . scenarioStartIndex ;
scenParams - > scenarioEndIndex = scenGenHw . hwRegister . scenarioEndIndex ;
scenParams - > hwRegister - > lpfLut = scenGenHw . hwRegister . lpfLut ;
scenParams - > hwRegister - > atgcLut = scenGenHw . hwRegister . atgcLut ;
scenParams - > hwRegister - > apodization = scenGenHw . hwRegister . apodizationLut ;
scenParams - > hwRegister - > blendWeight = scenGenHw . hwRegister . blendWeight ;
scenParams - > hwRegister - > elementPosition - > xPosition = scenGenHw . hwRegister . elementXPosition ;
scenParams - > hwRegister - > elementPosition - > yPosition = scenGenHw . hwRegister . elementYPosition ;
scenParams - > hwRegister - > elementPosition - > zPosition = scenGenHw . hwRegister . elementZPosition ;
scenParams - > hwRegister - > freqLut = scenGenHw . hwRegister . freqLut ;
scenParams - > hwRegister - > blendWeight = scenGenHw . hwRegister . blendWeight ;
scenParams - > hwRegister - > elementPosition - > xPosition = scenGenHw . hwRegister . elementXPosition ;
scenParams - > hwRegister - > elementPosition - > yPosition = scenGenHw . hwRegister . elementYPosition ;
scenParams - > hwRegister - > elementPosition - > zPosition = scenGenHw . hwRegister . elementZPosition ;
scenParams - > hwRegister - > freqLut = scenGenHw . hwRegister . freqLut ;
scenParams - > hwRegister - > dtgcLut = scenGenHw . hwRegister . dtgcLut ;
scenParams - > hwRegister - > pulseTypeNumber = scenGenHw . hwRegister . pulseTypeNumber ;
scenParams - > hwRegister - > rxBeamFormerTypeNumber = scenGenHw . hwRegister . rxBeamFormerTypeNumber ;
scenParams - > hwRegister - > receiverConfigTypeNumber =
scenGenHw . hwRegister . receiverConfigTypeNumber ;
scenParams - > hwRegister - > rxBeamFormerTypeNumber = scenGenHw . hwRegister . rxBeamFormerTypeNumber ;
scenParams - > hwRegister - > receiverConfigTypeNumber =
scenGenHw . hwRegister . receiverConfigTypeNumber ;
scenParams - > hwRegister - > pulse - > clear ( ) ;
foreach ( auto i , scenGenHw . hwRegister . pulseProps )
{
scenParams - > hwRegister - > pulse - > halfPeriod . append ( i . halfPeriod ) ;
scenParams - > hwRegister - > pulse - > startPhase . append ( i . startPhase ) ;
scenParams - > hwRegister - > pulse - > halfCycleNo . append ( i . halfCycleNo ) ;
scenParams - > hwRegister - > pulse - > pulseVoltSel . append ( i . pulseVoltSel ) ;
scenParams - > hwRegister - > pulse - > dampingPulseWidth . append ( i . dampingPulseWidth ) ;
}
scenParams - > hwRegister - > pulse - > clear ( ) ;
foreach ( auto i , scenGenHw . hwRegister . pulseProps )
{
scenParams - > hwRegister - > pulse - > halfPeriod . append ( i . halfPeriod ) ;
scenParams - > hwRegister - > pulse - > startPhase . append ( i . startPhase ) ;
scenParams - > hwRegister - > pulse - > halfCycleNo . append ( i . halfCycleNo ) ;
scenParams - > hwRegister - > pulse - > pulseVoltSel . append ( i . pulseVoltSel ) ;
scenParams - > hwRegister - > pulse - > dampingPulseWidth . append ( i . dampingPulseWidth ) ;
}
scenParams - > hwRegister - > rxBeamformer - > clear ( ) ;
foreach ( auto j , scenGenHw . hwRegister . rxBeamFormerProps )
{
scenParams - > hwRegister - > rxBeamformer - > lag . append ( j . lag ) ;
scenParams - > hwRegister - > rxBeamformer - > mla . append ( j . mla ) ;
scenParams - > hwRegister - > rxBeamformer - > apodization . append ( j . apodizationSel ) ;
}
scenParams - > hwRegister - > rxBeamformer - > clear ( ) ;
foreach ( auto j , scenGenHw . hwRegister . rxBeamFormerProps )
{
scenParams - > hwRegister - > rxBeamformer - > lag . append ( j . lag ) ;
scenParams - > hwRegister - > rxBeamformer - > mla . append ( j . mla ) ;
scenParams - > hwRegister - > rxBeamformer - > apodization . append ( j . apodizationSel ) ;
}
scenParams - > hwRegister - > configLut - > clear ( ) ;
scenParams - > hwRegister - > configLut - > clear ( ) ;
foreach ( auto k , scenGenHw . hwRegister . receiverConfigProps )
{
scenParams - > hwRegister - > configLut - > mla . append ( k . mla ) ;
scenParams - > hwRegister - > configLut - > stb . append ( k . stb ) ;
scenParams - > hwRegister - > configLut - > absEn . append ( k . absEn ) ;
scenParams - > hwRegister - > configLut - > ddcEn . append ( k . ddcE n ) ;
scenParams - > hwRegister - > configLut - > ddcEn . append ( k . ddcn ) ;
scenParams - > hwRegister - > configLut - > dpeEn . append ( k . dpeEn ) ;
scenParams - > hwRegister - > configLut - > stbEn . append ( k . stbEn ) ;
scenParams - > hwRegister - > configLut - > wmfEn . append ( k . wmfEn ) ;
@ -268,7 +268,7 @@ void TrxBoard::setScenario(ScenGenHardwareOutput_t scenGenHw)
}
scenParams - > indexParams - > dLineNum = scenGenHw . indexParams . dLineNum ;
scenParams - > indexParams - > frameType = scenGenHw . indexParams . frameType ;
scenParams - > indexParams - > frameType = scenGenHw . frameType ;
scenParams - > indexParams - > dEnsembleNum = scenGenHw . indexParams . dEnsembleNum ;
scenParams - > indexParams - > lastLineInFrame = scenGenHw . indexParams . lastLineInFrame ;
scenParams - > indexParams - > firstLineInFrame = scenGenHw . indexParams . firstLineInFrame ;
@ -310,146 +310,146 @@ void TrxBoard::setScenario(ScenGenHardwareOutput_t scenGenHw)
void TrxBoard : : setScenario ( ScenGenHardwareOutput * scenParams )
{
///////////////////////////////// BeamFormer setting ///////////////////////////////
QList < QList < quint32 > > elementPosition ;
QList < quint32 > x ;
QList < quint32 > y ;
QList < quint32 > z ;
QList < QList < quint32 > > elementPosition ;
QList < quint32 > x ;
QList < quint32 > y ;
QList < quint32 > z ;
//_signedQntzrVec.clear();
_unsignedQntzrVec = Calculation : : qntzr ( scenParams - > hwRegister - > elementPosition - > xPosition ,
1 ,
18 ,
0 ,
0 ,
true ,
true ,
true ) ;
1 ,
18 ,
0 ,
0 ,
true ,
true ,
true ) ;
QList < quint32 > xPosQ = _unsignedQntzrVec . toList ( ) ;
//QList<quint32> xPosQ = signedVector2unsignedList(_signedQntzrVec);
_unsignedQntzrVec = Calculation : : qntzr ( scenParams - > hwRegister - > elementPosition - > yPosition ,
1 ,
18 ,
0 ,
0 ,
true ,
true ,
true ) ;
1 ,
18 ,
0 ,
0 ,
true ,
true ,
true ) ;
QList < quint32 > yPosQ = _unsignedQntzrVec . toList ( ) ;
_unsignedQntzrVec = Calculation : : qntzr ( scenParams - > hwRegister - > elementPosition - > zPosition ,
0 ,
17 ,
0 ,
0 ,
true ,
true ,
true ) ;
0 ,
17 ,
0 ,
0 ,
true ,
true ,
true ) ;
QList < quint32 > zPosQ = _unsignedQntzrVec . toList ( ) ;
for ( quint8 i = 0 ; i < 3 ; i + + )
{
for ( quint8 j = 0 ; j < SLAVE_ELEMENT_SEGMENT ; j + + )
{
x . append ( xPosQ . at ( _swapVec . at ( j + i * SLAVE_ELEMENT_SEGMENT ) ) ) ;
y . append ( yPosQ . at ( _swapVec . at ( j + i * SLAVE_ELEMENT_SEGMENT ) ) ) ;
z . append ( zPosQ . at ( _swapVec . at ( j + i * SLAVE_ELEMENT_SEGMENT ) ) ) ;
}
elementPosition . append ( x ) ;
elementPosition . append ( y ) ;
elementPosition . append ( z ) ;
switch ( i )
{
case 0 :
this - > _beamFormerSlave0 - > probeElementPosition ( elementPosition ) ;
break ;
for ( quint8 i = 0 ; i < 3 ; i + + )
{
for ( quint8 j = 0 ; j < SLAVE_ELEMENT_SEGMENT ; j + + )
{
x . append ( xPosQ . at ( _swapVec . at ( j + i * SLAVE_ELEMENT_SEGMENT ) ) ) ;
y . append ( yPosQ . at ( _swapVec . at ( j + i * SLAVE_ELEMENT_SEGMENT ) ) ) ;
z . append ( zPosQ . at ( _swapVec . at ( j + i * SLAVE_ELEMENT_SEGMENT ) ) ) ;
}
case 1 :
this - > _beamFormerSlave1 - > probeElementPosition ( elementPosition ) ;
break ;
elementPosition . append ( x ) ;
elementPosition . append ( y ) ;
elementPosition . append ( z ) ;
case 2 :
this - > _beamFormerSlave2 - > probeElementPosition ( elementPosition ) ;
break ;
}
switch ( i )
{
case 0 :
this - > _beamFormerSlave0 - > probeElementPosition ( elementPosition ) ;
break ;
x . clear ( ) ;
y . clear ( ) ;
z . clear ( ) ;
elementPosition . clear ( ) ;
}
scenParamsFilling ( set ) ;
case 1 :
this - > _beamFormerSlave1 - > probeElementPosition ( elementPosition ) ;
break ;
this - > _beamFormerSlave0 - > rxBeamformerProperties ( scenParams - > hwRegister - > rxBeamFormerTypeNumber ,
scenParams - > hwRegister - > rxBeamformer ) ;
this - > _beamFormerSlave1 - > rxBeamformerProperties ( scenParams - > hwRegister - > rxBeamFormerTypeNumber ,
scenParams - > hwRegister - > rxBeamformer ) ;
this - > _beamFormerSlave2 - > rxBeamformerProperties ( scenParams - > hwRegister - > rxBeamFormerTypeNumber ,
scenParams - > hwRegister - > rxBeamformer ) ;
scenParamsFilling ( set ) ;
this - > _beamFormerSlave0 - > pulseProperties ( scenParams - > hwRegister - > pulseTypeNumber ,
scenParams - > hwRegister - > pulse ) ;
this - > _beamFormerSlave1 - > pulseProperties ( scenParams - > hwRegister - > pulseTypeNumber ,
scenParams - > hwRegister - > pulse ) ;
this - > _beamFormerSlave2 - > pulseProperties ( scenParams - > hwRegister - > pulseTypeNumber ,
scenParams - > hwRegister - > pulse ) ;
scenParamsFilling ( set ) ;
case 2 :
this - > _beamFormerSlave2 - > probeElementPosition ( elementPosition ) ;
break ;
}
QList < QList < quint32 > > apodizationQ ;
foreach ( auto vec , scenParams - > hwRegister - > apodization )
{
apodizationQ . push_back ( vec . toList ( ) ) ;
}
this - > _beamFormerSlave0 - > apodizationLut ( apodizationQ ) ;
this - > _beamFormerSlave1 - > apodizationLut ( apodizationQ ) ;
this - > _beamFormerSlave2 - > apodizationLut ( apodizationQ ) ;
scenParamsFilling ( set ) ;
x . clear ( ) ;
y . clear ( ) ;
z . clear ( ) ;
elementPosition . clear ( ) ;
}
scenParamsFilling ( set ) ;
this - > _beamFormerSlave0 - > rxBeamformerProperties ( scenParams - > hwRegister - > rxBeamFormerTypeNumber ,
scenParams - > hwRegister - > rxBeamformer ) ;
this - > _beamFormerSlave1 - > rxBeamformerProperties ( scenParams - > hwRegister - > rxBeamFormerTypeNumber ,
scenParams - > hwRegister - > rxBeamformer ) ;
this - > _beamFormerSlave2 - > rxBeamformerProperties ( scenParams - > hwRegister - > rxBeamFormerTypeNumber ,
scenParams - > hwRegister - > rxBeamformer ) ;
scenParamsFilling ( set ) ;
this - > _beamFormerSlave0 - > pulseProperties ( scenParams - > hwRegister - > pulseTypeNumber ,
scenParams - > hwRegister - > pulse ) ;
this - > _beamFormerSlave1 - > pulseProperties ( scenParams - > hwRegister - > pulseTypeNumber ,
scenParams - > hwRegister - > pulse ) ;
this - > _beamFormerSlave2 - > pulseProperties ( scenParams - > hwRegister - > pulseTypeNumber ,
scenParams - > hwRegister - > pulse ) ;
scenParamsFilling ( set ) ;
QList < QList < quint32 > > apodizationQ ;
foreach ( auto vec , scenParams - > hwRegister - > apodization )
{
apodizationQ . push_back ( vec . toList ( ) ) ;
}
this - > _beamFormerSlave0 - > apodizationLut ( apodizationQ ) ;
this - > _beamFormerSlave1 - > apodizationLut ( apodizationQ ) ;
this - > _beamFormerSlave2 - > apodizationLut ( apodizationQ ) ;
scenParamsFilling ( set ) ;
//this->_beamFormerSlave0->afeLut(scenParams->hwRegister->afe);
//this->_beamFormerSlave1->afeLut(scenParams->hwRegister->afe);
//this->_beamFormerSlave2->afeLut(scenParams->hwRegister->afe);
//scenParamsFilling(set);
//// this->_beamFormerSlave0->afeLut(scenParams->hwRegister->afe);
//// this->_beamFormerSlave1->afeLut(scenParams->hwRegister->afe);
//// this->_beamFormerSlave2->afeLut(scenParams->hwRegister->afe);
//// scenParamsFilling(set);
///////////////////////////////// DSP setting ///////////////////////////////
this - > _dsp - > receiverConfigurationLut ( scenParams - > hwRegister - > receiverConfigTypeNumber ,
scenParams - > hwRegister - > configLut ) ;
this - > _dsp - > receiverConfigurationLut ( scenParams - > hwRegister - > receiverConfigTypeNumber ,
scenParams - > hwRegister - > configLut ) ;
_unsignedQntzrVec = Calculation : : qntzr ( scenParams - > hwRegister - > freqLut , 0 , 24 , 0 , 0 , true ) ;
QList < quint32 > freqLutQ = _unsignedQntzrVec . toList ( ) ;
this - > _dsp - > frequencyLut ( freqLutQ ) ;
this - > _dsp - > frequencyLut ( freqLutQ ) ;
_unsignedQntzrVec = Calculation : : qntzr ( scenParams - > hwRegister - > dtgcLut , 0 , 12 , 8 , 0 , true , false ) ;
QList < quint32 > dtgcLutQ = _unsignedQntzrVec . toList ( ) ;
this - > _dsp - > dtgcLut ( dtgcLutQ ) ;
QList < quint32 > temp ;
QList < QList < quint32 > > blendWeightQ ;
QList < quint32 > temp ;
QList < QList < quint32 > > blendWeightQ ;
//_signedQntzrVec.clear();
foreach ( auto vec , scenParams - > hwRegister - > blendWeight )
{
temp . clear ( ) ;
foreach ( auto vec , scenParams - > hwRegister - > blendWeight )
{
temp . clear ( ) ;
_unsignedQntzrVec = Calculation : : qntzr ( vec , 0 , 9 , 8 , 0 , true , false , true ) ;
temp = _unsignedQntzrVec . toList ( ) ;
blendWeightQ . push_back ( temp ) ;
}
this - > _dsp - > blendWeight ( blendWeightQ ) ;
blendWeightQ . push_back ( temp ) ;
}
this - > _dsp - > blendWeight ( blendWeightQ ) ;
QList < QList < quint32 > > atgcLutQ ;
foreach ( auto vec , scenParams - > hwRegister - > atgcLut )
{
atgcLutQ . push_back ( vec . toList ( ) ) ;
}
this - > _dsp - > atgcLut ( atgcLutQ ) ;
QList < QList < quint32 > > atgcLutQ ;
foreach ( auto vec , scenParams - > hwRegister - > atgcLut )
{
atgcLutQ . push_back ( vec . toList ( ) ) ;
}
this - > _dsp - > atgcLut ( atgcLutQ ) ;
QList < QList < quint32 > > lpfLutQ ;
foreach ( auto vec , scenParams - > hwRegister - > lpfLut )
{
lpfLutQ . push_back ( vec . toList ( ) ) ;
}
this - > _dsp - > lpfLut ( lpfLutQ ) ;
QList < QList < quint32 > > lpfLutQ ;
foreach ( auto vec , scenParams - > hwRegister - > lpfLut )
{
lpfLutQ . push_back ( vec . toList ( ) ) ;
}
this - > _dsp - > lpfLut ( lpfLutQ ) ;
///////////////////////////////// Sram setting ///////////////////////////////
this - > _sram - > setSramIndex ( scenParams - > totalTxShotNumber , scenParams - > indexParams ) ;
@ -462,15 +462,15 @@ void TrxBoard::setScenario (ScenGenHardwareOutput* scenParams)
scenParamsFilling ( set ) ;
////////////////////////////// Scen Index setting ////////////////////////////
if ( scenParams - > scenarioEndIndex > = scenParams - > scenarioStartIndex )
{
this - > _scenPlayer - > setStartIndex ( scenParams - > scenarioStartIndex ) ;
this - > _scenPlayer - > setEndIndex ( scenParams - > scenarioEndIndex ) ;
}
else
{
throw SonoException (
" The scenario end index must be greater than or equal to the scenario start index " ) ;
if ( scenParams - > scenarioEndIndex > = scenParams - > scenarioStartIndex )
{
this - > _scenPlayer - > setStartIndex ( scenParams - > scenarioStartIndex ) ;
this - > _scenPlayer - > setEndIndex ( scenParams - > scenarioEndIndex ) ;
}
else
{
throw SonoException (
" The scenario end index must be greater than or equal to the scenario start index " ) ;
}
}
@ -492,6 +492,13 @@ void TrxBoard::setAtgcMode(eAtgcMode mode, quint16 value) const
this - > _dsp - > atgcMode ( mode , value ) ;
}
void TrxBoard : : setDtgcLut ( QVector < float > & dtgcLut )
{
_unsignedQntzrVec = Calculation : : qntzr ( dtgcLut , 0 , 12 , 8 , 0 , true , false ) ;
QList < quint32 > dtgcLutQ = _unsignedQntzrVec . toList ( ) ;
this - > _dsp - > dtgcLut ( dtgcLutQ ) ;
}
void TrxBoard : : setMetaData ( const QByteArray metaData ) const
{
QList < quint64 > data ;
@ -512,20 +519,6 @@ void TrxBoard::setMetaData(const QByteArray metaData) const
this - > _sram - > setSramMetaData ( data ) ;
}
void TrxBoard : : setDtgcLut ( QVector < float > & dtgcLut )
{
_unsignedQntzrVec = Calculation : : qntzr ( dtgcLut , 0 , 12 , 8 , 0 , true , false ) ;
QList < quint32 > dtgcLutQ = _unsignedQntzrVec . toList ( ) ;
this - > _dsp - > dtgcLut ( dtgcLutQ ) ;
}
void TrxBoard : : setAfePwrdnMode ( eAfePwrdnMode cmd ) const
{
this - > _afeSlave0 - > setAfeGblPwr ( cmd ) ;
this - > _afeSlave1 - > setAfeGblPwr ( cmd ) ;
this - > _afeSlave2 - > setAfeGblPwr ( cmd ) ;
}
QList < quint32 > TrxBoard : : getAfeReg ( eSlaveSelect sel , quint32 afeRegAddr )
{
QList < quint32 > afeRegValue ;
@ -577,6 +570,14 @@ void TrxBoard::setAfeConfig(AfeConfig afe)
void TrxBoard : : slaveFpgaProgram ( QString path )
{
scenParamsFilling ( clear ) ;
if ( MOUNTED_SLAVE_FPGA < = 0 | | MOUNTED_SLAVE_FPGA > = 8 )
{
throw SonoException ( " Wrong mounted slave fpga is selected " ) ;
}
QByteArray bitFileData ;
QFile bitFile ( path ) ;
bitFileData . clear ( ) ;
@ -594,9 +595,9 @@ void TrxBoard::slaveFpgaProgram(QString path)
bitFileData = bitFile . readAll ( ) ;
bitFile . close ( ) ;
this - > _fpgaProgram - > program ( bitFileData , SLAVE_FPGA_NUMBER ) ;
this - > _fpgaProgram - > program ( bitFileData , MOUNTED_SLAVE_FPGA ) ;
scenParamsFilling ( clear ) ;
}
void TrxBoard : : setBeamFormerMode ( eClkMode mode ) const
@ -623,6 +624,12 @@ void TrxBoard::scenPlayerStart(void)
this - > _device . startDma ( ) ;
this - > _bCtrlMngt - > mpsDacsOn ( ) ;
this - > _afeSlave0 - > setAfeGblPwr ( afePwrdnDisable ) ;
this - > _afeSlave1 - > setAfeGblPwr ( afePwrdnDisable ) ;
this - > _afeSlave2 - > setAfeGblPwr ( afePwrdnDisable ) ;
this - > _scenPlayer - > control . command ( true ) ;
_run = true ;
@ -633,7 +640,6 @@ void TrxBoard::scenPlayerStart(void)
{
throw SonoException ( " Total scenario luts and sram parameters are not written compeletely " ) ;
}
}
void TrxBoard : : scenPlayerStop ( void )
@ -644,6 +650,10 @@ void TrxBoard::scenPlayerStop(void)
this - > _scenPlayer - > control . command ( false ) ;
this - > _afeSlave0 - > setAfeGblPwr ( afePwrdnEnable ) ;
this - > _afeSlave1 - > setAfeGblPwr ( afePwrdnEnable ) ;
this - > _afeSlave2 - > setAfeGblPwr ( afePwrdnEnable ) ;
this - > _bCtrlMngt - > mpsDacsOff ( ) ;
}
@ -734,33 +744,32 @@ quint32 TrxBoard::vendorId() const
quint32 TrxBoard : : trxId ( ) const
{
QByteArray id = this - > _bCtrlMngt - > trxEepromRead ( EEPROM_ID_BYTE_BEGIN , EEPROM_ID_BYTE_NUMBER ) ;
QByteArray id = this - > _bCtrlMngt - > trxEepromRead ( EEPROM_ID_BYTE_BEGIN , EEPROM_ID_BYTE_NUMBER ) ;
return byteArray2UintBigEndian < quint32 > ( id ) ;
return byteArray2UintBigEndian < quint16 > ( id ) ;
}
quint32 TrxBoard : : mpsId ( ) const
{
QByteArray id = this - > _bCtrlMngt - > mpsEepromRead ( EEPROM_ID_BYTE_BEGIN , EEPROM_ID_BYTE_NUMBER ) ;
QByteArray id = this - > _bCtrlMngt - > mpsEepromRead ( EEPROM_ID_BYTE_BEGIN , EEPROM_ID_BYTE_NUMBER ) ;
return byteArray2UintBigEndian < quint32 > ( id ) ;
return byteArray2UintBigEndian < quint16 > ( id ) ;
}
quint32 TrxBoard : : prbCtrlId ( ) const
{
QByteArray id =
this - > _bCtrlMngt - > prbCtrlEepromRead ( EEPROM_ID_BYTE_BEGIN , EEPROM_ID_BYTE_NUMBER ) ;
QByteArray id = this - > _bCtrlMngt - > prbCtrlEepromRead ( EEPROM_ID_BYTE_BEGIN , EEPROM_ID_BYTE_NUMBER ) ;
return byteArray2UintBigEndian < quint32 > ( id ) ;
return byteArray2UintBigEndian < quint16 > ( id ) ;
}
quint32 TrxBoard : : prbId ( quint8 prbSel ) const
quint32 TrxBoard : : prbId ( eSelectProbe prbSel ) const
{
QByteArray id = this - > _bCtrlMngt - > prbEepromRead ( EEPROM_ID_BYTE_BEGIN ,
QByteArray id = this - > _bCtrlMngt - > prbEepromRead ( EEPROM_ID_BYTE_BEGIN ,
EEPROM_ID_BYTE_NUMBER ,
prbSel ) ;
prbSel - 1 ) ;
return byteArray2UintBigEndian < quint32 > ( id ) ;
return byteArray2UintBigEndian < quint16 > ( id ) ;
}
void TrxBoard : : getConnectedPrbId ( ConnectedPrbId * prbId ) const
@ -772,7 +781,7 @@ void TrxBoard::getConnectedPrbId(ConnectedPrbId* prbId) const
vec = this - > _bCtrlMngt - > getConnectedPrb ( ) ;
for ( quint8 i = 0 ; i < vec . size ( ) ; i + + )
for ( quint8 i ( 0 ) ; i < vec . size ( ) ; i + + )
{
if ( vec . at ( i ) )
{
@ -780,53 +789,45 @@ void TrxBoard::getConnectedPrbId(ConnectedPrbId* prbId) const
}
else
{
id . append ( nullptr ) ;
id . append ( nullptr ) ;
id . append ( nullptr ) ;
}
switch ( i )
{
case 0 :
prbId - > prbA = byteArray2UintBigEndian < quint32 > ( id ) ;
prbId - > prbA = byteArray2UintBigEndian < quint16 > ( id ) ;
break ;
case 1 :
prbId - > prbB = byteArray2UintBigEndian < quint32 > ( id ) ;
prbId - > prbB = byteArray2UintBigEndian < quint16 > ( id ) ;
break ;
case 2 :
prbId - > prbC = byteArray2UintBigEndian < quint32 > ( id ) ;
prbId - > prbC = byteArray2UintBigEndian < quint16 > ( id ) ;
break ;
case 3 :
prbId - > prbD = byteArray2UintBigEndian < quint32 > ( id ) ;
prbId - > prbD = byteArray2UintBigEndian < quint16 > ( id ) ;
break ;
}
id . clear ( ) ;
}
}
QString TrxBoard : : trxInfo ( ) const
QByteArray TrxBoard : : trxInfo ( ) const
{
QString str =
QString ( this - > _bCtrlMngt - > trxEepromRead ( EEPROM_INFO_BYTE_BEGIN , EEPROM_INFO_BYTE_NUMBER ) ) ;
return str ;
return this - > _bCtrlMngt - > trxEepromRead ( EEPROM_INFO_BYTE_BEGIN , EEPROM_INFO_BYTE_NUMBER ) ;
}
QString TrxBoard : : mpsInfo ( ) const
QByteArray TrxBoard : : mpsInfo ( ) const
{
QString str =
QString ( this - > _bCtrlMngt - > mpsEepromRead ( EEPROM_INFO_BYTE_BEGIN , EEPROM_INFO_BYTE_NUMBER ) ) ;
return str ;
return this - > _bCtrlMngt - > mpsEepromRead ( EEPROM_INFO_BYTE_BEGIN , EEPROM_INFO_BYTE_NUMBER ) ;
}
QString TrxBoard : : prbCtrlInfo ( ) const
QByteArray TrxBoard : : prbCtrlInfo ( ) const
{
QString str =
QString ( this - > _bCtrlMngt - > prbCtrlEepromRead ( EEPROM_INFO_BYTE_BEGIN ,
EEPROM_INFO_BYTE_NUMBER ) ) ;
return str ;
return this - > _bCtrlMngt - > prbCtrlEepromRead ( EEPROM_INFO_BYTE_BEGIN , EEPROM_INFO_BYTE_NUMBER ) ;
}
QByteArray TrxBoard : : prbInfo ( quint8 prbSel ) const
@ -874,6 +875,7 @@ void TrxBoard::getConnectedPrbInfo(ConnectedPrbInfo* prbInfo) const
prbInfo - > prbD = info ;
break ;
}
info . clear ( ) ;
}
}
@ -984,5 +986,7 @@ void TrxBoard::getFpgasCodeVersion(FpgaCodeVersion* version) const
void TrxBoard : : sramParityClear ( )
{
this - > _device . device . writeLong ( BAR_SRAM , 0 , 0 ) ;
quint64 val ;
val = this - > _device . device . readLong ( BAR_SRAM , 0 ) ;
this - > _device . device . writeLong ( BAR_SRAM , 0 , val ) ;
}