Question: ARM Assembly for Embedded Applications Q8a Background : Real numbers may be represented in floating-point, fixed-point, or posit format. Arithmetic using these representations may be
ARM Assembly for Embedded Applications Q8a
Background: Real numbers may be represented in floating-point, fixed-point, or posit format. Arithmetic using these representations may be implemented in hardware, or in software written in either a high-level language or assembly. Let's explore the relative performance of these alternatives by evaluating Taylor series approximations of the sine function i.e., polynomials with coefficient (0,1,2,) chosen to produce sin(x):

Assignment: Create a single assembly language file containing five functions that each evaluate the polynomial shown above. The five function prototypes share a common format, but the function-name and data-type vary. (Note: The code for each of the last three functions should be almost identical.)

The program calls each of your polynomial functions with an array of coefficients chosen to approximate the sine function at an angle expressed in radians. Since the approximation of the sine function requires fewer terms near = 0 for the same accuracy, the main program varies from 0 to 8 to reduce average execution time. The values returned by your polynomial functions are used to display moving sine waves.
poly(x) = a + ax + azx2 + ... + an-1x*-1 The polynomial is most efficiently evaluated using Horner's method", working backwards from an-ito ao poly(x) = (0)x+ an-1)x+ an-2)x+ ... + ao data-type function-name(data-type x, data-type a[], int32_t n) ; function-name data-type same as Implement this function in assembly using ... FPH_Poly float float floating-point addition & multiply instructions Q16_Poly Q16 int32_t integer addition & multiply instructions FPA_Poly float32_t int32_t ASM library functions qfp_fadd & qfp_fmul FPC_Poly float32_t int32_t C library functions AddFloats & MulFloats POS_Poly posit32_t int32_t C library functions AddPosits & MulPosits
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
