Referring to my question
it seems to be my part to do this.
But first i will only ask for further documentation for the FPU.
I will post here if i get an answer ...
Referring to my question
it seems to be my part to do this.
Code: Select all
Ok, 32-Bit-Float,
5 32-Bit-Register:
0: Opcode
1: Status, Bit0: Busy
2: Result
3: Op1
4: Op2
Opcodes:
1: asin
3: acos
5: atan
7: atan2
9: sin
11: cos
13: tan
...
289: fadd
293: fsub
295: fmul
45: fdiv
...
Code: Select all
00000000 <sc_math_sin>:
0: 4601 mov r1, r0
2: 2009 movs r0, #9
4: 4afe ldr r2, [pc, #1016] ; (400 <__wrap___ltsf2+0x2a>)
6: 6010 str r0, [r2, #0]
8: 4610 mov r0, r2
a: 60c1 str r1, [r0, #12]
c: bf00 nop
e: 48fc ldr r0, [pc, #1008] ; (400 <__wrap___ltsf2+0x2a>)
10: 6840 ldr r0, [r0, #4]
12: f000 0001 and.w r0, r0, #1
16: 2800 cmp r0, #0
18: d0f9 beq.n e <sc_math_sin+0xe>
1a: 48f9 ldr r0, [pc, #996] ; (400 <__wrap___ltsf2+0x2a>)
1c: 6880 ldr r0, [r0, #8]
1e: 4770 bx lr
at:
400: 40024000 .word 0x40024000
is the base address of the FPU hardware.
As a noob I added a Cordic unit to my 32bit MicroBlaze in about 1 hour, therefore it cannot be a big problem for the guys who mastered the APM32F103 to add an FPU unit, where you write 1-2 32bit operands somewhere, set a bit somewhere and in 1-14clocks you read a result from somewhere.Squonk42 wrote: ↑Sun Mar 29, 2020 10:17 am Here is the (Google) translation for page 14:As it is memory-mapped on the AHB bus (0x40024000-0x400243FF), it is probably not the standard ARM FPv4-SP core-integrated that can be found in the M4 or M7 cores.3.10. Floating Point Unit (FPU)
The product has a built-in independent FPU floating-point arithmetic processing unit, it supports the IEEE754 standard single-precision floating-point arithmetic.
Code: Select all
extern float sc_math_sin(float x);
extern float sc_math_cos(float x);
extern float sc_math_tan(float x);
extern float sc_math_asin(float x);
extern float sc_math_acos(float x);
extern float sc_math_atan(float x);
extern float sc_math_atan2(float y, float x);
extern float sc_math_invsqrt(float x);
extern float sc_math_mac(float x, float y, float z);
extern float sc_math_sum_N(float* x, unsigned char n);
extern float sc_math_sub_N(float* x, unsigned char n);
extern float sc_math_prdct(float* x, unsigned char n);
extern float sc_math_sumsq(float* x, unsigned char n);