Skip to content

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:

InstanceSampleRate - 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.

InstanceProfileClockSpeed - 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.

InstanceFundamentalBlockSize - 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.

InstanceCoreClockSpeed - 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.

LayoutAveragePumpTime - 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.

LayoutPeakPumpTime - 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.

LayoutPumpCounts - 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.

LayoutAvgTimeBetweenPumps - 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.

LayoutTotalTimePumping - this is the total elapsed time for the layout containing this module. It equals (LayoutPumpCounts x LayoutAvgTimeBetweenPumps). Index = 9.

LayoutPercentCPU - this is the percentage of CPU consumed by this layout. It is in the range of [0 100]. Index = 10.

LayoutInstTimeBetweenPumps - this is the same as LayoutAvgPumpCycleTime 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.

SystemResetCount - 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 SystemResetCount will reflect system-wide behavior. This counter is available only from the AWECore release of AC-8.D.6 and later. Index = 12.

LayoutInstPumpTime - this is the instantaneous number of seconds that is required to complete the processing of the layout containing this module from the last pump. This is the same as AverageTime but is unsmoothed. This information is tracked during real-time processing. Index = 13.

LayoutOverrunCount - this is the number of times that the containing layout did not complete processing in time and triggered a system reset. This variable helps to identify which layout(s) are causing the SystemResetCount to advance. Index = 14.

Module Pack

Advanced

ClassID

classID = 1389

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;

Variables

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. 

Copyright (c) 2026 DSP Concepts, Inc.