fmod_floor() Adaptations - 2025.1 English - XD100

Vitis Tutorials: AI Engine Development (XD100)

Document ID
XD100
Release Date
2025-08-25
Version
2025.1 English

The fmod_floor() kernel is absent in the original baseline MATLAB code, but becomes necessary due to the input domain restriction on the cos() and sin() kernels. The tutorial design assumes the actual input range $(0,2\pi)$ is mapped in hardware to the range \((0,1)\). This scaling is managed with fixed factors in the dR_comp() kernel. It follows the fmod_floor() kernel must reduce the input signal to the range \((0,1)\) by computing the $\text{mod}(x,1)$ function. This is done using a custom kernel with float-to-fixed conversions based on some IEEE754 tricks.