DEENESPTFRRUARHIKOZHNL

MFx Library (Mfx)

ModulMfx (MFx Library)
BSW-Modul-ID211
Standard-Header#include "Mfx.h"
SWS-SpezifikationAUTOSAR_CP_SWS_MFXLibrary.pdf, AUTOSAR_SWS_MFXLibrary.pdf
Umfang178 Records · 0 Snippets
ClusterAUTOSAR-Bibliotheken

MFx Library (Mfx)

AUTOSAR Classic Libraries-Modul MFx Library (Mfx, Spezifikation: AUTOSAR_CP_SWS_MFXLibrary.pdf, AUTOSAR_SWS_MFXLibrary.pdf).

Funktionen — Übersicht

Anforderungen — Übersicht

Funktionen — Detailansicht

fonction Mfx_Add_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00002] 📄 PDF

<OutType> Mfx_Add_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

This routine makes an addition between the two arguments.

fonction Mfx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00009] 📄 PDF

<OutType> Mfx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

This routine makes a subtraction between the two arguments.

fonction Mfx_Abs_<InTypeMn1>_<OutTypeMn> [SWS_Mfx_00013] 📄 PDF

<OutType> Mfx_Abs_<InTypeMn1>_<OutTypeMn>(<InType1> x_value);

This routine computes the absolute value of a signed value.

fonction Mfx_AbsDiff_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00017] 📄 PDF

<OutType> Mfx_AbsDiff_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

This routine computes the absolute value of a difference between 2 values.

fonction Mfx_Mul_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00021] 📄 PDF

<OutType> Mfx_Mul_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

This routine makes a multiplication between the two arguments.

fonction Mfx_Div_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00025] 📄 PDF

<OutType> Mfx_Div_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

These routines make a division between the two arguments.

fonction Mfx_RDiv_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00032] 📄 PDF

<OutType> Mfx_RDiv_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

These routines make a division between the two arguments.

fonction Mfx_MulDiv_<InTypeMn1><InTypeMn2><InTypeMn3>_<OutTypeMn> [SWS_Mfx_00039] 📄 PDF

<OutType> Mfx_MulDiv_<InTypeMn1><InTypeMn2><InTypeMn3>_<OutTypeMn>(<InType1> x_value, <InType2> y_value, <InType3> z_value);

These routines make a multiplication between the two arguments and a division by the third argument.

fonction Mfx_RMulDiv_<InTypeMn1><InTypeMn2><InTypeMn3>_<OutTypeMn> [SWS_Mfx_00046] 📄 PDF

<OutType> Mfx_RMulDiv_<InTypeMn1><InTypeMn2><InTypeMn3>_<OutTypeMn>(<InType1> x_value, <InType2> y_value, <InType3> z_value);

These routines make a multiplication between the two arguments and a division by the third argument.

fonction Mfx_MulShRight_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00053] 📄 PDF

<OutType> Mfx_MulShRight_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value, uint8 shift);

This routine makes a multiplication between the two arguments and applies a shift right defined by the third argument.

fonction Mfx_DivShLeft_<InTypeMn1><InTypeMn2>u8_<OutTypeMn> [SWS_Mfx_00058] 📄 PDF

<OutType> Mfx_DivShLeft_<InTypeMn1><InTypeMn2>u8_<OutTypeMn>(<InType1> x_value, <InType2> y_value, uint8 shift);

This routine applies a shift left defined by the third argument to the first argument, and then makes a division by the second argument.

fonction Mfx_Mod_<TypeMn> [SWS_Mfx_00065] 📄 PDF

<Type> Mfx_Mod_<TypeMn>(<Type> x_value, <Type> y_value); ⚠️

This routine returns the remainder of the division x_value / y_value if y_value is not zero.

fonction Mfx_Limit_<TypeMn> [SWS_Mfx_00073] 📄 PDF

<Type> Mfx_Limit_<TypeMn>(<Type> value, <Type> min_value, <Type> max_value); ⚠️

This routine limits the input value between Lower Bound and Upper Bound.

fonction Mfx_Minmax_<TypeMn> [SWS_Mfx_00082] 📄 PDF

<Type> Mfx_Minmax_<TypeMn>(<Type> value, <Type> minmax_value); ⚠️

The routine limits a value to a minimum or a maximum that depends on the sign of the minmax_ value.

fonction Mfx_ConvertP2_<InTypeMn>_<OutTypeMn> [SWS_Mfx_00100] 📄 PDF

<OutType> Mfx_ConvertP2_<InTypeMn>_<OutTypeMn>(<InType> x, sint16 a, sint16 c);

The routine converts a scaled 16-bit integer to a scaled 8-bit integer.

fonction Mfx_ConvertP2_<InTypeMn>_<OutTypeMn> [SWS_Mfx_00106] 📄 PDF

<OutType> Mfx_ConvertP2_<InTypeMn>_<OutTypeMn>(<InType> x, sint16 a, sint16 c);

The routine converts a scaled 8-bit integer to a scaled 16-bit integer.

fonction Mfx_ConvertP2_<InTypeMn>_<OutTypeMn> [SWS_Mfx_00112] 📄 PDF

<OutType> Mfx_ConvertP2_<InTypeMn>_<OutTypeMn>(<InType> x, sint16 a, sint16 c);

The routine converts a scaled 32-bit integer to a scaled 16-bit integer.

fonction Mfx_ConvertP2_<InTypeMn>_<OutTypeMn> [SWS_Mfx_00118] 📄 PDF

<OutType> Mfx_ConvertP2_<InTypeMn>_<OutTypeMn>(<InType> x, sint16 a, sint16 c);

The routine converts a scaled 16-bit integer to a scaled 32-bit integer.

fonction Mfx_MulP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00124] 📄 PDF

<OutType> Mfx_MulP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine multiplies two 16-bit integers with scaling factors set by input parameters.

