(8.D.2.4) MemoryLoading
Overview
Allocates memory for stress test
Discussion
This module is used to check the memory bandwidth of the target. At instantiation time you specify the size of the memory buffer (memSize) and in which heap it should be allocated (memHeap). Then at run time, the module writes a block counter value into every value of the array. It repeats this blockWriteCount times per block process. That is, every time the processing function is called, the module performs a total blockWriteCount*memSize memory write operations. All write operations write the current value of the block counter.
Type Definition
typedef struct _ModuleMemoryLoading
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 blockWriteCount; // Number of iterations to repeat the memory block write
INT32 memSize; // Memory size of the buffer in words
INT32 memHeap; // Heap in which to allocate memory
INT32 blockCounter; // Number of cycles to consumer per block process
INT32* memArray; // Internal array allocated in speficied memory heap
} ModuleMemoryLoadingClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
blockWriteCount | int | parameter | 0 | 1 | 1:1000 | Â |
memSize | int | const | 1 | 1000 | Unrestricted | Â |
memHeap | int | const | 1 | 1 | Unrestricted | Â |
blockCounter | int | state | 1 | 0 | Unrestricted | Â |
memArray | int* | state | 1 | [1000 x 1] | Unrestricted | Â |
MATLAB Usage
File Name: memory_loading_module.m
M=memory_loading_module(NAME, MEMORY_SIZE, MEMORY_HEAP)
This module allocates memory of MEMORY_SIZE words in Audio Weaver heap
specified by MEMORY_HEAP argument. It can be useful for debugging and
memory test. The module continuously writes to the area of memory
in order to stress the memory bandwidth of the system. Arguments:
NAME - name of the module.
MEMORY_SIZE - Specifies array size in words.
MEMHEAP - specifies the memory heap to use to allocate the array.
This is a string and follows the memory allocation enumeration
in Framework.h. Allowable values are:
'AWE_HEAP_FAST' - always use internal DM memory.
'AWE_HEAP_FASTB' - always use internal PM memory.
'AWE_HEAP_SLOW' - always use external memory (the default).
Â