fInt
fInt fSM_A0, fSM_A1, fSM_A2, fSM_A3, fSM_A4, fSM_A5, fSM_A6, fSM_A7;
fInt fMargin_RO_a, fMargin_RO_b, fMargin_RO_c, fMargin_fixed, fMargin_FMAX_mean, fMargin_Plat_mean, fMargin_FMAX_sigma, fMargin_Plat_sigma, fMargin_DC_sigma;
fInt fLkg_FT, repeat;
fInt fMicro_FMAX, fMicro_CR, fSigma_FMAX, fSigma_CR, fSigma_DC, fDC_SCLK, fSquared_Sigma_DC, fSquared_Sigma_CR, fSquared_Sigma_FMAX;
fInt fRLL_LoadLine, fPowerDPMx, fDerateTDP, fVDDC_base, fA_Term, fC_Term, fB_Term, fRO_DC_margin;
fInt fRO_fused, fCACm_fused, fCACb_fused, fKv_m_fused, fKv_b_fused, fKt_Beta_fused, fFT_Lkg_V0NORM;
fInt fSclk_margin, fSclk, fEVV_V;
fInt fV_min, fV_max, fT_prod, fLKG_Factor, fT_FT, fV_FT, fV_x, fTDP_Power, fTDP_Power_right, fTDP_Power_left, fTDP_Current, fV_NL;
fInt fLn_MaxDivMin, fMin, fAverage, fRange;
fInt fRoots[2];
fInt fStepSize = GetScaledFraction(625, 100000);
static fInt fExponential(fInt exponent) /*Can be used to calculate e^exponent*/
fInt fPositiveOne = ConvertToFraction(1);
fInt fZERO = ConvertToFraction(0);
fInt lower_bound = Divide(78, 10000);
fInt solution = fPositiveOne; /*Starting off with baseline of 1 */
fInt error_term;
static fInt fNaturalLog(fInt value)
fInt upper_bound = Divide(8, 1000);
fInt fNegativeOne = ConvertToFraction(-1);
fInt solution = ConvertToFraction(0); /*Starting off with baseline of 0 */
fInt error_term;
static fInt fDecodeLinearFuse(uint32_t fuse_value, fInt f_min, fInt f_range, uint32_t bitlength)
fInt f_fuse_value = Convert_ULONG_ToFraction(fuse_value);
fInt f_bit_max_value = Convert_ULONG_ToFraction((uPow(2, bitlength)) - 1);
fInt f_decoded_value;
static fInt fDecodeLogisticFuse(uint32_t fuse_value, fInt f_average, fInt f_range, uint32_t bitlength)
fInt f_fuse_value = Convert_ULONG_ToFraction(fuse_value);
fInt f_bit_max_value = Convert_ULONG_ToFraction((uPow(2, bitlength)) - 1);
fInt f_CONSTANT_NEG13 = ConvertToFraction(-13);
fInt f_CONSTANT1 = ConvertToFraction(1);
fInt f_decoded_value;
static fInt fDecodeLeakageID (uint32_t leakageID_fuse, fInt ln_max_div_min, fInt f_min, uint32_t bitlength)
fInt fLeakage;
fInt f_bit_max_value = Convert_ULONG_ToFraction((uPow(2, bitlength)) - 1);
static fInt ConvertToFraction(int X) /*Add all range checking here. Is it possible to make fInt a private declaration? */
fInt temp;
static fInt fNegate(fInt X)
fInt CONSTANT_NEGONE = ConvertToFraction(-1);
static fInt Convert_ULONG_ToFraction(uint32_t X)
fInt temp;
static fInt GetScaledFraction(int X, int factor)
fInt fValue;
static fInt fAdd (fInt X, fInt Y)
fInt Sum;
static fInt fSubtract (fInt X, fInt Y)
fInt Difference;
static bool Equal(fInt A, fInt B)
static bool GreaterThan(fInt A, fInt B)
static fInt fMultiply (fInt X, fInt Y) /* Uses 64-bit integers (int64_t) */
fInt Product;
static fInt fDivide (fInt X, fInt Y)
fInt fZERO, fQuotient;
static int ConvertBackToInteger (fInt A) /*THIS is the function that will be used to check with the Golden settings table*/
fInt fullNumber, scaledDecimal, scaledReal;
static fInt fGetSquare(fInt A)
static fInt fSqrt(fInt num)
fInt F_divide_Fprime, Fprime;
fInt test;
fInt twoShifted;
fInt x_new, x_old, C, y;
fInt fZERO = ConvertToFraction(0);
static void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[])
fInt *pRoots = &Roots[0];
fInt temp, root_first, root_second;
fInt f_CONSTANT10, f_CONSTANT100;
static int GetReal (fInt A)
static fInt Divide (int X, int Y)
fInt A, B, Quotient;
static int uGetScaledDecimal (fInt A) /*Converts the fractional portion to whole integers - Costly function */
static fInt ConvertToFraction(int); /* Use this to convert an INT to a FINT */
static fInt Convert_ULONG_ToFraction(uint32_t); /* Use this to convert an uint32_t to a FINT */
static fInt fRoundUpByStepSize(fInt A, fInt fStepSize, bool error_term)
fInt solution;
static fInt GetScaledFraction(int, int); /* Use this to convert an INT to a FINT after scaling it by a factor */
static int ConvertBackToInteger(fInt); /* Convert a FINT back to an INT that is scaled by 1000 (i.e. last 3 digits are the decimal digits) */
static fInt fNegate(fInt); /* Returns -1 * input fInt value */
static fInt fAdd (fInt, fInt); /* Returns the sum of two fInt numbers */
static fInt fSubtract (fInt A, fInt B); /* Returns A-B - Sometimes easier than Adding negative numbers */
static fInt fMultiply (fInt, fInt); /* Returns the product of two fInt numbers */
static fInt fDivide (fInt A, fInt B); /* Returns A/B */
static fInt fGetSquare(fInt); /* Returns the square of a fInt number */
static fInt fSqrt(fInt); /* Returns the Square Root of a fInt number */
static void SolveQuadracticEqn(fInt, fInt, fInt, fInt[]); /* Returns the 2 roots via the array */
static bool Equal(fInt, fInt); /* Returns true if two fInts are equal to each other */
static bool GreaterThan(fInt A, fInt B); /* Returns true if A > B */
static fInt fExponential(fInt exponent); /* Can be used to calculate e^exponent */
static fInt fNaturalLog(fInt value); /* Can be used to calculate ln(value) */
static fInt fDecodeLinearFuse(uint32_t fuse_value, fInt f_min, fInt f_range, uint32_t bitlength);
static fInt fDecodeLogisticFuse(uint32_t fuse_value, fInt f_average, fInt f_range, uint32_t bitlength);
static fInt fDecodeLeakageID (uint32_t leakageID_fuse, fInt ln_max_div_min, fInt f_min, uint32_t bitlength);
static fInt Divide (int, int); /* Divide two INTs and return result as FINT */
static fInt fNegate(fInt);
static int uGetScaledDecimal (fInt); /* Internal function */
static int GetReal (fInt A); /* Internal function */