File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -191,14 +191,24 @@ void MlxlinkCablesCommander::getDdmValuesFromPddr()
191191 _cableDdm.channels = _numOfLanes;
192192 _cableDdm.temperature .val = getFieldValue (" temperature" ) / 256 ;
193193 _cableDdm.voltage .val = getFieldValue (" voltage" ) / MILLIVOLT_UNIT;
194+ float txMultiplier = 1 ;
195+ try
196+ {
197+ txMultiplier = pow (2 , getFieldValue (" tx_bias_scaling_factor" ));
198+ }
199+ catch (const std::exception& e)
200+ {
201+ // If the field does not exist, set the multiplier to 1
202+ // txMultiplier = 1;
203+ }
194204
195205 string laneStr = " " ;
196206 for (int lane = 0 ; lane < _cableDdm.channels ; lane++)
197207 {
198208 laneStr = to_string (_moduleLanesMapping[lane]);
199209 _cableDdm.rx_power [lane].val = getPower (getFieldValue (" rx_power_lane" + laneStr));
200210 _cableDdm.tx_power [lane].val = getPower (getFieldValue (" tx_power_lane" + laneStr));
201- _cableDdm.tx_bias [lane].val = getFieldValue (" tx_bias_lane" + laneStr);
211+ _cableDdm.tx_bias [lane].val = getFieldValue (" tx_bias_lane" + laneStr) * txMultiplier ;
202212 }
203213 }
204214}
You can’t perform that action at this time.
0 commit comments