zephyr/tests/kernel/fp_sharing/generic
Stephanos Ioannidis 0b930a2195 kconfig: Rename x86 FPU sharing symbols
This commit renames the x86 Kconfig `CONFIG_{EAGER,LAZY}_FP_SHARING`
symbol to `CONFIG_{EAGER,LAZY}_FPU_SHARING`, in order to align with the
recent `CONFIG_FP_SHARING` to `CONFIG_FPU_SHARING` renaming.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-08 10:58:33 +02:00
..
src kconfig: Rename x86 FPU sharing symbols 2020-05-08 10:58:33 +02:00
CMakeLists.txt
README.txt tests: kernel: fp_sharing: Use ztest 2020-04-10 11:43:05 +02:00
prj.conf kconfig: Rename CONFIG_FP_SHARING to CONFIG_FPU_SHARING 2020-05-08 10:58:33 +02:00
prj_x86.conf kconfig: Rename CONFIG_FP_SHARING to CONFIG_FPU_SHARING 2020-05-08 10:58:33 +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