fonction Mfx_MulP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00130] 📄 PDF

<OutType> Mfx_MulP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine multiplies two 32-bit integers with scaling factors set by input parameters.

fonction Mfx_DivP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00136] 📄 PDF

<OutType> Mfx_DivP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine divides two 16-bit integers with scaling factors set by input parameters.

fonction Mfx_DivP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00144] 📄 PDF

<OutType> Mfx_DivP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine divides two 32-bit integers with scaling factors set by input parameters.

fonction Mfx_AddP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00152] 📄 PDF

<OutType> Mfx_AddP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine adds two 16-bit integers with scaling factors set by input parameters.

fonction Mfx_AddP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00158] 📄 PDF

<OutType> Mfx_AddP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine adds two 32-bit integers with scaling factors set by input parameters.

fonction Mfx_SubP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00164] 📄 PDF

<OutType> Mfx_SubP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine subtracts two 16-bit integers with scaling factors set by input parameters.

fonction Mfx_SubP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00170] 📄 PDF

<OutType> Mfx_SubP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine subtracts two 32-bit integers with scaling factors set by input parameters.

fonction Mfx_AbsDiffP2_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Mfx_00176] 📄 PDF

<OutType> Mfx_AbsDiffP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine subtracts and takes the absolute value of two 16-bit integers with scaling factors set by input parameters.

fonction Mfx_AbsP2_s16_<OutTypeMn> [SWS_Mfx_00182] 📄 PDF

<OutType> Mfx_AbsP2_s16_<OutTypeMn>(<InType1> x, sint16 a, sint16 c);

The routine takes the absolute value of a 16-bit integer with scaling factors set by input parameters.

fonction Mfx_AbsP2_s32_<OutTypeMn> [SWS_Mfx_00188] 📄 PDF

<OutType> Mfx_AbsP2_s32_<OutTypeMn>(<InType1> x, sint16 a, sint16 c);

The routine takes the absolute value of a 32-bit integer with scaling factors set by input parameters.

requirement SWS_Mfx_00001 [SWS_Mfx_00001] 📄 PDF

The MFX module shall provide the following files: • C files, Mfx_<name>.c used to implement the library. All C files shall be prefixed with 'Mfx'.

requirement SWS_Mfx_00006 [SWS_Mfx_00006] 📄 PDF

This routine makes an addition between the two arguments: Return-value = x_value + y_value

requirement SWS_Mfx_00007 [SWS_Mfx_00007] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00010 [SWS_Mfx_00010] 📄 PDF

This routine makes a subtraction between the two arguments: Return-value = x_value - y_value

requirement SWS_Mfx_00011 [SWS_Mfx_00011] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00014 [SWS_Mfx_00014] 📄 PDF

This routine computes the absolute value of a signed value: Return-value = | x_value |

requirement SWS_Mfx_00015 [SWS_Mfx_00015] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00018 [SWS_Mfx_00018] 📄 PDF

This routine computes the absolute value of a difference between 2 values: Return-value = | x_value - y_value |

requirement SWS_Mfx_00019 [SWS_Mfx_00019] 📄 PDF

Return-value shall be saturated to boundary values in the event of overflow.

requirement SWS_Mfx_00022 [SWS_Mfx_00022] 📄 PDF

This routine makes a multiplication between the two arguments: Return-value = x_value * y_value

requirement SWS_Mfx_00023 [SWS_Mfx_00023] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00026 [SWS_Mfx_00026] 📄 PDF

These routines make a division between the two arguments: Return-value = x_value / y_value

requirement SWS_Mfx_00027 [SWS_Mfx_00027] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00028 [SWS_Mfx_00028] 📄 PDF

The result after division by zero is defined by: * If x_value  0 then the function returns the maximum value of the output type * If x_value < 0 then the function returns the minimum value of the output type

requirement SWS_Mfx_00033 [SWS_Mfx_00033] 📄 PDF

These routines make a division between the two arguments: Return-value = x_value / y_value

requirement SWS_Mfx_00034 [SWS_Mfx_00034] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00035 [SWS_Mfx_00035] 📄 PDF

The result after division by zero is defined by: * If x_value  0 then the function returns the maximum value of the output type * If x_value < 0 then the function returns the minimum value of the output type

requirement SWS_Mfx_00040 [SWS_Mfx_00040] 📄 PDF

These routines make a multiplication between the two arguments and a division by the third argument: Return-value = x_value * y_value / z_value

requirement SWS_Mfx_00041 [SWS_Mfx_00041] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00042 [SWS_Mfx_00042] 📄 PDF

The result after division by zero is defined by: * If x_value*y_value  0 then the function returns the maximum value of the output type * If x_value*y_value < 0 then the function returns the minimum value of the output type

requirement SWS_Mfx_00047 [SWS_Mfx_00047] 📄 PDF

These routines make a multiplication between the two arguments and a division by the third argument: Return-value = x_value * y_value / z_value

requirement SWS_Mfx_00048 [SWS_Mfx_00048] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00049 [SWS_Mfx_00049] 📄 PDF

The result after division by zero is defined by: * If x_value*y_value  0 then the function returns the maximum value of the output type * If x_value*y_value < 0 then the function returns the minimum value of the output type

requirement SWS_Mfx_00054 [SWS_Mfx_00054] 📄 PDF

This routine makes a multiplication between the two arguments and applies a shift right defined by the third argument: Return-value = (x_value * y_value) >> shift

requirement SWS_Mfx_00055 [SWS_Mfx_00055] 📄 PDF

We precise that for the shift right of a negative number, we always keep the bit of sign.

requirement SWS_Mfx_00056 [SWS_Mfx_00056] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00059 [SWS_Mfx_00059] 📄 PDF

This routine applies a shift left defined by the third argument to the first argument, and then makes a division by the second argument: Return-value = (x_value << shift) / y_value

requirement SWS_Mfx_00060 [SWS_Mfx_00060] 📄 PDF

We precise that for the shift left of a negative number, we always keep the bit of sign.

requirement SWS_Mfx_00061 [SWS_Mfx_00061] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00062 [SWS_Mfx_00062] 📄 PDF

The result after division by zero is defined by: * If x_value  0 then the function returns the maximum value of the output type * If x_value < 0 then the function returns the minimum value of the output type

requirement SWS_Mfx_00101 [SWS_Mfx_00101] 📄 PDF

The function returns the integer value of the fixed point conversion (C), determined by C = 2ˆ(c-a) * x.

requirement SWS_Mfx_00102 [SWS_Mfx_00102] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00103 [SWS_Mfx_00103] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00107 [SWS_Mfx_00107] 📄 PDF

The function returns the integer value of the fixed point conversion (C), determined by C = 2ˆ(c-a) * x.

requirement SWS_Mfx_00108 [SWS_Mfx_00108] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00109 [SWS_Mfx_00109] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00113 [SWS_Mfx_00113] 📄 PDF

The function returns the integer value of the fixed point conversion (C), determined by C = 2ˆ(c-a) * x.

requirement SWS_Mfx_00114 [SWS_Mfx_00114] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00115 [SWS_Mfx_00115] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00119 [SWS_Mfx_00119] 📄 PDF

The function returns the integer value of the fixed point conversion (C), determined by C = 2ˆ(c-a) * x.

requirement SWS_Mfx_00120 [SWS_Mfx_00120] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00121 [SWS_Mfx_00121] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00125 [SWS_Mfx_00125] 📄 PDF

The function returns the integer value of the fixed point multiplica- tion (C), determined by C = 2ˆ(c-b-a) * [x * y].

requirement SWS_Mfx_00126 [SWS_Mfx_00126] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00127 [SWS_Mfx_00127] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00131 [SWS_Mfx_00131] 📄 PDF

The function returns the integer value of the fixed point multiplica- tion (C), determined by C = 2ˆ(c-b-a) * [x * y].

requirement SWS_Mfx_00132 [SWS_Mfx_00132] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00133 [SWS_Mfx_00133] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00137 [SWS_Mfx_00137] 📄 PDF

The function returns the integer value of the fixed point quotient (C), determined by C = [2ˆ(c+b-a) * x] / y.

requirement SWS_Mfx_00138 [SWS_Mfx_00138] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00139 [SWS_Mfx_00139] 📄 PDF

If the divisor, y, is zero, the result is defined by: * If x  0 then the function returns the maximum value of the output type * If x < 0 then the function returns the minimum value of the output type

requirement SWS_Mfx_00141 [SWS_Mfx_00141] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00145 [SWS_Mfx_00145] 📄 PDF

The function returns the integer value of the fixed point quotient (C), determined by C = [2ˆ(c+b-a) * x] / y.

requirement SWS_Mfx_00146 [SWS_Mfx_00146] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00147 [SWS_Mfx_00147] 📄 PDF

If the divisor, y, is zero, the result is defined by: * If x  0 then the function returns the maximum value of the output type * If x < 0 then the function returns the minimum value of the output type

requirement SWS_Mfx_00149 [SWS_Mfx_00149] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00153 [SWS_Mfx_00153] 📄 PDF

The function returns the integer value of the fixed point sum (C), determined by a  b: C = 2ˆ(c-a) * [x + (y * 2ˆ(a-b))], a < b: C = 2ˆ(c-b) * [(x * 2ˆ(b-a)) + y].

requirement SWS_Mfx_00154 [SWS_Mfx_00154] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00155 [SWS_Mfx_00155] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00159 [SWS_Mfx_00159] 📄 PDF

The function returns the integer value of the fixed point sum (C), determined by a  b: C = 2ˆ(c-a) * [x + (y * 2ˆ(a-b))], a < b: C = 2ˆ(c-b) * [(x * 2ˆ(b-a)) + y]

requirement SWS_Mfx_00160 [SWS_Mfx_00160] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00161 [SWS_Mfx_00161] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00165 [SWS_Mfx_00165] 📄 PDF

The function returns the integer value of the fixed point difference (C), determined by a  b: C = 2ˆ(c-a) * [x - (y * 2ˆ(a-b))], a < b: C = 2ˆ(c-b) * [(x * 2ˆ(b-a)) - y]

requirement SWS_Mfx_00166 [SWS_Mfx_00166] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00167 [SWS_Mfx_00167] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00171 [SWS_Mfx_00171] 📄 PDF

The function returns the integer value of the fixed point difference (C), determined by a  b: C = 2ˆ(c-a) * [x - (y * 2ˆ(a-b))], a < b: C = 2ˆ(c-b) * [(x * 2ˆ(b-a)) - y].

requirement SWS_Mfx_00172 [SWS_Mfx_00172] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00173 [SWS_Mfx_00173] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00177 [SWS_Mfx_00177] 📄 PDF

The function returns the integer value of the fixed point absolute difference (C), determined by a  b: C = 2ˆ(c-a) * |x - (y * 2ˆ(a-b))|, a < b: C = 2ˆ(c-b) * |(x * 2ˆ(b-a)) - y|.

requirement SWS_Mfx_00178 [SWS_Mfx_00178] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00179 [SWS_Mfx_00179] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00183 [SWS_Mfx_00183] 📄 PDF

The function returns the integer value of the fixed point absolute value (C), deter-mined by C = 2ˆ(c-a) * |x|.

requirement SWS_Mfx_00184 [SWS_Mfx_00184] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00185 [SWS_Mfx_00185] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00189 [SWS_Mfx_00189] 📄 PDF

The function returns the integer value of the fixed point absolute value (C), deter-mined by C = 2ˆ(c-a) * |x|.

requirement SWS_Mfx_00190 [SWS_Mfx_00190] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Mfx_00191 [SWS_Mfx_00191] 📄 PDF

If it is necessary to round the result of this equation, it is rounded toward zero.

requirement SWS_Mfx_00200 [SWS_Mfx_00200] 📄 PDF

MFX library shall not require initialization phase. A Library func- tion may be called at the very first step of ECU initialization, e.g. even by the OS or EcuM, thus the library shall be ready.

requirement SWS_Mfx_00203 [SWS_Mfx_00203] 📄 PDF

MFX API can be directly called from BSW modules or SWC. No port definition is required. It is a pure function call.

requirement SWS_Mfx_00205 [SWS_Mfx_00205] 📄 PDF

Using a library should be documented. if a BSW module or a SWC uses a Library, the developer should add an Implementation-DependencyOnAr- tifact in the BSW/SWC template. minVersion and maxVersion parameters correspond to the supplier version. In case of AUTOSAR library, these parameters may be left empty because a SWC or BSW module may rely on a library behaviour, not on a supplier implementation. However, the SWC or BSW modules shall be compatible with the AUTOSAR platform where they are integrated.

requirement SWS_Mfx_00206 [SWS_Mfx_00206] 📄 PDF

The MFX library shall be implemented in a way that the code can be shared among callers in different memory partitions.

requirement SWS_Mfx_00207 [SWS_Mfx_00207] 📄 PDF

Usage of macros should be avoided. The function should be de- clared as function or inline function. Macro #define should not be used.

requirement SWS_Mfx_00208 [SWS_Mfx_00208] 📄 PDF

A library function shall not call any BSW modules functions, e.g. the DET. A library function can call other library functions. Because a library function shall be re-entrant. But other BSW modules functions may not be re-entrant.

requirement SWS_Mfx_00209 [SWS_Mfx_00209] 📄 PDF

The library, written in C programming language, should conform to the MISRA C Standard. Please refer to SWS_BSW_00115 for more details.

requirement SWS_Mfx_00210 [SWS_Mfx_00210] 📄 PDF

Each AUTOSAR library Module implementation <library>*.c and <library>*.h shall map their code to memory sections using the AUTOSAR memory mapping mechanism.

requirement SWS_Mfx_00211 [SWS_Mfx_00211] 📄 PDF

Each AUTOSAR library Module implementation <library>*.c, that uses AUTOSAR integer data types and/or the standard return, shall include the header file Std_Types.h.

requirement SWS_Mfx_00212 [SWS_Mfx_00212] 📄 PDF

All AUTOSAR library Modules should use the AUTOSAR data types (integers, boolean) instead of native C data types, unless this library is clearly identified to be compliant only with a platform.

requirement SWS_Mfx_00213 [SWS_Mfx_00213] 📄 PDF

All AUTOSAR library Modules should avoid direct use of compiler and platform specific keyword, unless this library is clearly identified to be compliant only with a platform.

requirement SWS_Mfx_00214 [SWS_Mfx_00214] 📄 PDF

The standardized common published parameters as required by SRS_BSW_00402 in the SRS General on Basic Software Modules [chapter 3.1] shall be published within the header file of this module and need to be provided in the BSW Module De- scription. The according module abbreviation can be found in the List of Basic Software Modules [chapter 3.1] .

requirement SWS_Mfx_00216 [SWS_Mfx_00216] 📄 PDF

If source code for caller and callee of Mfx_ GetVersionInfo is avail- able, the Mfx library should realize Mfx_ GetVersionInfo as a macro defined in the module's header file.

requirement SWS_Mfx_00218 [SWS_Mfx_00218] 📄 PDF

The MFX library shall not have any configuration options that may affect the functional behavior of the routines. I.e. for a given set of input parameters, the outputs shall be always the same. For example, the returned value in case of error shall not be configurable.

requirement SWS_Mfx_00220 [SWS_Mfx_00220] 📄 PDF

Error detection: Function should check at runtime (both in pr o- duction and development code) the value of input parameters, especially cases where erroneous value can bring to fatal error or unpredictable result, if they have the va l ues allowed by the function specification. All the error cases shall be listed in SWS and the function should return a spec i fied value (in SWS) that is not configurable. This value is dependant of the function and the error case so it is determined case by case. If values passed to the routines are not valid and out o f the function specification, then such error are not detected. E.g. If passed value > 32 for a bit - position or a negative number of samples of an axis distribution is passed to a routine.

requirement SWS_Mfx_00223 [SWS_Mfx_00223] 📄 PDF

Extract the sign of an integer value. It is defined as follows: Return-value = -1, if x_value < 0; 0, if x_value == 0; 1, if x_value > 0

requirement SWS_Mfx_00225 [SWS_Mfx_00225] 📄 PDF

Integral promotion has to be adhered to when implementing Mfx services. Thus, to obtain maximal precision, intermediate results shall not be limited.

requirement SWS_Mfx_00227 [SWS_Mfx_00227] 📄 PDF

Section 7.1 "Error Handling" of the document "General Specifica- tion of Basic Software Modules" describes the error handling of the Basic Software in detail. Above all, it constitutes a classification scheme consisting of five error types which may occur in BSW modules.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_Mfx
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Mfx@rel:R20-11#cb5b76bd
Content hash
cb5b76bd
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_MFXLibrary.pdf#nameddest=SWS_Mfx_00002

Carte des thèmes

Initialisation et état

1

Exigences

