(8.D.2.7) SystemVariable
Overview
System Variable
Discussion
This module returns internal information from the AWECore library and layout (thread) that the module is running in. The module always outputs the information as a floating-point value.
The following items can be selected:
SampleRate - this is the "Sample rate" field taken from the target information. It corresponds to the sample rate of the hardware input and output pins. In units of Hz. Index = 1.
ProfileClockSpeed - this is the "Profile clock rate" field taken from the target information. It corresponds to the speed of the profiling clock used for module profiling. In units of Hz. Index = 2.
BlockSize - this is the "Basic block size" field taken from the target information. It corresponds to the fundamental block size of the BSP code and usually corresponds to the DMA buffer size. In units of samples. Index = 3.
CoreClockSpeed - this is the "CPU clock rate" field taken from the target information. It corresponds to the overall processor speed. In units of Hz. Index = 4.
AverageTime - this is the number of seconds required to complete the processing of the layout containing this module. This information is averaged at run-time with a first order smoother. In a single threaded system, this information corresponds to the "Average ticks per block" shown on the block-by-block profiling window. Index = 5.
PeakTime - this is the maximum number of seconds that was ever required to complete the processing of the layout containing this module. This information is tracked during real-time processing. In a single threaded system, this information corresponds to the "Peak ticks per block" shown on the block-by-block profiling window. Index = 6.
NumPumps - this is the number of times that this layout was pumped. It should increase linearly and the rate depends upon the clock divider of the hosting layout (thread). Index = 7.
CycleTime - this is the number of seconds between calls to the layout pump function. This information is averaged at run-time with a first order smoother. In a single threaded system, this information corresponds to the "Total ticks per block process available. shown on the block-by-block profiling window. Index = 8.
ElapsedTime - this is the total elapsed time for the layout containing this module. It equals (NumPumps x CycleTime). Index = 9.
PercentCPU - this is the percentage of CPU consumed by this layout. It is in the range of [0 100]. Index = 10.
InstCycleTime - this is the same as CycleTime but is unsmoothed. It is the number of seconds between calls to this module process function. It is the instantaneous information for the previous pump cycle. No averaging occurs. Index = 11.
ResetCount - this is the number of times that the containing layout was in reset. Reset occurs when there is an overrun in any audio processing thread throughout the system. This variable will be the same across all layouts. When debugging a system, you only need to watch for resets on a single thread and the ResetCount will reflect system-wide behavior. This counter is available only from the AWECore release of AC-8.D.6 and later. Index = 12.
Type Definition
typedef struct _ModuleSystemVariable
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 variableIndex; // Variable Index
INT32 prevTime; // Previous cycle time
void * pOwnerPtr; // Pointer to hold owner AWEInstance pointer
UINT32 * resetCounter; // Pointer to hold reset count. It is used as a unsigned int variable and added as a pointer to avoid compatibility issues
} ModuleSystemVariableClass;
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
variableIndex | int | parameter | 0 | 1 | Unrestricted | Â |
prevTime | int | const | 0 | 0 | Unrestricted | Â |
pOwnerPtr | void * | state | 1 | Â | Unrestricted | Â |
resetCounter | UINT32 | state | 1 | Â | Unrestricted | Â |
Pins
Output Pins
Name: variable
Description: System Variable
Data type: float
MATLAB Usage
File Name: system_variable_module.m
M = system_variable_module(NAME)
Audio Weaver system variable module. Arguments:
NAME - name of the module.
SAMPLERATE - sample rate to output value with
Copyright (c) 2020 DSP Concepts, Inc. All Rights Reserved.
Â