2025-08-25 8:32 PM
Hello,
I am working with the LL_ATON library on STM32N6 and testing the LL_ARITHACC unit using the AFFINE operation, defined as: Output=A⋅X+B⋅Y+C.
I ran several tests with a simple network model whose only purpose is X + Y.
My expectation is:
Case 1: A = 0, B = 0, C = 1
→ Output is correctly constant 1 as expected.
Case 2: A = 1, B = 0, C = 0
→ Expected output = X, but the results are completely wrong and look like random values.
Case 3: A = 0, B = 1, C = 0
→ Expected output = Y, but again the results are incorrect and look random
So, while the C_scalar works correctly, the usage of A_scalar and B_scalar does not produce the expected behavior.
Questions:
Is there any special configuration needed in the switch/stream setup for X and Y inputs when using AFFINE?
The following screenshots are taken from the network.c file generated by the STEdgeAI compiler after compiling my simple X + Y tflite model. They show the configuration of the LL_ARITHACC unit for the AFFINE operation.
Thanks.
2025-08-25 8:43 PM
Additional information:
The screenshot (see red box in main.c) shows how I initialized the input buffer to zero before running inference. This guarantees that both X and Y are all zeros during the test. However, the problem persists: With A=1, B=0, C=0 or A=0, B=1, C=0, the outputs are still incorrect and look random.