Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMSIS-DSP: improve documentation on how to include needed tables only #1237

Closed
escherstair opened this issue Jul 9, 2021 · 3 comments
Closed
Labels
documentation DSP moved moved to new github repository

Comments

@escherstair
Copy link

escherstair commented Jul 9, 2021

Here I can see that some new compilations symbols have been introduced to avoid including all the tables if they are not needed.

If no new symbol is defined, everything will behave as usual. If ARM_DSP_CONFIG_TABLES is defined then the new symbols will be taken into account.

Then you can select all FFT tables or all interpolation tables by defining following compilation symbols:

  • ARM_ALL_FFT_TABLES : All FFT tables are included
  • ARM_ALL_FAST_TABLES : All interpolation tables are included

From the above lines, it seems that once ARM_DSP_CONFIG_TABLES has been defined, it's enough to select which tables are needed.
I think this is not true, unfortunately, because I tried and it didn't work.

So I looked inside cmsisdspconfig.py and I see

if test(cmake,"CONFIGTABLE"):
r.append("-DARM_DSP_CONFIG_TABLES")
# In Make configuration we build all modules.
# So the code for FFT and FAST maths may be included
# so we allow the table to be included if they are needed.
r.append("-DARM_FAST_ALLOW_TABLES")
r.append("-DARM_FFT_ALLOW_TABLES")

If I'm right this means that I need to define three symbols:

  • ARM_DSP_CONFIG_TABLES to enable the "selective" build
  • ARM_FFT_ALLOW_TABLES so that the needed fft tables could be included (if at least one of them is needed)
  • ARM_FAST_ALLOW_TABLES so that the needed interpolation tables could be included (if at least one of them is needed)
    then the other symbols of the needed tables.

The necessity of ARM_FFT_ALLOW_TABLES and/or ARM_FAST_ALLOW_TABLES seems confirmed looking into the source code.
As an example

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FAST_ALLOW_TABLES)

either ARM_DSP_CONFIG_TABLES is NOT defined, or ARM_FAST_ALLOW_TABLES MUST be defined too, otherwise nothing is compiled.

If this is the case, I suggest to improve README.md adding this clarification.

@christophe0606
Copy link
Contributor

@escherstair Indeed, the ALLOW options are used because a build may not include the FFT code and in that case the FFT tables must not be included.

I'll update the README to advise people to use the Python configuration script to generate the -D options for the command line. It is the simplest otherwise knowing which option to use require to know how the algorithm is implemented (which tables are needed).

@escherstair
Copy link
Author

@christophe0606 if you'll give advise to use the Python script, please specify that the -D options for the command line are generated if the build method is set to Make

@christophe0606
Copy link
Contributor

We are moving CMSIS-DSP to a new repository : https://github.com/ARM-software/CMSIS-DSP

I have recreated the github issues on the new repository (sometimes merging a few related ones). You can see the link just above this comment (... mentioned this issue ...).

So, I am closing the github issue here.

@christophe0606 christophe0606 added the moved moved to new github repository label Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation DSP moved moved to new github repository
Projects
None yet
Development

No branches or pull requests

2 participants