zephyr/tests/kernel/fp_sharing/generic
Stephanos Ioannidis 0e6ede8929 kconfig: Rename CONFIG_FLOAT to CONFIG_FPU
This commit renames the Kconfig `FLOAT` symbol to `FPU`, since this
symbol only indicates that the hardware Floating Point Unit (FPU) is
used and does not imply and/or indicate the general availability of
toolchain-level floating point support (i.e. this symbol is not
selected when building for an FPU-less platform that supports floating
point operations through the toolchain-provided software floating point
library).

Moreover, given that the symbol that indicates the availability of FPU
is named `CPU_HAS_FPU`, it only makes sense to use "FPU" in the name of
the symbol that enables the FPU.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-27 19:03:44 +02:00
..
src kconfig: Rename CONFIG_FLOAT to CONFIG_FPU 2020-04-27 19:03:44 +02:00
CMakeLists.txt cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
README.txt tests: kernel: fp_sharing: Use ztest 2020-04-10 11:43:05 +02:00
prj.conf kconfig: Rename CONFIG_FLOAT to CONFIG_FPU 2020-04-27 19:03:44 +02:00
prj_x86.conf kconfig: Rename CONFIG_FLOAT to CONFIG_FPU 2020-04-27 19:03:44 +02:00
testcase.yaml tests: fp_sharing: Enable build-only tests for RISC-V QEMU platform 2020-04-22 16:39:48 -07:00

README.txt

Title: Shared Floating Point Support

Description:

The Shared Floating Point Support test uses two tasks to:

  1) load and store floating point registers and check for corruption
  2) independently compute pi and check for any errors

This tests the ability of tasks to safely share floating point hardware
resources, even when switching occurs preemptively (note that both sets of
tests run concurrently even though they report their progress at different
times).

The demonstration utilizes semaphores, round robin scheduling, and floating
point support.

--------------------------------------------------------------------------------

Building and Running Project:

This project outputs to the console.  It can be built and executed
on QEMU as follows:

    make run

--------------------------------------------------------------------------------

Troubleshooting:

Problems caused by out-dated project information can be addressed by
issuing one of the following commands then rebuilding the project:

    make clean          # discard results of previous builds
                        # but keep existing configuration info
or
    make pristine       # discard results of previous builds
                        # and restore pre-defined configuration info

--------------------------------------------------------------------------------

Advanced:

Depending upon the board's speed, the frequency of test output may range from
every few seconds to every few minutes. The speed of the test can be controlled
through the variable PI_NUM_ITERATIONS (default 700000). Lowering this value
will increase the test's speed, but at the expense of the calculation's
precision.

    make run PI_NUM_ITERATIONS=100000

--------------------------------------------------------------------------------

Sample Output:

*** Booting Zephyr OS build zephyr-v2.2.0-845-g8b769de30317  ***
Running test suite fp_sharing
===================================================================
starting test - test_load_store
Load and store OK after 0 (high) + 63 (low) tests
Load and store OK after 100 (high) + 6540 (low) tests
Load and store OK after 200 (high) + 12965 (low) tests
Load and store OK after 300 (high) + 19366 (low) tests
Load and store OK after 400 (high) + 25756 (low) tests
Load and store OK after 500 (high) + 32128 (low) tests
PASS - test_load_store
===================================================================
starting test - test_pi
Pi calculation OK after 50 (high) + 10 (low) tests (computed 3.141598)
Pi calculation OK after 150 (high) + 31 (low) tests (computed 3.141598)
Pi calculation OK after 250 (high) + 51 (low) tests (computed 3.141598)
Pi calculation OK after 350 (high) + 72 (low) tests (computed 3.141598)
Pi calculation OK after 450 (high) + 92 (low) tests (computed 3.141598)
PASS - test_pi
===================================================================
Test suite fp_sharing succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL