src/occ_405/wof/wof.c
/**
 * calculate_multiplier
 *
 * Description: This function calculates the 'm' in the formula
 * y ~= (T*m) >> 10 by choosing the appropriate row in
 * G_wof_iddq_mult_table based on the passed in temp, and interpolates
 * the values of the 'm' column in order to find the appropriate multiplier
 *
 * Param: the delta temp between tvpd_leak and a temperature sensor. Used
 *        to find the appropriate row index into G_wof_iddq_mult_table.
 *
 * Return: The multiplier representing the temperature factor
 */
calculate_multiplier
Description: This function calculates the 'm' in the formula
y ~= (T*m) >> 10 by choosing the appropriate row in
G_wof_iddq_mult_table based on the passed in temp, and interpolates
the values of the 'm' column in order to find the appropriate multiplier

the delta temp between tvpd_leak and a temperature sensor. Used
to find the appropriate row index into G_wof_iddq_mult_table.

The multiplier representing the temperature factor
calculate_multiplier Description : This function calculates the ' m ' in the formula y ~ = ( T * m ) >> 10 by choosing the appropriate row in G_wof_iddq_mult_table based on the passed in temp and interpolates the values of the ' m ' column in order to find the appropriate multiplier the delta temp between tvpd_leak and a temperature sensor . Used to find the appropriate row index into G_wof_iddq_mult_table . The multiplier representing the temperature factor
uint32_t calculate_multiplier( int32_t i_temp )
{
    int mult_idx;
    if( i_temp < G_wof_iddq_mult_table[0][0] )
    {
        mult_idx = 0;
    }
    else if( i_temp >= G_wof_iddq_mult_table[WOF_IDDQ_MULT_TABLE_N-1][0] )
    {
        mult_idx = WOF_IDDQ_MULT_TABLE_N - 2;
    }
    else
    {
        for(mult_idx = 0 ; mult_idx < WOF_IDDQ_MULT_TABLE_N-1; mult_idx++)
        {
            if( (G_wof_iddq_mult_table[mult_idx][0] <= i_temp) &&
                (G_wof_iddq_mult_table[mult_idx+1][0] >= i_temp) )
            {
                break;
            }
        }
    }
    return interpolate_linear( i_temp,
                      (int32_t)G_wof_iddq_mult_table[mult_idx][0],
                      (int32_t)G_wof_iddq_mult_table[mult_idx+1][0],
                      (int32_t)G_wof_iddq_mult_table[mult_idx][1],
                      (int32_t)G_wof_iddq_mult_table[mult_idx+1][1]);
}
uint32_t calculate_multiplier ( int32_t i_temp ) { int mult_idx ; if ( i_temp < G_wof_iddq_mult_table [ 0 ] [ 0 ] ) { mult_idx = 0 ; } else if ( i_temp >= G_wof_iddq_mult_table [ WOF_IDDQ_MULT_TABLE_N - 1 ] [ 0 ] ) { mult_idx = WOF_IDDQ_MULT_TABLE_N - 2 ; } else { for ( mult_idx = 0 ; mult_idx < WOF_IDDQ_MULT_TABLE_N - 1 ; mult_idx ++ ) { if ( ( G_wof_iddq_mult_table [ mult_idx ] [ 0 ] <= i_temp ) && ( G_wof_iddq_mult_table [ mult_idx + 1 ] [ 0 ] >= i_temp ) ) { break ; } } } return interpolate_linear ( i_temp , ( int32_t ) G_wof_iddq_mult_table [ mult_idx ] [ 0 ] , ( int32_t ) G_wof_iddq_mult_table [ mult_idx + 1 ] [ 0 ] , ( int32_t ) G_wof_iddq_mult_table [ mult_idx ] [ 1 ] , ( int32_t ) G_wof_iddq_mult_table [ mult_idx + 1 ] [ 1 ] ) ; }
calculate_multiplier
 Description: This function calculates the 'm' in the formula
 y ~= (T*m) >> 10 by choosing the appropriate row in
 G_wof_iddq_mult_table based on the passed in temp, and interpolates
 the values of the 'm' column in order to find the appropriate multiplier
calculate_multiplier Description : This function calculates the ' m ' in the formula y ~ = ( T * m ) >> 10 by choosing the appropriate row in G_wof_iddq_mult_table based on the passed in temp and interpolates the values of the ' m ' column in order to find the appropriate multiplier
// mult index now has the row index into G_wof_iddq_mult_table. // use it to calculate the final multiplier