Compartir a través de


Real-Time Data-Cache-Size Calculation Test (Compact 2013)

3/26/2014

The purpose of the Real-time Data-Cache-Size Calculation Test is to calculate the size of the L1 data cache while the Windows Embedded Compact device is used. This is done by continuously reading the data from the cache. Determining the size of the L1 cache lets you minimize latencies in accessing memory that reduce L1 data cache misses.

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following table shows the hardware requirements of the Real-time Data-Cache-Size Calculation.

Requirement

Description

A Windows Embedded Compact device

The Windows Embedded Compact device must support L1 data caching.

Subtests

The table below lists the subtests included in this test.

SubTest ID

Description

1001

Prints a usage message for the cache-size calculation test.

1008

Measures the sizes of the cache and lines while accessing the cache five times, and returns the mean values. The test allows you to specify the array sizes, cache-size jump rate threshold, and cache-line jump-rate threshold.

Setting Up the Test

This test has no additional requirements, beyond the standard test environment setup.

Running the Test

At the command-line prompt, enter the following command:

"s tux.exe -n -o -d oalCacheSizeCalculation.dll"

This test calculates the size of the L1 data cache while the Windows Embedded Compact powered device is being used by continuously reading the data from the cache.

Syntax:

tux.exe [tuxparams] -d oalCacheSizeCalculation.dll [-c "[array_min bytes] [array_max KB] [stride_min bytes] [stride_max bytes] [cache_size_jump percent] [cache_line_jump percent] [running_time milliseconds]"]

Command-line parameters

Parameter

Description

tux.exe tuxparams

For information about the command-line parameters of the Tux test harness, see Tux Command-Line Parameters.

-d oalCacheCalculation.dll

Specifies the DLL to use for the Real-Time Data-Cache-Size Calculation test.

-c " … "

Specifies a list of test-specific parameters that Tux passes to the test DLL.

array_min bytes

Specifies the minimum array size, in kilobytes. Default value: 4

array_max KB

Specifies the maximum array size, in kilobytes. Default value: 512

stride_min bytes

Specifies the minimum stride size, in bytes. Default value: 4

stride_max bytes

Specifies the maximum stride size, in bytes. Default value: 256

cache_size_jump percent

Specifies the rate (as a percentage) at which a jump occurs in accessing an array. Default value: 15

cache_line_jump percent

Specifies the rate (as a percentage) at which a jump occurs when access to an array misses, failing to access the array. Default value: 50

running_time miliseconds

Specifies how long the test runs, in milliseconds. Default value: 100

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all subtests..

Troubleshooting the Test

When you test the data-cache-size calculations, you may encounter error messages or problems when conducting the test.

The following table lists error messages and shows descriptions and resolutions of common problems encountered during this test.

Description

Resolution

Cache size is not valid. Choose an array size in KB as a power of two.

Change the array size input to a positive value. This makes sure that the new value is a power of two (for example, 2, 4, 8, 12, and so on).

Stride is not valid. Choose stride in bytes as a power of two.

Change the array size input to a positive value. This makes sure that the new value is a power of two (for example, 2, 4, 8, 12, and so on).

Array size is zero.

Make sure that the array size is not zero.

Stride is smaller than four bytes.

Change the stride size. The stride size must be equal to or greater than four bytes.

Either the array size or the stride size is too small.

Make sure that the maximum and minimum array and stride sizes have been typed correctly.

Cannot determine the cache-size jump rate.

Make sure that the jump rate is not equal to zero.

Cannot determine the cache-line jump rate.

Make sure that the jump rate is not equal to zero.

Cannot determine the initial iteration.

Make sure that the correct minimum array size has been entered.

Cache action duration is zero.

Make sure that the correct parameters have been used.

No XXX% percent cache jump found.

Change the minimum and maximum array sizes and try again.

No XXXu percent block-jump found.

Change the minimum and maximum stride sizes and try again.

Memory allocation error.

Exit the test case and run the test from the beginning.

Make sure there are no other high priority thread running on the system. If there are other memory intensive threads running, the test result will not be accurate.

Devices with L2 Cache enable might have inconsistent result. If test fails, try to re-run the test with L2 cache disabled.

See Also

Other Resources

OAL - Cache Tests