145
SWS_Mfx_00001SWS_Mfx_00006SWS_Mfx_00007SWS_Mfx_00008SWS_Mfx_00010SWS_Mfx_00011SWS_Mfx_00012SWS_Mfx_00014SWS_Mfx_00015SWS_Mfx_00016SWS_Mfx_00018SWS_Mfx_00019SWS_Mfx_00020SWS_Mfx_00022SWS_Mfx_00023SWS_Mfx_00024SWS_Mfx_00026SWS_Mfx_00027SWS_Mfx_00028SWS_Mfx_00030SWS_Mfx_00031SWS_Mfx_00033SWS_Mfx_00034SWS_Mfx_00035SWS_Mfx_00037SWS_Mfx_00038SWS_Mfx_00040SWS_Mfx_00041SWS_Mfx_00042SWS_Mfx_00044SWS_Mfx_00045SWS_Mfx_00047SWS_Mfx_00048SWS_Mfx_00049SWS_Mfx_00051SWS_Mfx_00052SWS_Mfx_00054SWS_Mfx_00055SWS_Mfx_00056SWS_Mfx_00057SWS_Mfx_00059SWS_Mfx_00060SWS_Mfx_00061SWS_Mfx_00062SWS_Mfx_00064SWS_Mfx_00066SWS_Mfx_00068SWS_Mfx_00069SWS_Mfx_00070SWS_Mfx_00074SWS_Mfx_00075SWS_Mfx_00076SWS_Mfx_00079SWS_Mfx_00083SWS_Mfx_00084SWS_Mfx_00085SWS_Mfx_00086SWS_Mfx_00091SWS_Mfx_00092SWS_Mfx_00094SWS_Mfx_00095SWS_Mfx_00096SWS_Mfx_00101SWS_Mfx_00102SWS_Mfx_00103SWS_Mfx_00104SWS_Mfx_00107SWS_Mfx_00108SWS_Mfx_00109SWS_Mfx_00110SWS_Mfx_00113SWS_Mfx_00114SWS_Mfx_00115SWS_Mfx_00116SWS_Mfx_00119SWS_Mfx_00120SWS_Mfx_00121SWS_Mfx_00122SWS_Mfx_00125SWS_Mfx_00126SWS_Mfx_00127SWS_Mfx_00128SWS_Mfx_00131SWS_Mfx_00132SWS_Mfx_00133SWS_Mfx_00134SWS_Mfx_00137SWS_Mfx_00138SWS_Mfx_00139SWS_Mfx_00141SWS_Mfx_00142SWS_Mfx_00145SWS_Mfx_00146SWS_Mfx_00147SWS_Mfx_00149SWS_Mfx_00150SWS_Mfx_00153SWS_Mfx_00154SWS_Mfx_00155SWS_Mfx_00156SWS_Mfx_00159SWS_Mfx_00160SWS_Mfx_00161SWS_Mfx_00162SWS_Mfx_00165SWS_Mfx_00166SWS_Mfx_00167SWS_Mfx_00168SWS_Mfx_00171SWS_Mfx_00172SWS_Mfx_00173SWS_Mfx_00174SWS_Mfx_00177SWS_Mfx_00178SWS_Mfx_00179SWS_Mfx_00180SWS_Mfx_00183SWS_Mfx_00184SWS_Mfx_00185SWS_Mfx_00186SWS_Mfx_00189SWS_Mfx_00190SWS_Mfx_00191SWS_Mfx_00192SWS_Mfx_00200SWS_Mfx_00201SWS_Mfx_00203SWS_Mfx_00205SWS_Mfx_00206SWS_Mfx_00207SWS_Mfx_00208SWS_Mfx_00209SWS_Mfx_00210SWS_Mfx_00211SWS_Mfx_00212SWS_Mfx_00213SWS_Mfx_00214SWS_Mfx_00216SWS_Mfx_00217SWS_Mfx_00218SWS_Mfx_00220SWS_Mfx_00222SWS_Mfx_00223SWS_Mfx_00225SWS_Mfx_00227

Vue détaillée

Sélectionnez une entrée dans le plan.

Initialisation et état

Returns the version information of this library.

void Mfx_GetVersionInfo(Std_VersionInfoType* versioninfo);

Services

This routine computes the absolute value of a signed value.

<OutType> Mfx_Abs_<InTypeMn1>_<OutTypeMn>(<InType1> x_value);

This routine computes the absolute value of a difference between 2 values.

<OutType> Mfx_AbsDiff_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

The routine subtracts and takes the absolute value of two 16-bit integers with scaling factors set by input parameters.

<OutType> Mfx_AbsDiffP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine takes the absolute value of a 16-bit integer with scaling factors set by input parameters.

<OutType> Mfx_AbsP2_s16_<OutTypeMn>(<InType1> x, sint16 a, sint16 c);

The routine takes the absolute value of a 32-bit integer with scaling factors set by input parameters.

<OutType> Mfx_AbsP2_s32_<OutTypeMn>(<InType1> x, sint16 a, sint16 c);

This routine makes an addition between the two arguments.

<OutType> Mfx_Add_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

The routine adds two 16-bit integers with scaling factors set by input parameters.

<OutType> Mfx_AddP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine adds two 32-bit integers with scaling factors set by input parameters.

<OutType> Mfx_AddP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine converts a scaled 16-bit integer to a scaled 8-bit integer.

<OutType> Mfx_ConvertP2_<InTypeMn>_<OutTypeMn>(<InType> x, sint16 a, sint16 c);

The routine converts a scaled 8-bit integer to a scaled 16-bit integer.

<OutType> Mfx_ConvertP2_<InTypeMn>_<OutTypeMn>(<InType> x, sint16 a, sint16 c);

The routine converts a scaled 32-bit integer to a scaled 16-bit integer.

<OutType> Mfx_ConvertP2_<InTypeMn>_<OutTypeMn>(<InType> x, sint16 a, sint16 c);

The routine converts a scaled 16-bit integer to a scaled 32-bit integer.

<OutType> Mfx_ConvertP2_<InTypeMn>_<OutTypeMn>(<InType> x, sint16 a, sint16 c);

