MemoryLoadingV2 - Misc
Overview
Allocates memory for stress test
Discussion
This module is used to check the memory bandwidth of the target. Compared to v1, this module adds a read mode and allows shared heap selection (if available). 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, it performs a write or read operation depending on the selected mode. In write mode, the module writes the current block-counter value into every value of the array. It does this "blockAccessCount" times per block process. That is, every time the processing function is called, the module performs a total blockAccessCount*memSize memory write operations. All write operations write the current value of the block counter. In read mode, the module reads the full content of the buffer "blockAccessCount" times per block process. The read-to location is a single automatic integer variable.
Module Pack
Advanced
ClassID
classID = 1454
Type Definition
typedef struct _ModuleMemoryLoadingV2
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 blockAccessCount; // Number of iterations to perform the memory block write or read
INT32 writeOrReadMode; // If 0, memory is written to. If 1, memory is read from
INT32 memSize; // Memory size of the buffer in words
INT32 memHeap; // Heap in which to allocate memory
INT32 blockCounter; // Counts elapsed blocks and is used as the memory fill value
INT32* memArray; // Internal array allocated in specified memory heap
} ModuleMemoryLoadingV2Class;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| blockAccessCount | int | parameter | 0 | 1 | 1:1000 | |
| writeOrReadMode | int | parameter | 0 | 0 | 0:1 | |
| 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 |
Pins
Matlab Usage
File Name: memory_loading_v2_module.m
M=memory_loading_v2_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 or reads to/from 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 (default).
'AWE_HEAP_FASTB' - always use internal PM memory.
'AWE_HEAP_SLOW' - always use external memory.
'AWE_HEAP_SHARED' - always use shared memory.
Copyright (c) 2026 DSP Concepts, Inc.