Skip to content

Commit d431e08

Browse files
HarelKarniogalbxela
authored andcommitted
mlxlink | bug fix for missing multiplier for tx_bias_lane in DDMinfo
Description: MSTFlint port needed: Tested OS: Tested devices: Tested flows: Known gaps (with RM ticket): Issue:
1 parent 663c06a commit d431e08

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mlxlink/modules/mlxlink_cables_commander.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)