These routines make a division between the two arguments.

<OutType> Mfx_Div_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

The routine divides two 16-bit integers with scaling factors set by input parameters.

<OutType> Mfx_DivP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine divides two 32-bit integers with scaling factors set by input parameters.

<OutType> Mfx_DivP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

This routine applies a shift left defined by the third argument to the first argument, and then makes a division by the second argument.

<OutType> Mfx_DivShLeft_<InTypeMn1><InTypeMn2>u8_<OutTypeMn>(<InType1> x_value, <InType2> y_value, uint8 shift);

This routine limits the input value between Lower Bound and Upper Bound.

<Type> Mfx_Limit_<TypeMn>(<Type> value, <Type> min_value, <Type> max_value); ⚠️

This routine returns the maximum between two values.

<Type> Mfx_Max_<TypeMn>(<Type> x_value, <Type> y_value); ⚠️

This routine returns the minimum between two values.

<Type> Mfx_Min_<TypeMn>(<Type> x_value, <Type> y_value); ⚠️

The routine limits a value to a minimum or a maximum that depends on the sign of the minmax_ value.

<Type> Mfx_Minmax_<TypeMn>(<Type> value, <Type> minmax_value); ⚠️

This routine returns the remainder of the division x_value / y_value if y_value is not zero.

<Type> Mfx_Mod_<TypeMn>(<Type> x_value, <Type> y_value); ⚠️

This routine makes a multiplication between the two arguments.

<OutType> Mfx_Mul_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

These routines make a multiplication between the two arguments and a division by the third argument.

<OutType> Mfx_MulDiv_<InTypeMn1><InTypeMn2><InTypeMn3>_<OutTypeMn>(<InType1> x_value, <InType2> y_value, <InType3> z_value);

The routine multiplies two 16-bit integers with scaling factors set by input parameters.

<OutType> Mfx_MulP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine multiplies two 32-bit integers with scaling factors set by input parameters.

<OutType> Mfx_MulP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

This routine makes a multiplication between the two arguments and applies a shift right defined by the third argument.

<OutType> Mfx_MulShRight_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value, uint8 shift);

These routines make a division between the two arguments.

<OutType> Mfx_RDiv_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

These routines make a multiplication between the two arguments and a division by the third argument.

<OutType> Mfx_RMulDiv_<InTypeMn1><InTypeMn2><InTypeMn3>_<OutTypeMn>(<InType1> x_value, <InType2> y_value, <InType3> z_value);

Signum function. Extract the sign of an integer value.

sint8 Mfx_Sgn_s32_s8(sint32 x_value);

This routine makes a subtraction between the two arguments.

<OutType> Mfx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

The routine subtracts two 16-bit integers with scaling factors set by input parameters.

<OutType> Mfx_SubP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

The routine subtracts two 32-bit integers with scaling factors set by input parameters.

<OutType> Mfx_SubP2_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x, <InType2> y, sint16 a, sint16 b, sint16 c);

Exigences

SWS_Mfx_00001 requirement

The MFX module shall provide the following files: • C files, Mfx_<name>.c used to implement the library. All C files shall be prefixed with 'Mfx'.

SWS_Mfx_00006 requirement

This routine makes an addition between the two arguments: Return-value = x_value + y_value

SWS_Mfx_00007 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00008 requirement

Here is the list of implemented functions.

SWS_Mfx_00010 requirement

This routine makes a subtraction between the two arguments: Return-value = x_value - y_value

SWS_Mfx_00011 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00012 requirement

Here is the list of implemented functions.

SWS_Mfx_00014 requirement

This routine computes the absolute value of a signed value: Return-value = | x_value |

SWS_Mfx_00015 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00016 requirement

Here is the list of implemented functions.

SWS_Mfx_00018 requirement

This routine computes the absolute value of a difference between 2 values: Return-value = | x_value - y_value |

SWS_Mfx_00019 requirement

Return-value shall be saturated to boundary values in the event of overflow.

SWS_Mfx_00020 requirement

Here is the list of implemented functions.

SWS_Mfx_00022 requirement

This routine makes a multiplication between the two arguments: Return-value = x_value * y_value

SWS_Mfx_00023 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00024 requirement

Here is the list of implemented functions.

SWS_Mfx_00026 requirement

These routines make a division between the two arguments: Return-value = x_value / y_value

SWS_Mfx_00027 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00028 requirement

The result after division by zero is defined by: * If x_value  0 then the function returns the maximum value of the output type * If x_value < 0 then the function returns the minimum value of the output type

SWS_Mfx_00030 requirement

The result is rounded towards 0.

SWS_Mfx_00031 requirement

Here is the list of implemented functions.

SWS_Mfx_00033 requirement

These routines make a division between the two arguments: Return-value = x_value / y_value

SWS_Mfx_00034 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00035 requirement

The result after division by zero is defined by: * If x_value  0 then the function returns the maximum value of the output type * If x_value < 0 then the function returns the minimum value of the output type

SWS_Mfx_00037 requirement

The result is rounded off.

SWS_Mfx_00038 requirement

Here is the list of implemented functions.

SWS_Mfx_00040 requirement

These routines make a multiplication between the two arguments and a division by the third argument: Return-value = x_value * y_value / z_value

SWS_Mfx_00041 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00042 requirement

The result after division by zero is defined by: * If x_value*y_value  0 then the function returns the maximum value of the output type * If x_value*y_value < 0 then the function returns the minimum value of the output type

SWS_Mfx_00044 requirement

The result is rounded towards 0.

SWS_Mfx_00045 requirement

Here is the list of implemented functions.

SWS_Mfx_00047 requirement

These routines make a multiplication between the two arguments and a division by the third argument: Return-value = x_value * y_value / z_value

SWS_Mfx_00048 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00049 requirement

