Company
Applications
Products
Services
News |
Applied Signal Processing C55x
Library
Re-Use Objects
The
Applied Signal Processing (ASP) C55x Library provides a few “object
oriented” styled DSP objects or “classes”. These objects are implemented in
a C++ style in which the object and all required buffer space is defined and
created dynamically. They provide a more natural abstract interface to
common objects found in DSP systems. The ASP C55x library defines the
interface to these objects, their attributes, and their related methods.
Applied Signal Processing C55x Library –
Re-Use Objects
|
Object Class |
Description |
|
|
Filtering: |
|
CButter |
Butterworth Filters, any order |
CButter2ord
|
Butterworth Filters, 2nd order |
CButterVs
|
Vectorized Butterworth filters. |
CLMS
|
LMS adaptive filter. |
|
|
Audio Processing: |
|
CEGate |
Energy Gate. Voice Activity Detection. |
COutGrd
|
Output Guard. Monitor signal level and shut off if
too large. |
DSP Support Functions
The
Core of the ASP C55x library is a set of C-Callable hand written assembly
functions. The functions are listed in the following tables. Note: <name>C
denotes the function is written in C.
Applied Signal Processing C55x Library
Functions
|
Function |
Description |
|
|
Filtering: |
|
butterDFIC |
Generates Butterworth low pass filter coefficients
in cascaded 2nd order sections |
delflt |
FIR filter with input signal delay |
filter |
FIR filtering routine |
filterRShift1 |
FIR filter with Right Shift 1of final output. |
FiltUpdate |
FIR filter and with automatic circular buffer
update. |
filter_gain |
FIR filter with gain applied to final output. |
iir2ndDFI |
IIR filtering routine using cascaded 2nd
order sections (Direct Form I) |
iir2ordDFI |
IIR filtering routine – 2nd order.
|
update |
Performs circular buffer update |
circ_clear |
Clears circular buffer |
circ_clearC55 |
Clears circular buffer (C55x Optional buffer
architecture) |
delay |
Updates a circular buffer and returns x(k-delay_val) |
delayC55 |
Updates a circular buffer and returns x(k-delay_val)
(C55x Optional buffer architecture) |
|
|
Signal Sources: |
|
gal |
Generates a scaled element of a galois sequence
with zero mean |
|
Generates a sinusoid with an adjustable level,
frequency and phase |
|
|
Vector Support: |
|
v_add |
Adds two vectors |
v_clear |
Clears a vector |
v_copy |
Copies a vector |
v_fill |
Fills a vector with a scalar value |
v_sub |
Subtracts two vectors |
lDot_n1 |
q31*q15 Dot product |
|
|
v_update |
Updates a 1xN vector of circular buffers with a 1xN
vector of input values |
v_dc_block |
AC couple N signals |
v_iir2nd_s
|
Filter N signals by a single filter, composed of
cascaded IIR 2nd order sections |
v_iir2nd_s_contig |
Filter N signals by a single filter, composed of
cascaded IIR 2nd order sections using contiguous X and Y
buffer Space |
CButterVs_Filter |
Filter N signals by a single Butterworth filter
descriptor. |
|
|
Sliding DCT Support: |
|
dcts_xget |
Updates a circular buffer and returns M delayed elements from the buffer |
dcts |
Computes N discrete cosine transform (DCT) IIR
filter outputs |
CDCT_CalcOddEvenAsm |
Calculate the x_odd and x_even terms for the dct difference equation |
|
|
Freq Sampling Filter: |
|
CFSF2_FilterCalc |
|
Applied Signal Processing C55x Library
Functions (continued)
|
Function |
Description
|
|
|
LMS Adapt Support: |
|
CLMS_LMSFiltAdaptUpdate |
LMS filter output calculation and update on a
buffer of filter coefficients |
CLMS_LMSDelFiltAdaptUpdate |
LMS filter output calculation update on a buffer of
filter coefficients with input buffer delay |
CLMS_NLMSDelFiltAdaptUpdate |
Normalized LMS filter output calculation update on
a buffer of filter coefficients with input buffer delay |
CLMS_NLMSFiltAdaptUpdate |
Normalized LMS filter output calculation and update
on a buffer of filter coefficients |
|
|
Expanded Instrinics: |
|
_bit |
Test a bit |
l_EXP |
Get the normalization shift of a long integer. |
l_NormShift |
Arithmetic shift of long argument via the NORM
instruction |
l_NormLongPair |
Normalize a pair of long integers |
|
|
Math Support: |
|
QZ_QMULTOVUN(x,y,QZ,QX,QY)
|
Generalize Mixed Q
operand multiplication MACRO with
OVERFLOW and UNDERFLOW protection. Will generate call to one of several
possible ASM Q math functions |
qz_QMultOVPosShiftGEQ8 |
QZ_QMULTOVUN support function |
qz_QMultOVPosShiftLT8 |
QZ_QMULTOVUN support function |
qz_QMultNegShiftUN |
QZ_QMULTOVUN support function |
qz_QMultOVPosShift |
QZ_QMULTOVUN support function |
qz_QMultOVUN |
Generalize Mixed Q
operand multiplication with OVERFLOW and
UNDERFLOW protection. |
qz_QMultOV |
Generalize Mixed Q
operand multiplication with OVERFLOW
protection |
|
|
qx_NormDivide |
Normalized divide of two 32 bit numbers, returned
as desired Q type. |
qx_NormDivideNoRnd |
Normalized divide of two 32 bit numbers without
rounding, returned as desired Q type |
long_q16_DivideQx |
Returns the long result of dividing two 16 bit
numbers |
qx_Divide |
Divide two number and return as desired Q type |
int_DivideRnd |
Integer division with rounding. |
int_Divide |
Integer division without rounding. |
q15_InverseInt |
Invert an Integer |
qx_InverseQ15 |
Invert a q15 number, return as desired Q type. |
|
|
q15_sqrt |
Take square root of a Q15 number |
sin_taylor |
Taylor Series Expansion estimate of sin(x) |
q15_pow_q4exp |
Raises x to the
fractional power y, z = q15_x^(q4_y) |
Other Re-Use Objects &
Components Available
ASP
has developed a variety of other software components for a variety of C55x
applications. These modules and objects are currently not part of the ASP
C55x library, but could customized and/or generalized for use in any DSP
system. Components that follow the object oriented implementation style are
identified with the C<name> identifier.
Applied Signal Processing
–
Software Components
& Re-Use Objects
|
Component |
Description |
|
|
Filtering: |
|
CNotch2ord |
2nd Order Notch Filter |
|
|
Audio Processing: |
|
CFSF
|
Frequency Sampling Filter Bank. Splits signal into
N frequency bands |
CDCT
|
Sliding Discrete Cosine Transform Object. Splits
signal into N frequency bands |
CToneSeq
|
Tone Sequence Object – Defines and plays a given
tone sequence of various frequencies and durations. |
FBDetSuppress |
Feedback Detection and Suppression |
MSwitch |
Microphone Switch – detects voice activity and
selects a channel from an array of channels. |
NRA
|
Noise Reduction Algorithm – Cleans up speech
signals |
Spd_Comp |
Generalized Speed Compensated Parameter (Volume,
Equalization, etc) |
Compressor |
Audio Compressor with Downward Expansion, Linear,
Compression and Limit Regions |
|
|
Fault Reporting: |
|
CDiagMsg |
Diagnostic Message Objects and Handling |
CFault |
Fault Reporting and Logging Object |
CEventRecord |
Diagnostic Event Object |
|
|
General OS: |
|
CQue |
FIFO Queue |
Mem
|
Pseudo Dynamic memory allocation with multiple
memory heaps |
|
|
Data Acquisition: |
|
CTraceChannel |
Data Acquisition Channel – Playback/record any
variable to/from a large memory buffer. |
CTraceBuffer |
Trace Buffer Object – synchronously playback/record
several channels to/from a large memory buffer. |
|
|
Misc: |
|
ParameterSector |
Reads/Writes system parameters from/to a flash
device. |
PRB |
Software Probes – probe any variable and optionally
send its value to an Auxiliary Analog Output Channel. |
Other DSP Support Functions
Available
Applied Signal Processing has developed a variety of other C-Callable
assembly functions for a variety of C55x applications. These functions are
currently not part of the ASP C55x library, but can be added to a custom
built C55x library if so desired.
Applied Signal Processing
–
Other ASM Functions
|
Function |
Description |
|
|
Filter Support: |
|
v_dc_block32 |
DC Blocking filter with 32 bit recursive data
path. Good for extremely small Fc/Fs ratios. |
q31_iir2ordDFI |
2nd order IIR filter, returns a 32 bit
result. |
|
|
Vector Support: |
|
lv_mag_avg_shft |
Calculates the 32 bit average magnitude of N time
domain signals on a sample by sample basis using a forgeting factor. |
llv_mag_avg |
Calculates the 32 bit average magnitude of N 32
bit time domain signals on a sample by sample basis using a forgeting
factor. |
ll_maxvec |
Behaves like the matlab [maxval,Index]=max( )
function. It takes a vector of longs as inputs and returns the maxval
and maxindex. |
|
|
Math Support: |
|
q31 q15q31mult(q31 x, q15 y) |
q15 x q31 multiply as q31 |
q31 q15q31mult1(q31* x, q15* y) |
q15 x q31 multiply as q31 |
q31 q15q31mult2(q31* x, q15 y) |
q15 x q31 multiply as q31 |
|
|
Misc: |
|
gal31 |
31 bit galois sequence random noise generator. |
CLookup_GetMappedParameterC |
Lookup Table Implementation – maps a parameter Y to
value X |
|
|