| /openbmc/intel-ipmi-oem/tests/ |
| H A D | test_sensorcommands.cpp | 58 void testValue(int x, double y, int16_t M, int8_t rExp, int16_t B, int8_t bExp, in testValue() argument 71 ipmi::scaleIPMIValueFromDouble(y, M, rExp, B, bExp, bSigned); in testValue() 74 yRoundtrip = ipmitool_y_from_x(actual, M, rExp, B, bExp, bSigned); in testValue() 82 ipmi::scaleIPMIValueFromDouble(y, M, rExp, B, bExp, bSigned); in testValue() 85 yRoundtrip = ipmitool_y_from_x(actual, M, rExp, B, bExp, bSigned); in testValue() 100 x, result, M, (int)rExp, B, (int)bExp, (int)bSigned, y, yRoundtrip); in testValue() 109 int8_t bExp; in testBounds() local 113 result = ipmi::getSensorAttributes(yMax, yMin, mValue, rExp, bValue, bExp, in testBounds() 126 yMin, yMax, mValue, (int)rExp, bValue, (int)bExp, (int)bSigned); in testBounds() 146 testValue(xMin, yMin, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() [all …]
|
| /openbmc/phosphor-host-ipmid/test/dbus-sdr/ |
| H A D | sensorcommands_unittest.cpp | 58 void testValue(int x, double y, int16_t M, int8_t rExp, int16_t B, int8_t bExp, in testValue() argument 71 ipmi::scaleIPMIValueFromDouble(y, M, rExp, B, bExp, bSigned); in testValue() 74 yRoundtrip = ipmitool_y_from_x(actual, M, rExp, B, bExp, bSigned); in testValue() 82 ipmi::scaleIPMIValueFromDouble(y, M, rExp, B, bExp, bSigned); in testValue() 85 yRoundtrip = ipmitool_y_from_x(actual, M, rExp, B, bExp, bSigned); in testValue() 101 x, result, M, (int)rExp, B, (int)bExp, (int)bSigned, y, yRoundtrip); in testValue() 110 int8_t bExp; in testBounds() local 114 result = ipmi::getSensorAttributes(yMax, yMin, mValue, rExp, bValue, bExp, in testBounds() 127 yMin, yMax, mValue, (int)rExp, bValue, (int)bExp, (int)bSigned); in testBounds() 147 testValue(xMin, yMin, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() [all …]
|
| /openbmc/intel-ipmi-oem/include/ |
| H A D | sensorutils.hpp | 160 int16_t& bValue, int8_t& bExp, bool& bSigned) in getSensorAttributes() argument 189 bExp = 0; in getSensorAttributes() 245 double dB = std::pow(10.0, ((-rExp) - bExp)) * in getSensorAttributes() 249 if (!(scaleFloatExp(dB, bExp))) in getSensorAttributes() 252 << (int)bExp << ") exceeds multiplier scale (M=" << dM in getSensorAttributes() 259 normalizeIntExp(bValue, bExp, dB); in getSensorAttributes() 267 const int16_t bValue, const int8_t bExp, const bool bSigned) in scaleIPMIValueFromDouble() argument 284 (std::pow(10.0, -rExp) * (value - (dB * std::pow(10.0, rExp + bExp)))) / in scaleIPMIValueFromDouble() 319 int8_t bExp = 0; in getScaledIPMIValue() local 323 getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue() [all …]
|
| /openbmc/phosphor-host-ipmid/dbus-sdr/ |
| H A D | sensorutils.cpp | 152 int8_t& rExp, int16_t& bValue, int8_t& bExp, in getSensorAttributes() argument 182 bExp = 0; in getSensorAttributes() 240 double dB = std::pow(10.0, ((-rExp) - bExp)) * in getSensorAttributes() 244 if (!(scaleFloatExp(dB, bExp))) in getSensorAttributes() 249 "DB", dB, "BEXP", bExp, "DM", dM, "REXP", rExp); in getSensorAttributes() 255 normalizeIntExp(bValue, bExp, dB); in getSensorAttributes() 263 const int8_t bExp, const bool bSigned) in scaleIPMIValueFromDouble() argument 280 (std::pow(10.0, -rExp) * (value - (dB * std::pow(10.0, rExp + bExp)))) / in scaleIPMIValueFromDouble() 315 int8_t bExp = 0; in getScaledIPMIValue() local 319 getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue() [all …]
|
| H A D | sensorcommands.cpp | 503 int8_t bExp = 0; in calculateValue() local 506 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in calculateValue() 514 value += ((double)bValue) * std::pow(10.0, bExp); in calculateValue() 990 int8_t bExp = 0; in ipmiSenGetSensorReading() local 993 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in ipmiSenGetSensorReading() 999 scaleIPMIValueFromDouble(reading, mValue, rExp, bValue, bExp, bSigned); in ipmiSenGetSensorReading() 1055 rExp, "BVALUE", bValue, "BEXP", bExp, "BSIGNED", bSigned); in ipmiSenGetSensorReading() 1182 int8_t bExp = 0; in ipmiSenSetSensorThresholds() local 1185 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in ipmiSenSetSensorThresholds() 1266 (bValue * std::pow(10.0, bExp))) * in ipmiSenSetSensorThresholds() [all …]
|
| /openbmc/fb-ipmi-oem/include/ |
| H A D | sensorutils.hpp | 169 int16_t& bValue, int8_t& bExp, bool& bSigned) in getSensorAttributes() argument 243 bExp = 0; in getSensorAttributes() 248 if (bExp >= maxInt4) in getSensorAttributes() 255 bExp++; in getSensorAttributes() 261 if (bExp <= minInt4) in getSensorAttributes() 268 bExp -= 1; in getSensorAttributes() 279 const uint16_t bValue, const int8_t bExp, const bool bSigned) in scaleIPMIValueFromDouble() argument 282 (value - (bValue * std::pow(10, bExp) * std::pow(10, rExp))) / in scaleIPMIValueFromDouble() 306 int8_t bExp = 0; in getScaledIPMIValue() local 310 result = getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue() [all …]
|
| /openbmc/phosphor-host-ipmid/include/dbus-sdr/ |
| H A D | sensorutils.hpp | 31 int8_t& rExp, int16_t& bValue, int8_t& bExp, 36 const int8_t bExp, const bool bSigned);
|
| /openbmc/phosphor-host-ipmid/scripts/ |
| H A D | writesensor.cpp.mako | 50 bExp = sensor.get("bExp", 0) 90 .exponentB = ${bExp}, 91 .scaledOffset = ${offsetB * pow(10,bExp)},
|
| /openbmc/phosphor-mrw-tools/ |
| H A D | gen_ipmi_sensor.pl | 152 my $bExp = $sensorTypeConfig->{$sensorName}->{"bExp"}; 163 $data{'B_EXP'} = $bExp; 168 $debug .= "$multiplierM : $offsetB : $bExp : $rExp : $unit : ";
|
| /openbmc/qemu/target/tricore/ |
| H A D | fpu_helper.c | 56 uint32_t aExp, bExp, cExp; in f_maddsub_nan_result() local 71 bExp = (arg2 >> 23) & 0xff; in f_maddsub_nan_result() 77 if (((aExp == 0xff) || (bExp == 0xff)) && (cExp == 0xff)) { in f_maddsub_nan_result()
|
| /openbmc/fb-ipmi-oem/src/ |
| H A D | storagecommands.cpp | 740 int8_t bExp; in ipmiStorageGetSDR() local 743 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in ipmiStorageGetSDR() 775 record.body.r_b_exponents = bExp & 0x7; in ipmiStorageGetSDR() 776 if (bExp < 0) in ipmiStorageGetSDR()
|
| /openbmc/docs/architecture/ |
| H A D | sensor-architecture.md | 398 y = L[(Mx + B * 10^(bExp)) * 10^(rExp)] 405 - bExp: 4 bits, signed, `bExp` in YAML 425 bExp: 0
|
| /openbmc/qemu/target/m68k/ |
| H A D | softfloat.c | 123 int32_t aExp, bExp, shiftCount; in floatx80_scale() local 130 bExp = extractFloatx80Exp(b); in floatx80_scale() 133 if (bExp == 0x7FFF) { in floatx80_scale() 151 if (bExp < 0x3FFF) { in floatx80_scale() 157 if (bExp < 0x3FFF) { in floatx80_scale() 161 if (0x400F < bExp) { in floatx80_scale() 167 shiftCount = 0x403E - bExp; in floatx80_scale()
|