The result after division by zero is defined by: * If x_value*y_value  0 then the function returns the maximum value of the output type * If x_value*y_value < 0 then the function returns the minimum value of the output type

SWS_Mfx_00051 requirement

The result is rounded off.

SWS_Mfx_00052 requirement

Here is the list of implemented functions.

SWS_Mfx_00054 requirement

This routine makes a multiplication between the two arguments and applies a shift right defined by the third argument: Return-value = (x_value * y_value) >> shift

SWS_Mfx_00055 requirement

We precise that for the shift right of a negative number, we always keep the bit of sign.

SWS_Mfx_00056 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00057 requirement

Here is the list of implemented functions.

SWS_Mfx_00059 requirement

This routine applies a shift left defined by the third argument to the first argument, and then makes a division by the second argument: Return-value = (x_value << shift) / y_value

SWS_Mfx_00060 requirement

We precise that for the shift left of a negative number, we always keep the bit of sign.

SWS_Mfx_00061 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00062 requirement

The result after division by zero is defined by: * If x_value  0 then the function returns the maximum value of the output type * If x_value < 0 then the function returns the minimum value of the output type

SWS_Mfx_00064 requirement

Here is the list of implemented functions.

SWS_Mfx_00066 requirement

If y_value is zero, the result is zero.

SWS_Mfx_00068 requirement

In other cases, Return-value = x_value mod y_value

SWS_Mfx_00069 requirement

The sign of the remainder is the same than the sign of x_value.

SWS_Mfx_00070 requirement

Here is the list of implemented functions.

SWS_Mfx_00074 requirement

Return-value = min_value if value < min_value

SWS_Mfx_00075 requirement

Return-value = max_value if value > max_value

SWS_Mfx_00076 requirement

Return-value = value in the other cases

SWS_Mfx_00079 requirement

Here is the list of implemented functions.

SWS_Mfx_00083 requirement

minmax_value if minmax_value  0 and value > minmax_value

SWS_Mfx_00084 requirement

minmax_value if minmax_value < 0 and value < minmax_value

SWS_Mfx_00085 requirement

value in the other cases

SWS_Mfx_00086 requirement

Here is the list of implemented functions.

SWS_Mfx_00091 requirement

Return-value = x_value if x_value < y_value

SWS_Mfx_00092 requirement

Return-value = y_value in the other case

SWS_Mfx_00094 requirement

Return-value = x_value if x_value > y_value

SWS_Mfx_00095 requirement

Return-value = y_value in the other case

SWS_Mfx_00096 requirement

Here is the list of implemented functions.

SWS_Mfx_00101 requirement

The function returns the integer value of the fixed point conversion (C), determined by C = 2ˆ(c-a) * x.

SWS_Mfx_00102 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00103 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00104 requirement

Here is the list of implemented functions.

SWS_Mfx_00107 requirement

The function returns the integer value of the fixed point conversion (C), determined by C = 2ˆ(c-a) * x.

SWS_Mfx_00108 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00109 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00110 requirement

Here is the list of implemented functions.

SWS_Mfx_00113 requirement

The function returns the integer value of the fixed point conversion (C), determined by C = 2ˆ(c-a) * x.

SWS_Mfx_00114 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00115 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00116 requirement

Here is the list of implemented functions.

SWS_Mfx_00119 requirement

The function returns the integer value of the fixed point conversion (C), determined by C = 2ˆ(c-a) * x.

SWS_Mfx_00120 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00121 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00122 requirement

Here is the list of implemented functions.

SWS_Mfx_00125 requirement

The function returns the integer value of the fixed point multiplica- tion (C), determined by C = 2ˆ(c-b-a) * [x * y].

SWS_Mfx_00126 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00127 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00128 requirement

Here is the list of implemented functions.

SWS_Mfx_00131 requirement

The function returns the integer value of the fixed point multiplica- tion (C), determined by C = 2ˆ(c-b-a) * [x * y].

SWS_Mfx_00132 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00133 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00134 requirement

Here is the list of implemented functions.

SWS_Mfx_00137 requirement

The function returns the integer value of the fixed point quotient (C), determined by C = [2ˆ(c+b-a) * x] / y.

SWS_Mfx_00138 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00139 requirement

If the divisor, y, is zero, the result is defined by: * If x  0 then the function returns the maximum value of the output type * If x < 0 then the function returns the minimum value of the output type

SWS_Mfx_00141 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00142 requirement

Here is the list of implemented functions.

SWS_Mfx_00145 requirement

The function returns the integer value of the fixed point quotient (C), determined by C = [2ˆ(c+b-a) * x] / y.

SWS_Mfx_00146 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00147 requirement

If the divisor, y, is zero, the result is defined by: * If x  0 then the function returns the maximum value of the output type * If x < 0 then the function returns the minimum value of the output type

SWS_Mfx_00149 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00150 requirement

Here is the list of implemented functions.

SWS_Mfx_00153 requirement

The function returns the integer value of the fixed point sum (C), determined by a  b: C = 2ˆ(c-a) * [x + (y * 2ˆ(a-b))], a < b: C = 2ˆ(c-b) * [(x * 2ˆ(b-a)) + y].

SWS_Mfx_00154 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00155 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00156 requirement

Here is the list of implemented functions.

SWS_Mfx_00159 requirement

The function returns the integer value of the fixed point sum (C), determined by a  b: C = 2ˆ(c-a) * [x + (y * 2ˆ(a-b))], a < b: C = 2ˆ(c-b) * [(x * 2ˆ(b-a)) + y]

SWS_Mfx_00160 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00161 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00162 requirement

Here is the list of implemented functions.

SWS_Mfx_00165 requirement

The function returns the integer value of the fixed point difference (C), determined by a  b: C = 2ˆ(c-a) * [x - (y * 2ˆ(a-b))], a < b: C = 2ˆ(c-b) * [(x * 2ˆ(b-a)) - y]

