Sina.Sattari Posted September 19, 2009 Posted September 19, 2009 Today I was trying to understand the following text in Power PMAC software reference manual which explained the conversion from Gate3[].PhaseFreq to upper 16 bits of Gate3[].PhaseServoClockCtrl. [quote]The partial-word element PhaseFreq is stored as a normalized 16-bit floating-point value with a 4-bit exponent (base 2) in bits 28 – 31 and a 12-bit fractional mantissa (implied “1”) in bits 16 – 27. The stored value is divided down by a factor of 35.76 (600,000,000/16,777,216) from the value entered into the element.[/quote] I had to do this calculation in C so I had to understand the conversion, so I made the following Excel spreadsheet. It should be self-explanatory. [attachment=1344:name]
Recommended Posts