SWS_Mfx_00166 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00167 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00168 requirement

Here is the list of implemented functions.

SWS_Mfx_00171 requirement

The function returns the integer value of the fixed point difference (C), determined by a  b: C = 2ˆ(c-a) * [x - (y * 2ˆ(a-b))], a < b: C = 2ˆ(c-b) * [(x * 2ˆ(b-a)) - y].

SWS_Mfx_00172 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00173 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00174 requirement

Here is the list of implemented functions.

SWS_Mfx_00177 requirement

The function returns the integer value of the fixed point absolute difference (C), determined by a  b: C = 2ˆ(c-a) * |x - (y * 2ˆ(a-b))|, a < b: C = 2ˆ(c-b) * |(x * 2ˆ(b-a)) - y|.

SWS_Mfx_00178 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00179 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00180 requirement

Here is the list of implemented functions.

SWS_Mfx_00183 requirement

The function returns the integer value of the fixed point absolute value (C), deter-mined by C = 2ˆ(c-a) * |x|.

SWS_Mfx_00184 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00185 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00186 requirement

Here is the list of implemented functions.

SWS_Mfx_00189 requirement

The function returns the integer value of the fixed point absolute value (C), deter-mined by C = 2ˆ(c-a) * |x|.

SWS_Mfx_00190 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Mfx_00191 requirement

If it is necessary to round the result of this equation, it is rounded toward zero.

SWS_Mfx_00192 requirement

Here is the list of implemented functions.

SWS_Mfx_00200 requirement

MFX library shall not require initialization phase. A Library func- tion may be called at the very first step of ECU initialization, e.g. even by the OS or EcuM, thus the library shall be ready.

SWS_Mfx_00201 requirement

MFX library shall not require a shutdown operation phase.

SWS_Mfx_00203 requirement

MFX API can be directly called from BSW modules or SWC. No port definition is required. It is a pure function call.

SWS_Mfx_00205 requirement

Using a library should be documented. if a BSW module or a SWC uses a Library, the developer should add an Implementation-DependencyOnAr- tifact in the BSW/SWC template. minVersion and maxVersion parameters correspond to the supplier version. In case of AUTOSAR library, these parameters may be left empty because a SWC or BSW module may rely on a library behaviour, not on a supplier implementation. However, the SWC or BSW modules shall be compatible with the AUTOSAR platform where they are integrated.

SWS_Mfx_00206 requirement

The MFX library shall be implemented in a way that the code can be shared among callers in different memory partitions.

SWS_Mfx_00207 requirement

Usage of macros should be avoided. The function should be de- clared as function or inline function. Macro #define should not be used.

SWS_Mfx_00208 requirement

A library function shall not call any BSW modules functions, e.g. the DET. A library function can call other library functions. Because a library function shall be re-entrant. But other BSW modules functions may not be re-entrant.

SWS_Mfx_00209 requirement

The library, written in C programming language, should conform to the MISRA C Standard. Please refer to SWS_BSW_00115 for more details.

SWS_Mfx_00210 requirement

Each AUTOSAR library Module implementation <library>*.c and <library>*.h shall map their code to memory sections using the AUTOSAR memory mapping mechanism.

SWS_Mfx_00211 requirement

Each AUTOSAR library Module implementation <library>*.c, that uses AUTOSAR integer data types and/or the standard return, shall include the header file Std_Types.h.

SWS_Mfx_00212 requirement

All AUTOSAR library Modules should use the AUTOSAR data types (integers, boolean) instead of native C data types, unless this library is clearly identified to be compliant only with a platform.

SWS_Mfx_00213 requirement

All AUTOSAR library Modules should avoid direct use of compiler and platform specific keyword, unless this library is clearly identified to be compliant only with a platform.

SWS_Mfx_00214 requirement

The standardized common published parameters as required by SRS_BSW_00402 in the SRS General on Basic Software Modules [chapter 3.1] shall be published within the header file of this module and need to be provided in the BSW Module De- scription. The according module abbreviation can be found in the List of Basic Software Modules [chapter 3.1] .

SWS_Mfx_00216 requirement

If source code for caller and callee of Mfx_ GetVersionInfo is avail- able, the Mfx library should realize Mfx_ GetVersionInfo as a macro defined in the module's header file.

SWS_Mfx_00217 requirement

The functions shall not call the DET for error notification .

SWS_Mfx_00218 requirement

The MFX library shall not have any configuration options that may affect the functional behavior of the routines. I.e. for a given set of input parameters, the outputs shall be always the same. For example, the returned value in case of error shall not be configurable.

SWS_Mfx_00220 requirement

Error detection: Function should check at runtime (both in pr o- duction and development code) the value of input parameters, especially cases where erroneous value can bring to fatal error or unpredictable result, if they have the va l ues allowed by the function specification. All the error cases shall be listed in SWS and the function should return a spec i fied value (in SWS) that is not configurable. This value is dependant of the function and the error case so it is determined case by case. If values passed to the routines are not valid and out o f the function specification, then such error are not detected. E.g. If passed value > 32 for a bit - position or a negative number of samples of an axis distribution is passed to a routine.

SWS_Mfx_00222 requirement

These requirements are not applicable to this specification.

SWS_Mfx_00223 requirement

Extract the sign of an integer value. It is defined as follows: Return-value = -1, if x_value < 0; 0, if x_value == 0; 1, if x_value > 0

SWS_Mfx_00225 requirement

Integral promotion has to be adhered to when implementing Mfx services. Thus, to obtain maximal precision, intermediate results shall not be limited.

SWS_Mfx_00227 requirement

Section 7.1 "Error Handling" of the document "General Specifica- tion of Basic Software Modules" describes the error handling of the Basic Software in detail. Above all, it constitutes a classification scheme consisting of five error types which may occur in BSW modules.