Update repo
@@ -0,0 +1,150 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
|
||||
let FPU_TYPE;
|
||||
if((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x"))
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
|
||||
let CALC_TYPES = [
|
||||
{name: "CFFT_f64", displayName : "CFFT64 Memory Aligned"},
|
||||
{name: "CFFT_f64u", displayName : "CFFT64 Memory Unaligned"},
|
||||
{name: "ICFFT_f64", displayName : "Inverse CFFT64 Memory Aligned"},
|
||||
{name: "ICFFT_f64u", displayName : "Inverse CFFT64 Memory Unaligned"},
|
||||
]
|
||||
let MAG_TYPES = [
|
||||
{name: "CFFT_f64_mag", displayName : "CFFT64 Magnitude"},
|
||||
{name: "CFFT_f64s_mag", displayName : "CFFT64 Magnitude (Scaled)"},
|
||||
]
|
||||
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "$name",
|
||||
hidden : false
|
||||
},
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
description : "Choose FPU32 or FPU64 Configuration",
|
||||
default : FPU_TYPE[0].name,
|
||||
onChange : onChangeFpu
|
||||
},
|
||||
{
|
||||
name : "inPtr",
|
||||
displayName : "Input Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "outPtr",
|
||||
displayName : "Output Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "numStages",
|
||||
displayName : "Number of FFT Stages",
|
||||
longDescription : "The number of stages must be log base 2 of FFTSize",
|
||||
default : 5
|
||||
},
|
||||
{
|
||||
name : "fftSize",
|
||||
displayName : "FFT Size",
|
||||
longDescription : "FFT size must be a power of 2; the size must be at least 32 and at most 1024; input/output/current input/current output pointers are FFT Size in length",
|
||||
default : 32,
|
||||
getValue : (inst) => {
|
||||
return Math.pow(2, inst.numStages);
|
||||
}
|
||||
},
|
||||
{
|
||||
name : "sincosFunction",
|
||||
displayName : "Use Predefined Twiddle Factors",
|
||||
longDescription : "NOTE: When using pre-generated twiddle factors (e.g. this option is true), use a function with a 't' after the CFFT_f32",
|
||||
default : true,
|
||||
hidden : false,
|
||||
onChange : onChangeTwiddle
|
||||
},
|
||||
{
|
||||
name : "coeffPtr",
|
||||
displayName : "Twiddle Factors Pointer",
|
||||
default : "",
|
||||
hidden : true
|
||||
},
|
||||
{
|
||||
name : "calcFunction",
|
||||
displayName : "Calculation Functions",
|
||||
longDescription : "Choose a specific calculation function, and do <name>_handle->calc(<name>_handle); to run the calculation function. This can be changed during runtime",
|
||||
default : CALC_TYPES[0].name,
|
||||
options : CALC_TYPES,
|
||||
hidden : true
|
||||
},
|
||||
{
|
||||
name : "magFunction",
|
||||
displayName : "Magnitude Functions",
|
||||
longDescription : "Choose a specific magnitude function, and do <name>_handle->mag(<name>_handle); to run the calculation function. This can be changed during runtime",
|
||||
default : MAG_TYPES[0].name,
|
||||
options : MAG_TYPES,
|
||||
hidden : true
|
||||
},
|
||||
]
|
||||
|
||||
function onChangeFpu(inst, ui)
|
||||
{
|
||||
if(inst.fpuType == FPU_TYPE[0].name)
|
||||
{
|
||||
ui.coeffPtr.hidden = false;
|
||||
ui.sincosFunction.hidden = false;
|
||||
ui.coeffPtr.hidden = inst.sincosFunction;
|
||||
ui.calcFunction.hidden = true;
|
||||
ui.magFunction.hidden = true;
|
||||
}
|
||||
else if(((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x")) && (inst.fpuType == FPU_TYPE[1].name))
|
||||
{
|
||||
ui.coeffPtr.hidden = true;
|
||||
ui.sincosFunction.hidden = true;
|
||||
ui.calcFunction.hidden = false;
|
||||
ui.magFunction.hidden = false;
|
||||
}
|
||||
}
|
||||
function onChangeTwiddle(inst, ui)
|
||||
{
|
||||
ui.coeffPtr.hidden = inst.sincosFunction;
|
||||
}
|
||||
function onValidate(inst, validation)
|
||||
{
|
||||
if(inst.fftSize < 32)
|
||||
{
|
||||
validation.logError("FFT size must be at least 32", inst, "fftSize");
|
||||
}
|
||||
if(inst.fftSize > 1024)
|
||||
{
|
||||
validation.logError("FFT size cannot be more than 1024", inst, "fftSize");
|
||||
}
|
||||
if((inst.inPtr == "") || (inst.outPtr == "") || ((inst.fpuType == FPU_TYPE[0].name) && (inst.coeffPtr == "") && (inst.sincosFunction == false)))
|
||||
{
|
||||
validation.logError("All pointers must point to valid arrays", inst);
|
||||
}
|
||||
if((inst.inPtr == inst.outPtr) || ((inst.fpuType == FPU_TYPE[0].name) && ((inst.inPtr == inst.coeffPtr) || (inst.outPtr == inst.coeffPtr))))
|
||||
{
|
||||
validation.logError("No duplicate names allowed within FFT object", inst);
|
||||
}
|
||||
}
|
||||
|
||||
var cfftModule = {
|
||||
c2000wareLibraryName: "CFFT",
|
||||
displayName: "CFFT",
|
||||
defaultInstanceName: "myCFFT",
|
||||
description: "Complex FFT",
|
||||
config: config,
|
||||
validate : onValidate
|
||||
}
|
||||
exports = cfftModule;
|
||||
@@ -0,0 +1,363 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
let LinkerDefineFix = system.getScript("/libraries/LinkerDefineFix.js")
|
||||
|
||||
let longDescription = LinkerDefineFix.errorFix;
|
||||
longDescription += `
|
||||
**Please refer to the [user guide](https://dev.ti.com/tirex/explore/node?node=AOZ6OU09-AcytWQVSYjfkA__gYkahfz__LATEST) for more information**
|
||||
|
||||
Globals for FFT (available for CFFT and RFFT, when included):
|
||||
Complex Fast-Fourier Transform:
|
||||
* (name)_CFFT_NUM_STAGES = Number of stages for CFFT
|
||||
* (name)_CFFT_SIZE = Size of CFFT input (number of elements)
|
||||
* (name)_handle = Handle for CFFT object
|
||||
|
||||
Real Fast-Fourier Transform:
|
||||
* (name)_RFFT_NUM_STAGES = Number of stages for RFFT
|
||||
* (name)_RFFT_SIZE = Size of RFFT input (number of elements)
|
||||
* (name)_handle = Handle for RFFT object
|
||||
* (name)_adc_handle = Handle for RFFT object when ADC mode is enabled
|
||||
|
||||
Methods of Increasing Performance:
|
||||
* Aligning buffers to memory addresses as described in the user guide
|
||||
* Enabling the TMU (TMU0 or TMU1) for phase and magnitude calculations
|
||||
* Utilizing twiddle factors
|
||||
|
||||
**NOTE: When using pre-generated twiddle factors (e.g. this option is true), use a function with a 't' after the CFFT_f32 or RFFT_f32**
|
||||
|
||||
---
|
||||
|
||||
**32-bit Complex Fast Fourier Transform Setters and Getters**
|
||||
|
||||
Function | Description
|
||||
--- |---
|
||||
void CFFT_f32_setInputPtr(CFFT_F32_STRUCT_Handle fh, const float *pi) | Sets input pointer
|
||||
float * CFFT_f32_getInputPtr(CFFT_F32_STRUCT_Handle fh) | Gets input pointer
|
||||
void CFFT_f32_setOutputPtr(CFFT_F32_STRUCT_Handle fh, const float *po) | Sets output pointer
|
||||
float * CFFT_f32_getOutputPtr(CFFT_F32_STRUCT_Handle fh) | Gets output pointer
|
||||
void CFFT_f32_setTwiddlesPtr(CFFT_F32_STRUCT_Handle fh, const float *pc) | Sets twiddle factors pointer (speed up FFT)
|
||||
float * CFFT_f32_getTwiddlesPtr(CFFT_F32_STRUCT_Handle fh) | Gets twiddle factors pointer
|
||||
void CFFT_f32_setCurrInputPtr(CFFT_F32_STRUCT_Handle fh, const float *pi) | Sets current input pointer
|
||||
float * CFFT_f32_getCurrInputPtr(CFFT_F32_STRUCT_Handle fh) | Gets current input pointer
|
||||
void CFFT_f32_setCurrOutputPtr(CFFT_F32_STRUCT_Handle fh, const float *po) | Sets current output pointer
|
||||
float * CFFT_f32_getCurrOutputPtr(CFFT_F32_STRUCT_Handle fh) | Gets current output pointer
|
||||
void CFFT_f32_setStages(CFFT_F32_STRUCT_Handle fh, const uint16_t st) | Sets number of stages
|
||||
uint16_t CFFT_f32_getStages(CFFT_F32_STRUCT_Handle fh) | Gets number of stages
|
||||
void CFFT_f32_setFFTSize(CFFT_F32_STRUCT_Handle fh, const uint16_t sz) | Sets the FFT size
|
||||
uint16_t CFFT_f32_getFFTSize(CFFT_F32_STRUCT_Handle fh) | Gets the FFT size
|
||||
|
||||
**32-bit Complex Fast Fourier Transform Functions**
|
||||
|
||||
Function | Description
|
||||
--- |---
|
||||
void CFFT_f32(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes CFFT, requires memory alignment for buffer(s)
|
||||
void CFFT_f32_brev(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Reorder data set in bit reverse order (can be run in-place); mainly used prior to calling in-place FFT
|
||||
void CFFT_f32i(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes CFFT in-place (must call CFFT_f32_brev prior), requires memory alignment for buffer(s)
|
||||
void CFFT_f32t(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes CFFT using pre-generated Twiddle Factors table, requires memory alignment for buffer(s)
|
||||
void CFFT_f32it(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes CFFT in-place using pre-generated Twiddle Factors table, requires memory alignment for buffer(s)
|
||||
void CFFT_f32u(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes CFFT, memory alignment not required
|
||||
void CFFT_f32ut(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes CFFT using statically generated Twiddle Factors table, memory alignment not required
|
||||
void CFFT_f32_sincostable(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Generates Twiddle Factors for CFFT
|
||||
void CFFT_f32_win(float *pBuffer, const float *pWindow, const uint16_t size) | Performs windowing function on the real component of the buffer
|
||||
void CFFT_f32_win_dual(float *pBuffer, const float *pWindow, const uint16_t size) | Performs windowing function on the real and imaginary component of the buffer
|
||||
void CFFT_f32_mag(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes the CFFT magnitude (no memory alignment needed); stored in CurrentOutPtr
|
||||
void CFFT_f32s_mag(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes the scaled CFFT magnitude (no memory alignment needed); stored in CurrentOutPtr
|
||||
void CFFT_f32_phase(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes the CFFT phase (no memory alignment needed); stored in CurrentOutPtr
|
||||
void CFFT_f32_unpack(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Unpacks N-point CFFT output to get CFFT of 2N-point real sequence, the output is written to buffer pointed to by CurrentOutPtr; only use CFFT_f32t version with this function
|
||||
void CFFT_f32_pack(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Packs N/2-point CFFT output to get N-point real sequence, the output is written to buffer pointed to by CurrentOutPtr; only use CFFT_f32t version with this function
|
||||
void CFFT_f32_mag_TMU0(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes the CFFT magnitude (no memory alignment needed) using TMU0 module; stored in CurrentOutPtr
|
||||
void CFFT_f32s_mag_TMU0(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes the scaled CFFT magnitude (no memory alignment needed) using TMU0 module; stored in CurrentOutPtr
|
||||
void CFFT_f32_phase_TMU0(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes the CFFT phase (no memory alignment needed) using TMU0 module; stored in CurrentOutPtr
|
||||
void ICFFT_f32(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes the inverse CFFT, requires memory alignment for buffer(s)
|
||||
void ICFFT_f32t(CFFT_F32_STRUCT_Handle hndCFFT_F32) | Computes the inverse CFFT using statically generated Twiddle Factors table, requires memory alignment for buffer(s)
|
||||
|
||||
---
|
||||
|
||||
**32-bit Real Fast Fourier Transform Setters and Getters**
|
||||
|
||||
Function | Description
|
||||
--- |---
|
||||
void RFFT_f32_setInputPtr(RFFT_F32_STRUCT_Handle fh, const float *pi) | Sets input pointer
|
||||
float * RFFT_f32_getInputPtr(RFFT_F32_STRUCT_Handle fh) | Gets input pointer
|
||||
void RFFT_f32_setOutputPtr(RFFT_F32_STRUCT_Handle fh, const float *po) | Sets output pointer
|
||||
float * RFFT_f32_getOutputPtr(RFFT_F32_STRUCT_Handle fh) | Gets output pointer
|
||||
void RFFT_f32_setTwiddlesPtr(RFFT_F32_STRUCT_Handle fh, const float *pc) | Sets twiddle factors pointer
|
||||
float * RFFT_f32_getTwiddlesPtr(RFFT_F32_STRUCT_Handle fh) | Gets twiddle factors pointer
|
||||
void RFFT_f32_setMagnitudePtr(RFFT_F32_STRUCT_Handle fh, const float *pm) | Sets magnitude pointer
|
||||
float * RFFT_f32_getMagnitudePtr(RFFT_F32_STRUCT_Handle fh) | Gets magnitude pointer
|
||||
void RFFT_f32_setPhasePtr(RFFT_F32_STRUCT_Handle fh, const float *pp) | Sets phase pointer
|
||||
float * RFFT_f32_getPhasePtr(RFFT_F32_STRUCT_Handle fh) | Gets phase pointer
|
||||
void RFFT_f32_setStages(RFFT_F32_STRUCT_Handle fh, const uint16_t st) | Sets number of stages
|
||||
uint16_t RFFT_f32_getStages(RFFT_F32_STRUCT_Handle fh) | Gets number of stages
|
||||
void RFFT_f32_setFFTSize(RFFT_F32_STRUCT_Handle fh, const uint16_t sz) | Sets the FFT size
|
||||
uint16_t RFFT_f32_getFFTSize(RFFT_F32_STRUCT_Handle fh) | Gets the FFT size
|
||||
void RFFT_ADC_f32_setInBufPtr(RFFT_ADC_F32_STRUCT_Handle fh, const uint16_t * pi) | Sets ADC input buffer pointer
|
||||
uint16_t *RFFT_ADC_f32_getInBufPtr(RFFT_ADC_F32_STRUCT_Handle fh) | Gets ADC input buffer pointer
|
||||
void RFFT_ADC_f32_setTailPtr(RFFT_ADC_F32_STRUCT_Handle fh, const void * pt) | Sets ADC tail pointer
|
||||
void *RFFT_ADC_f32_getTailPtr(RFFT_ADC_F32_STRUCT_Handle fh) | Gets ADC tail pointer
|
||||
|
||||
**32-bit Real Fast Fourier Transform Functions**
|
||||
|
||||
Function | Description
|
||||
--- |---
|
||||
void RFFT_f32(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Computes RFFT, requires memory alignment for buffer(s)
|
||||
void RFFT_f32u(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Computes RFFT, memory alignment not required
|
||||
void RFFT_adc_f32(RFFT_ADC_F32_STRUCT_Handle hndRFFT_ADC_F32) | Computes RFFT with ADC input; input of uint16_t and output of float32_t, requires memory alignment for buffer(s)
|
||||
void RFFT_adc_f32u(RFFT_ADC_F32_STRUCT_Handle hndRFFT_ADC_F32) | Computes RFFT with ADC input; input of uint16_t and output of float32_t, memory alignment not required
|
||||
void RFFT_f32_win(float *pBuffer, const float *pWindow, const uint16_t size) | Performs windowing function on the real buffer
|
||||
void RFFT_adc_f32_win(uint16_t *pBuffer, const uint16_t *pWindow, const uint16_t size) | Performs windowing function on the real ADC input buffer (uint16_t type)
|
||||
void RFFT_f32_mag(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Computes the RFFT magnitude (no memory alignment needed); stored in MagBuf
|
||||
void RFFT_f32s_mag(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Computes the scaled RFFT magnitude (no memory alignment needed); stored in MagBuf
|
||||
void RFFT_f32_phase(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Computes the RFFT phase (no memory alignment needed); stored in PhaseBuf
|
||||
void RFFT_f32_mag_TMU0(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Computes the RFFT magnitude (no memory alignment needed) using TMU0 module; stored in MagBuf
|
||||
void RFFT_f32s_mag_TMU0(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Computes the scaled RFFT magnitude (no memory alignment needed) using TMU0 module; stored in MagBuf
|
||||
void RFFT_f32_phase_TMU0(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Computes the RFFT phase (no memory alignment needed) using TMU0 module; stored in PhaseBuf
|
||||
void RFFT_f32_sincostable(RFFT_F32_STRUCT_Handle hndRFFT_F32) | Generates Twiddle Factors for RFFT
|
||||
|
||||
---
|
||||
|
||||
**64-bit Complex Fast Fourier Transform Setters and Getters**
|
||||
|
||||
Function | Description
|
||||
--- |---
|
||||
void CFFT_f64_setInputPtr(CFFT_f64_Handle fh, const float64_t *pi) | Sets input pointer
|
||||
float64_t * CFFT_f64_getInputPtr(CFFT_f64_Handle fh) | Gets input pointer
|
||||
void CFFT_f64_setOutputPtr(CFFT_f64_Handle fh, const float64_t *po) | Sets output pointer
|
||||
float64_t * CFFT_f64_getOutputPtr(CFFT_f64_Handle fh) | Gets output pointer
|
||||
void CFFT_f64_setTwiddlesPtr(CFFT_f64_Handle fh, const float64_t *pc) | Sets twiddle factors pointer
|
||||
float64_t * CFFT_f64_getTwiddlesPtr(CFFT_f64_Handle fh) | Gets twiddle factors pointer
|
||||
void CFFT_f64_setCurrInputPtr(CFFT_f64_Handle fh, const float64_t *pi) | Sets current input pointer
|
||||
float64_t * CFFT_f64_getCurrInputPtr(CFFT_f64_Handle fh) | Gets current input pointer
|
||||
void CFFT_f64_setCurrOutputPtr(CFFT_f64_Handle fh, const float64_t *po) | Sets current output pointer
|
||||
float64_t * CFFT_f64_getCurrOutputPtr(CFFT_f64_Handle fh) | Gets current output pointer
|
||||
void CFFT_f64_setStages(CFFT_f64_Handle fh, const uint16_t st) | Sets number of stages
|
||||
uint16_t CFFT_f64_getStages(CFFT_f64_Handle fh) | Gets number of stages
|
||||
void CFFT_f64_setFFTSize(CFFT_f64_Handle fh, const uint16_t sz) | Sets the FFT size
|
||||
uint16_t CFFT_f64_getFFTSize(CFFT_f64_Handle fh) | Gets the FFT size
|
||||
void CFFT_f64_setInitFunction(CFFT_f64_Handle fh, const v_pfn_v pfn) | Sets the initialization function pointer
|
||||
v_pfn_v CFFT_f64_getInitFunction(CFFT_f64_Handle fh) | Gets the initialization function pointer
|
||||
void CFFT_f64_setCalcFunction(CFFT_f64_Handle fh, const v_pfn_v pfn) | Sets the calculation function pointer
|
||||
v_pfn_v CFFT_f64_getCalcFunction(CFFT_f64_Handle fh) | Gets the calculation function pointer
|
||||
void CFFT_f64_setMagFunction(CFFT_f64_Handle fh, const v_pfn_v pfn) | Sets magnitude function pointer
|
||||
v_pfn_v CFFT_f64_getMagFunction(CFFT_f64_Handle fh) | Gets magnitude function pointer
|
||||
void CFFT_f64_setPhaseFunction(CFFT_f64_Handle fh, const v_pfn_v pfn) | Sets phase function pointer
|
||||
v_pfn_v CFFT_f64_getPhaseFunction(CFFT_f64_Handle fh) | Gets phase function pointer
|
||||
void CFFT_f64_setWinFunction(CFFT_f64_Handle fh, const v_pfn_v pfn) | Sets the window function pointer
|
||||
v_pfn_v CFFT_f64_getWinFunction(CFFT_f64_Handle fh) | Gets the window function pointer
|
||||
void CFFT_ADC_f64_setInBufPtr(CFFT_ADC_f64_Handle fh, const uint16_t * pi) | Sets ADC input buffer pointer
|
||||
uint16_t *CFFT_ADC_f64_getInBufPtr(CFFT_ADC_f64_Handle fh) | Gets ADC input buffer pointer
|
||||
void CFFT_ADC_f64_setTailPtr(CFFT_ADC_f64_Handle fh, const void * pt) | Sets ADC tail pointer
|
||||
void *CFFT_ADC_f64_getTailPtr(CFFT_ADC_f64_Handle fh) | Gets ADC tail pointer
|
||||
|
||||
|
||||
**64-bit Complex Fast Fourier Transform Functions**
|
||||
|
||||
Function | Description
|
||||
--- |---
|
||||
void CFFT_f64(CFFT_f64_Handle hndCFFT_f64) | Computes CFFT, requires memory alignment for buffer(s)
|
||||
void CFFT_f64u(CFFT_f64_Handle hndCFFT_f64) | Computes CFFT, memory alignment not required
|
||||
void CFFT_f64_mag(CFFT_f64_Handle hndCFFT_f64) | Computes the CFFT magnitude (no memory alignment needed); stored in CurrentOutPtr
|
||||
void CFFT_f64s_mag(CFFT_f64_Handle hndCFFT_f64) | Computes the scaled CFFT magnitude (no memory alignment needed); stored in CurrentOutPtr
|
||||
void CFFT_f64_phase(CFFT_f64_Handle hndCFFT_f64) | Computes the CFFT phase (no memory alignment needed); stored in CurrentOutPtr
|
||||
void CFFT_f64_unpack(CFFT_f64_Handle hndCFFT_f64) | Unpacks N-point CFFT output to get CFFT of 2N-point real sequence, the output is written to buffer pointed to by p_currOutput
|
||||
void CFFT_f64_pack(CFFT_f64_Handle hndCFFT_f64) | Packs N/2-point CFFT output to get N-point real sequence, the output is written to buffer pointed to by p_currOutput
|
||||
void ICFFT_f64(CFFT_f64_Handle hndCFFT_f64) | Computes the inverse CFFT, requires memory alignment for buffer(s)
|
||||
void ICFFT_f64u(CFFT_f64_Handle hndCFFT_f64) | Computes the inverse CFFT, memory alignment not required
|
||||
|
||||
---
|
||||
|
||||
**64-bit Real Fast Fourier Transform Functions**
|
||||
|
||||
*NOTE: The 64-bit RFFT does not have setter and getter functions because these fields are shared using the CFFT_f64_Handle*
|
||||
|
||||
Function | Description
|
||||
--- |---
|
||||
void RFFT_f64(CFFT_f64_Handle hndCFFT_f64) | Computes RFFT, requires memory alignment for buffer(s)
|
||||
void RFFT_f64u(CFFT_f64_Handle hndCFFT_f64) | Computes RFFT, memory alignment not required
|
||||
void RFFT_adc_f64(CFFT_ADC_f64_Handle hndCFFT_ADC_f64) | Computes RFFT with ADC input; input of uint16_t and output of float64_t, requires memory alignment for buffer(s)
|
||||
void RFFT_adc_f64u(CFFT_ADC_f64_Handle hndCFFT_ADC_f64) | Computes RFFT with ADC input; input of uint16_t and output of float64_t, memory alignment not required
|
||||
void RFFT_adc_f64_win(uint16_t *pBuffer, const uint16_t *pWindow, const uint16_t size) | Performs windowing function on the real ADC input buffer (uint16_t type)
|
||||
void RFFT_f64_mag(CFFT_f64_Handle hndCFFT_f64) | Computes the RFFT magnitude (no memory alignment needed); stored in CurrentOutPtr
|
||||
void RFFT_f64s_mag(CFFT_f64_Handle hndCFFT_f64) | Computes the scaled RFFT magnitude (no memory alignment needed); stored in CurrentOutPtr
|
||||
void RFFT_f64_phase(CFFT_f64_Handle hndCFFT_f64) | Computes the CFFT phase (no memory alignment needed); stored in CurrentOutPtr
|
||||
`
|
||||
|
||||
let longWindDescription = `
|
||||
**The below macros contain arrays of floating point values that apply the corresponding window, each of which range from 32 to 4096. For example: the Barthann
|
||||
Window has #define macros of arrays for BARTHANN32, BARTHANN64, BARTHANN128, ... , BARTHANN4096**
|
||||
|
||||
**Windowing**
|
||||
|
||||
Windowing Type | Example of Given Macro
|
||||
---|---
|
||||
Barthann | #define BARTHANN64
|
||||
Bartlett | #define BARTLETT64
|
||||
Blackman | #define BLACKMAN64
|
||||
Blackman-Harris | #define BLACKMAN_HARRIS64
|
||||
Bohman | #define BOHMAN64
|
||||
Cheb | #define CHEB64
|
||||
Flat Top | #define FLAT_TOP64
|
||||
Gaussian | #define GAUSSIAN64
|
||||
Hamming | #define HAMMING64
|
||||
Hann | #define HANN64
|
||||
Kaiser | #define KAISER64
|
||||
Nuttall | #define NUTTALL64
|
||||
Parzen | #define PARZEN64
|
||||
Rectangular | #define RECTANGULAR64
|
||||
Taylor | #define TAYLOR64
|
||||
Triangle | #define TRIANGLE64
|
||||
Turkey | #define TURKEY64
|
||||
`
|
||||
|
||||
let FPU_TYPE;
|
||||
if((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x"))
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
|
||||
let WIND_TYPE = [
|
||||
{name: "Barthann", displayName: ""},
|
||||
{name: "Bartlett", displayName: ""},
|
||||
{name: "Blackman", displayName: ""},
|
||||
{name: "Blackman-Harris", displayName: ""},
|
||||
{name: "Bohman", displayName: ""},
|
||||
{name: "Cheb", displayName: ""},
|
||||
{name: "Flat Top", displayName: ""},
|
||||
{name: "Gaussian", displayName: ""},
|
||||
{name: "Hamming", displayName: ""},
|
||||
{name: "Hann", displayName: ""},
|
||||
{name: "Kaiser", displayName: ""},
|
||||
{name: "Nuttall", displayName: ""},
|
||||
{name: "Parzen", displayName: ""},
|
||||
{name: "Rectangular", displayName: ""},
|
||||
{name: "Taylor", displayName: ""},
|
||||
{name: "Triangle", displayName: ""},
|
||||
{name: "Turkey", displayName: ""}
|
||||
]
|
||||
var moduleStatic = {
|
||||
name: "fpu",
|
||||
displayName: "FPU/TMU Global Settings",
|
||||
config: []
|
||||
}
|
||||
var window_configs = [];
|
||||
|
||||
for(let i = 0; i < WIND_TYPE.length; i++)
|
||||
{
|
||||
window_configs = window_configs.concat([
|
||||
{
|
||||
name: "WIN_" + i,
|
||||
displayName : WIND_TYPE[i].name,
|
||||
hidden : true,
|
||||
default : false
|
||||
},
|
||||
])
|
||||
}
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
description : "Choose FPU32 or FPU64 Configuration",
|
||||
default : FPU_TYPE[0].name,
|
||||
options : FPU_TYPE
|
||||
},
|
||||
{
|
||||
name: "windEnable",
|
||||
displayName: "Windowing Enable",
|
||||
description: "Includes arrays of different types of windowing",
|
||||
default : false,
|
||||
onChange : onChangeWindow
|
||||
},
|
||||
{
|
||||
name : "windOptions",
|
||||
displayName : "Windowing Options",
|
||||
description : 'Choose what type(s) of windowing to include.',
|
||||
longDescription : longWindDescription,
|
||||
config : window_configs
|
||||
},
|
||||
]
|
||||
|
||||
function onChangeWindow(inst, ui)
|
||||
{
|
||||
if(inst.windEnable == true)
|
||||
{
|
||||
for(let i = 0; i < WIND_TYPE.length; i++)
|
||||
{
|
||||
ui[window_configs[i].name].hidden = false;
|
||||
}
|
||||
}
|
||||
else if(inst.windEnable == false)
|
||||
{
|
||||
for(let i = 0; i < WIND_TYPE.length; i++)
|
||||
{
|
||||
ui[window_configs[i].name].hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
function onValidate(inst, validation){
|
||||
var fpuMod = system.modules["/libraries/math/FPU/FPU.js"];
|
||||
if(fpuMod)
|
||||
{
|
||||
if(fpuMod.$static.fpuType != inst.fpuType)
|
||||
{
|
||||
validation.logError(system.getReference(fpuMod.$static, "fpuType") + " must be the same across modules.", inst, "fpuType");
|
||||
}
|
||||
}
|
||||
}
|
||||
function filterHardware(component)
|
||||
{
|
||||
return (Common.typeMatches(component.type, ["FFT"]));
|
||||
}
|
||||
var fftModule = {
|
||||
c2000wareLibraryName: "FFT",
|
||||
displayName: "FFT",
|
||||
defaultInstanceName: "myFFT",
|
||||
description: "Fast Fourier Transform",
|
||||
longDescription: longDescription,
|
||||
maxInstances : 1,
|
||||
filterHardware : filterHardware,
|
||||
config: config,
|
||||
moduleInstances : (inst) => {
|
||||
var fftInst = [];
|
||||
|
||||
fftInst.push({
|
||||
displayName: "CFFT Configurations",
|
||||
name: "CFFT",
|
||||
description: "",
|
||||
useArray : true,
|
||||
moduleName: "/libraries/dsp/FPU/FFT/CFFT.js",
|
||||
requiredArgs: {
|
||||
fpuType: inst.fpuType
|
||||
}
|
||||
});
|
||||
fftInst.push({
|
||||
displayName: "RFFT Configurations",
|
||||
name: "RFFT",
|
||||
description: "",
|
||||
useArray : true,
|
||||
moduleName: "/libraries/dsp/FPU/FFT/RFFT.js",
|
||||
requiredArgs: {
|
||||
fpuType: inst.fpuType
|
||||
}
|
||||
});
|
||||
return (fftInst);
|
||||
},
|
||||
modules: Common.autoForce("fpu", "/libraries/.meta/math/FPU/FPU.js"),
|
||||
templates: {
|
||||
c2000ware_libraries_h : "/libraries/dsp/FPU/FFT/templates/fft.c2000ware_libraries.h.xdt",
|
||||
c2000ware_libraries_c : "/libraries/dsp/FPU/FFT/templates/fft.c2000ware_libraries.c.xdt",
|
||||
c2000ware_libraries_opt : "/libraries/dsp/FPU/FFT/templates/fft.c2000ware_libraries.opt.xdt",
|
||||
c2000ware_libraries_cmd_genlibs : "/libraries/dsp/FPU/FFT/templates/fft.c2000ware_libraries.cmd.genlibs.xdt",
|
||||
},
|
||||
validate : onValidate
|
||||
};
|
||||
exports = fftModule;
|
||||
@@ -0,0 +1,187 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
|
||||
let FPU_TYPE;
|
||||
if((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x"))
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
|
||||
let CALC_TYPES = [
|
||||
{name: "RFFT_f64", displayName : "RFFT64 Memory Aligned"},
|
||||
{name: "RFFT_f64u", displayName : "RFFT64 Memory Unaligned"},
|
||||
]
|
||||
let MAG_TYPES = [
|
||||
{name: "RFFT_f64_mag", displayName : "RFFT64 Magnitude"},
|
||||
{name: "RFFT_f64s_mag", displayName : "RFFT64 Magnitude (Scaled)"},
|
||||
]
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "$name",
|
||||
hidden : false
|
||||
},
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
description : "Choose FPU32 or FPU64 Configuration",
|
||||
default : FPU_TYPE[0].name,
|
||||
onChange : onChangeFpu
|
||||
},
|
||||
{
|
||||
name : "inPtr",
|
||||
displayName : "Input Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "outPtr",
|
||||
displayName : "Output Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "magPtr",
|
||||
displayName : "Magnitude Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "phasPtr",
|
||||
displayName : "Phase Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "numStages",
|
||||
displayName : "Number of FFT Stages",
|
||||
longDescription : "The number of stages must be log base 2 of FFTSize",
|
||||
default : 5
|
||||
},
|
||||
{
|
||||
name : "fftSize",
|
||||
displayName : "FFT Size",
|
||||
longDescription : "FFT size must be a power of 2; the size must be at least 32 and at most 1024; input/output/current input/current output pointers are FFT Size in length",
|
||||
default : 32,
|
||||
getValue : (inst) => {
|
||||
return Math.pow(2, inst.numStages);
|
||||
}
|
||||
},
|
||||
{
|
||||
name : "sincosFunction",
|
||||
displayName : "Use Predefined Twiddle Factors",
|
||||
longDescription : "NOTE: When using pre-generated twiddle factors (e.g. this option is true), use a function with a 't' after the RFFT_f32",
|
||||
default : true,
|
||||
onChange : onChangeTwiddle
|
||||
},
|
||||
{
|
||||
name : "coeffPtr",
|
||||
displayName : "Twiddle Factors Pointer",
|
||||
default : "",
|
||||
hidden : true
|
||||
},
|
||||
{
|
||||
name : "calcFunction",
|
||||
displayName : "Calculation Functions",
|
||||
longDescription : "Choose a specific calculation function, and do <name>_handle->calc(<name>_handle); to run the calculation function. This can be changed during runtime",
|
||||
default : CALC_TYPES[0].name,
|
||||
options : CALC_TYPES,
|
||||
hidden : true
|
||||
},
|
||||
{
|
||||
name : "magFunction",
|
||||
displayName : "Magnitude Functions",
|
||||
longDescription : "Choose a specific magnitude function, and do <name>_handle->mag(<name>_handle); to run the calculation function. This can be changed during runtime",
|
||||
default : MAG_TYPES[0].name,
|
||||
options : MAG_TYPES,
|
||||
hidden : true
|
||||
},
|
||||
{
|
||||
name : "adcEnable",
|
||||
displayName : "RFFT ADC: Enable RFFT ADC",
|
||||
description : "Requires an RFFT module to utilize RFFT ADC struct",
|
||||
default : false,
|
||||
hidden : true, //FIXME: Remove once RFFT ADC example is working
|
||||
onChange : onChangeAdc
|
||||
},
|
||||
{
|
||||
name : "inAdcPtr",
|
||||
displayName : "RFFT ADC: Input Pointer (ADC)",
|
||||
description : "Pointer to input buffer",
|
||||
default : "",
|
||||
hidden : true
|
||||
}
|
||||
]
|
||||
|
||||
function onChangeFpu(inst, ui)
|
||||
{
|
||||
if(inst.fpuType == FPU_TYPE[0].name)
|
||||
{
|
||||
ui.magPtr.hidden = false;
|
||||
ui.phasPtr.hidden = false;
|
||||
ui.sincosFunction.hidden = false;
|
||||
ui.coeffPtr.hidden = inst.sincosFunction;
|
||||
ui.calcFunction.hidden = true;
|
||||
ui.magFunction.hidden = true;
|
||||
}
|
||||
else if(((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x")) && (inst.fpuType == FPU_TYPE[1].name))
|
||||
{
|
||||
ui.magPtr.hidden = true;
|
||||
ui.phasPtr.hidden = true;
|
||||
ui.sincosFunction.hidden = true;
|
||||
ui.coeffPtr.hidden = true;
|
||||
ui.calcFunction.hidden = false;
|
||||
ui.magFunction.hidden = false;
|
||||
}
|
||||
}
|
||||
function onChangeTwiddle(inst, ui)
|
||||
{
|
||||
ui.coeffPtr.hidden = inst.sincosFunction;
|
||||
}
|
||||
function onChangeAdc(inst, ui)
|
||||
{
|
||||
ui.inAdcPtr.hidden = !inst.adcEnable;
|
||||
}
|
||||
function onValidate(inst, validation)
|
||||
{
|
||||
if(inst.fftSize < 32)
|
||||
{
|
||||
validation.logError("FFT size must be at least 32", inst, "fftSize");
|
||||
}
|
||||
if(inst.fftSize > 1024)
|
||||
{
|
||||
validation.logError("FFT size cannot be more than 1024", inst, "fftSize");
|
||||
}
|
||||
if((inst.inPtr == "") || (inst.outPtr == "") || ((inst.adcEnable == true) && ((inst.inAdcPtr == ""))) || ((inst.fpuType == FPU_TYPE[0].name) &&
|
||||
(inst.sincosFunction == false) && (inst.coeffPtr == "")))
|
||||
{
|
||||
//Since magnitude and phase are optionally used, error logging not included for them
|
||||
validation.logError("All pointers must point to valid arrays", inst);
|
||||
}
|
||||
if((inst.inPtr == inst.outPtr) || ((inst.fpuType == FPU_TYPE[0].name) && (
|
||||
(inst.inPtr == inst.magPtr) || (inst.inPtr == inst.phasPtr) || (inst.inPtr == inst.coeffPtr) || (inst.outPtr == inst.magPtr) ||
|
||||
(inst.outPtr == inst.phasPtr) || (inst.outPtr == inst.coeffPtr) || (inst.coeffPtr == inst.magPtr) || (inst.coeffPtr == inst.phasPtr) || (inst.magPtr == inst.phasPtr))))
|
||||
{
|
||||
validation.logError("No duplicate names allowed within FFT object", inst);
|
||||
}
|
||||
if((inst.adcEnable == true) && ((inst.inAdcPtr == inst.outPtr) || (inst.inAdcPtr == inst.inPtr) || ((inst.fpuType == FPU_TYPE[0].name) && (
|
||||
(inst.inAdcPtr == inst.magPtr) || (inst.inAdcPtr == inst.phasPtr) || ((inst.sincosFunction == false) && (inst.inAdcPtr == inst.coeffPtr)) || (inst.inAdcPtr == inst.magPtr)))))
|
||||
{
|
||||
validation.logError("No duplicate names allowed within FFT object", inst);
|
||||
}
|
||||
}
|
||||
|
||||
var rfftModule = {
|
||||
c2000wareLibraryName: "RFFT",
|
||||
displayName: "RFFT",
|
||||
defaultInstanceName: "myRFFT",
|
||||
description: "Real FFT",
|
||||
config: config,
|
||||
validate : onValidate
|
||||
}
|
||||
exports = rfftModule;
|
||||
|
After Width: | Height: | Size: 84 KiB |
@@ -0,0 +1,168 @@
|
||||
%//Auto set phase function for CFFT64/RFFT64
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var currnetSDKProductPath = system.getProducts()[0].path
|
||||
% var sdkPath = system.utils.path.join(currnetSDKProductPath + "../../../")
|
||||
% sdkPath = sdkPath.replace(new RegExp('\\' + system.utils.path.sep, 'g'), '/')
|
||||
%
|
||||
% var moduleName = "FFT"
|
||||
% var module = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleName + '.js'];
|
||||
%
|
||||
% var moduleNameCFFT = "CFFT"
|
||||
% var moduleCFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameCFFT + '.js'];
|
||||
% var moduleNameRFFT = "RFFT"
|
||||
% var moduleRFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameRFFT + '.js'];
|
||||
%
|
||||
void FFT_init()
|
||||
{
|
||||
%if(moduleCFFT != null)
|
||||
%{
|
||||
% var instancesCFFT = moduleCFFT.$instances;
|
||||
%for(let i = 0; i < instancesCFFT.length; i++)
|
||||
%{
|
||||
`instancesCFFT[i].$name`_init();
|
||||
%}
|
||||
%}
|
||||
%if(moduleRFFT != null)
|
||||
%{
|
||||
% var instancesRFFT = moduleRFFT.$instances;
|
||||
%for(let i = 0; i < instancesRFFT.length; i++)
|
||||
%{
|
||||
`instancesRFFT[i].$name`_init();
|
||||
%}
|
||||
%}
|
||||
}
|
||||
|
||||
%if(module != null)
|
||||
%{
|
||||
% var instance = module.$instances[0];
|
||||
%
|
||||
%if(moduleCFFT != null)
|
||||
%{
|
||||
% var instancesCFFT = moduleCFFT.$instances;
|
||||
%
|
||||
%for(let i = 0; i < instancesCFFT.length; i++)
|
||||
%{
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
CFFT_F32_STRUCT `instancesCFFT[i].$name`_obj;
|
||||
CFFT_F32_STRUCT_Handle `instancesCFFT[i].$name`_handle = &`instancesCFFT[i].$name`_obj;
|
||||
|
||||
void `instancesCFFT[i].$name`_init()
|
||||
{
|
||||
CFFT_f32_setInputPtr(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].inPtr`);
|
||||
CFFT_f32_setOutputPtr(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].outPtr`);
|
||||
CFFT_f32_setStages(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].$name`_CFFT_NUM_STAGES);
|
||||
CFFT_f32_setFFTSize(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].$name`_CFFT_SIZE);
|
||||
%if(instancesCFFT[i].sincosFunction == true)
|
||||
%{
|
||||
CFFT_f32_setTwiddlesPtr(`instancesCFFT[i].$name`_handle, CFFT_f32_twiddleFactors);
|
||||
%}
|
||||
%else
|
||||
%{
|
||||
CFFT_f32_setTwiddlesPtr(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].coeffPtr`);
|
||||
CFFT_f32_sincostable(`instancesCFFT[i].$name`_handle);
|
||||
%}
|
||||
}
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
CFFT_f64_Struct `instancesCFFT[i].$name`_obj;
|
||||
CFFT_f64_Handle `instancesCFFT[i].$name`_handle = &`instancesCFFT[i].$name`_obj;
|
||||
|
||||
void `instancesCFFT[i].$name`_init()
|
||||
{
|
||||
CFFT_f64_setInputPtr(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].inPtr`);
|
||||
CFFT_f64_setOutputPtr(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].outPtr`);
|
||||
CFFT_f64_setTwiddlesPtr(`instancesCFFT[i].$name`_handle, FPU64CFFTtwiddleFactors);
|
||||
CFFT_f64_setStages(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].$name`_CFFT_NUM_STAGES);
|
||||
CFFT_f64_setFFTSize(`instancesCFFT[i].$name`_handle, `instancesCFFT[i].$name`_CFFT_SIZE);
|
||||
CFFT_f64_setInitFunction(`instancesCFFT[i].$name`_handle, NULL);
|
||||
CFFT_f64_setCalcFunction(`instancesCFFT[i].$name`_handle, (v_pfn_v)`instancesCFFT[i].calcFunction`);
|
||||
CFFT_f64_setMagFunction(`instancesCFFT[i].$name`_handle, (v_pfn_v)`instancesCFFT[i].magFunction`);
|
||||
CFFT_f64_setPhaseFunction(`instancesCFFT[i].$name`_handle, (v_pfn_v)CFFT_f64_phase);
|
||||
}
|
||||
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
%if(moduleRFFT != null)
|
||||
%{
|
||||
% var instancesRFFT = moduleRFFT.$instances;
|
||||
%
|
||||
%for(let i = 0; i < instancesRFFT.length; i++)
|
||||
%{
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
RFFT_F32_STRUCT `instancesRFFT[i].$name`_obj;
|
||||
RFFT_F32_STRUCT_Handle `instancesRFFT[i].$name`_handle = &`instancesRFFT[i].$name`_obj;
|
||||
%if(instancesRFFT[i].adcEnable == true)
|
||||
%{
|
||||
RFFT_ADC_F32_STRUCT `instancesRFFT[i].$name`_adc_obj;
|
||||
RFFT_ADC_F32_STRUCT_Handle `instancesRFFT[i].$name`_adc_handle = &`instancesRFFT[i].$name`_adc_obj;
|
||||
%}
|
||||
|
||||
void `instancesRFFT[i].$name`_init()
|
||||
{
|
||||
RFFT_f32_setInputPtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].inPtr`);
|
||||
RFFT_f32_setOutputPtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].outPtr`);
|
||||
RFFT_f32_setStages(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].$name`_RFFT_NUM_STAGES);
|
||||
RFFT_f32_setFFTSize(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].$name`_RFFT_SIZE);
|
||||
%if(instancesRFFT[i].magPtr != "")
|
||||
%{
|
||||
RFFT_f32_setMagnitudePtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].magPtr`);
|
||||
%}
|
||||
%if(instancesRFFT[i].phasPtr != "")
|
||||
%{
|
||||
RFFT_f32_setPhasePtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].phasPtr`);
|
||||
%}
|
||||
%if(instancesRFFT[i].sincosFunction == true)
|
||||
%{
|
||||
RFFT_f32_setTwiddlesPtr(`instancesRFFT[i].$name`_handle, RFFT_f32_twiddleFactors);
|
||||
%}
|
||||
%else
|
||||
%{
|
||||
RFFT_f32_setTwiddlesPtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].coeffPtr`);
|
||||
RFFT_f32_sincostable(`instancesRFFT[i].$name`_handle);
|
||||
%}
|
||||
%if(instancesRFFT[i].adcEnable == true)
|
||||
%{
|
||||
RFFT_ADC_f32_setInBufPtr(`instancesRFFT[i].$name`_adc_handle, `instancesRFFT[i].inAdcPtr`);
|
||||
RFFT_ADC_f32_setTailPtr(`instancesRFFT[i].$name`_adc_handle, `instancesRFFT[i].outPtr`);
|
||||
%}
|
||||
}
|
||||
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
CFFT_f64_Struct `instancesRFFT[i].$name`_obj;
|
||||
CFFT_f64_Handle `instancesRFFT[i].$name`_handle = &`instancesRFFT[i].$name`_obj;
|
||||
%if(instancesRFFT[i].adcEnable == true)
|
||||
%{
|
||||
CFFT_ADC_f64_Struct `instancesRFFT[i].$name`_adc_obj;
|
||||
CFFT_ADC_f64_Handle `instancesRFFT[i].$name`_adc_handle = &`instancesRFFT[i].$name`_adc_obj;
|
||||
%}
|
||||
|
||||
void `instancesRFFT[i].$name`_init()
|
||||
{
|
||||
CFFT_f64_setInputPtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].inPtr`);
|
||||
CFFT_f64_setCurrInputPtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].inPtr`);
|
||||
CFFT_f64_setOutputPtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].outPtr`);
|
||||
CFFT_f64_setCurrOutputPtr(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].outPtr`);
|
||||
CFFT_f64_setStages(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].$name`_RFFT_NUM_STAGES);
|
||||
CFFT_f64_setFFTSize(`instancesRFFT[i].$name`_handle, `instancesRFFT[i].$name`_RFFT_SIZE);
|
||||
CFFT_f64_setTwiddlesPtr(`instancesRFFT[i].$name`_handle, FPU64RFFTtwiddleFactors);
|
||||
CFFT_f64_setInitFunction(`instancesRFFT[i].$name`_handle, NULL);
|
||||
CFFT_f64_setCalcFunction(`instancesRFFT[i].$name`_handle, (v_pfn_v)`instancesRFFT[i].calcFunction`);
|
||||
CFFT_f64_setMagFunction(`instancesRFFT[i].$name`_handle, (v_pfn_v)`instancesRFFT[i].magFunction`);
|
||||
CFFT_f64_setPhaseFunction(`instancesRFFT[i].$name`_handle, (v_pfn_v)RFFT_f64_phase);
|
||||
%if(instancesRFFT[i].adcEnable == true)
|
||||
%{
|
||||
CFFT_ADC_f64_setInBufPtr(`instancesRFFT[i].$name`_adc_handle, `instancesRFFT[i].inAdcPtr`);
|
||||
CFFT_ADC_f64_setTailPtr(`instancesRFFT[i].$name`_adc_handle, `instancesRFFT[i].outPtr`);
|
||||
%}
|
||||
}
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
%
|
||||
@@ -0,0 +1,20 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var moduleNameFFT = "FFT"
|
||||
% var moduleFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameFFT + '.js'];
|
||||
% var moduleNameFILTER = "Filter"
|
||||
% var moduleFILTER = system.modules['/libraries/dsp/FPU/Filter' + '/' + moduleNameFILTER + '.js'];
|
||||
% var moduleNameVec = "Vector"
|
||||
% var moduleVec = system.modules['/libraries/dsp/FPU/Vector' + '/' + moduleNameVec + '.js'];
|
||||
%
|
||||
%if(moduleFFT != null)
|
||||
%{
|
||||
% var instance = moduleFFT.$instances[0];
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
-l"libraries/dsp/FPU/c28/lib/c28x_fpu_dsp_library.lib"
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
-l"libraries/dsp/FPU/c28/lib/c28x_fpu64_dsp_library.lib"
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,182 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var currnetSDKProductPath = system.getProducts()[0].path
|
||||
% var sdkPath = system.utils.path.join(currnetSDKProductPath + "../../../")
|
||||
% sdkPath = sdkPath.replace(new RegExp('\\' + system.utils.path.sep, 'g'), '/')
|
||||
%
|
||||
% var moduleName = "FFT"
|
||||
% var module = system.modules['/libraries/dsp/FPU/FFT/' + moduleName + '.js'];
|
||||
%
|
||||
#include <dsp.h>
|
||||
%if(module != null)
|
||||
%{
|
||||
% var instance = module.$instances[0];
|
||||
%if(instance.windEnable == true)
|
||||
%{
|
||||
%if(instance.WIN_0 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_barthann.h>
|
||||
%}
|
||||
%if(instance.WIN_1 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_bartlett.h>
|
||||
%}
|
||||
%if(instance.WIN_2 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_blackman.h>
|
||||
%}
|
||||
%if(instance.WIN_3 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_blackmanharris.h>
|
||||
%}
|
||||
%if(instance.WIN_4 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_bohman.h>
|
||||
%}
|
||||
%if(instance.WIN_5 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_cheb.h>
|
||||
%}
|
||||
%if(instance.WIN_6 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_flattop.h>
|
||||
%}
|
||||
%if(instance.WIN_7 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_gauss.h>
|
||||
%}
|
||||
%if(instance.WIN_8 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_hamming.h>
|
||||
%}
|
||||
%if(instance.WIN_9 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_hann.h>
|
||||
%}
|
||||
%if(instance.WIN_10 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_kaiser.h>
|
||||
%}
|
||||
%if(instance.WIN_11 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_nuttall.h>
|
||||
%}
|
||||
%if(instance.WIN_12 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_parzen.h>
|
||||
%}
|
||||
%if(instance.WIN_13 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_rect.h>
|
||||
%}
|
||||
%if(instance.WIN_14 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_taylor.h>
|
||||
%}
|
||||
%if(instance.WIN_15 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_triang.h>
|
||||
%}
|
||||
%if(instance.WIN_16 == true)
|
||||
%{
|
||||
#include <fpu32/fpu_fft_tukey.h>
|
||||
%}
|
||||
%}
|
||||
|
||||
% if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
#include <fpu32/fpu_cfft.h>
|
||||
#include <fpu32/fpu_rfft.h>
|
||||
|
||||
%}
|
||||
% else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
#include <fpu64/fpu64_fft.h>
|
||||
|
||||
%}
|
||||
%}
|
||||
%
|
||||
% var moduleNameCFFT = "CFFT"
|
||||
% var moduleCFFT = system.modules['/libraries/dsp/FPU/FFT/' + moduleNameCFFT + '.js'];
|
||||
% var moduleNameRFFT = "RFFT"
|
||||
% var moduleRFFT = system.modules['/libraries/dsp/FPU/FFT/' + moduleNameRFFT + '.js'];
|
||||
%
|
||||
%if(moduleCFFT != null)
|
||||
%{
|
||||
% var instancesCFFT = moduleCFFT.$instances;
|
||||
%for(let i = 0; i < instancesCFFT.length; i++)
|
||||
%{
|
||||
#define `instancesCFFT[i].$name`_CFFT_NUM_STAGES `instancesCFFT[i].numStages`
|
||||
#define `instancesCFFT[i].$name`_CFFT_SIZE `instancesCFFT[i].fftSize`
|
||||
|
||||
%if(instancesCFFT[i].fpuType == "FPU32")
|
||||
%{
|
||||
extern CFFT_F32_STRUCT_Handle `instancesCFFT[i].$name`_handle;
|
||||
extern float32_t *`instancesCFFT[i].inPtr`;
|
||||
extern float32_t *`instancesCFFT[i].outPtr`;
|
||||
%
|
||||
%if(instancesCFFT[i].sincosFunction == false)
|
||||
%{
|
||||
extern float32_t *`instancesCFFT[i].coeffPtr`;
|
||||
%}
|
||||
%}
|
||||
%else if(instancesCFFT[i].fpuType == "FPU64")
|
||||
%{
|
||||
extern CFFT_f64_Handle `instancesCFFT[i].$name`_handle;
|
||||
extern float64_t *`instancesCFFT[i].inPtr`;
|
||||
extern float64_t *`instancesCFFT[i].outPtr`;
|
||||
%}
|
||||
|
||||
void `instancesCFFT[i].$name`_init();
|
||||
%}
|
||||
%}
|
||||
|
||||
%if(moduleRFFT != null)
|
||||
%{
|
||||
% var instancesRFFT = moduleRFFT.$instances;
|
||||
%for(let i = 0; i < instancesRFFT.length; i++)
|
||||
%{
|
||||
#define `instancesRFFT[i].$name`_RFFT_NUM_STAGES `instancesRFFT[i].numStages`
|
||||
#define `instancesRFFT[i].$name`_RFFT_SIZE `instancesRFFT[i].fftSize`
|
||||
|
||||
%if(instancesRFFT[i].fpuType == "FPU32")
|
||||
%{
|
||||
extern RFFT_F32_STRUCT_Handle `instancesRFFT[i].$name`_handle;
|
||||
extern float32_t *`instancesRFFT[i].inPtr`;
|
||||
extern float32_t *`instancesRFFT[i].outPtr`;
|
||||
%
|
||||
%if(instancesRFFT[i].magPtr != "")
|
||||
%{
|
||||
extern float32_t *`instancesRFFT[i].magPtr`;
|
||||
%}
|
||||
%if(instancesRFFT[i].phasPtr != "")
|
||||
%{
|
||||
extern float32_t *`instancesRFFT[i].phasPtr`;
|
||||
%}
|
||||
%
|
||||
%if(instancesRFFT[i].sincosFunction == false)
|
||||
%{
|
||||
extern float32_t *`instancesRFFT[i].coeffPtr`;
|
||||
%}
|
||||
%if(instancesRFFT[i].adcEnable == true)
|
||||
%{
|
||||
|
||||
extern RFFT_ADC_F32_STRUCT_Handle `instancesRFFT[i].$name`_adc_handle;
|
||||
extern uint16_t *`instancesRFFT[i].inAdcPtr`;
|
||||
%}
|
||||
%}
|
||||
%else if(instancesRFFT[i].fpuType == "FPU64")
|
||||
%{
|
||||
extern CFFT_f64_Handle `instancesRFFT[i].$name`_handle;
|
||||
extern float64_t *`instancesRFFT[i].inPtr`;
|
||||
extern float64_t *`instancesRFFT[i].outPtr`;
|
||||
%if(instancesRFFT[i].adcEnable == true)
|
||||
%{
|
||||
|
||||
extern CFFT_ADC_f64_Handle `instancesRFFT[i].$name`_adc_handle;
|
||||
extern uint16_t *`instancesRFFT[i].inAdcPtr`;
|
||||
%}
|
||||
%}
|
||||
|
||||
void `instancesRFFT[i].$name`_init();
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,53 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var c2000warePath = Common.getC2000WarePath()
|
||||
%
|
||||
% var moduleNameFFT = "FFT"
|
||||
% var moduleFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameFFT + '.js'];
|
||||
% var moduleNameCFFT = "CFFT"
|
||||
% var moduleCFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameCFFT + '.js'];
|
||||
% var moduleNameRFFT = "RFFT"
|
||||
% var moduleRFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameRFFT + '.js'];
|
||||
%
|
||||
%if(moduleFFT != null)
|
||||
%{
|
||||
-I"`c2000warePath`libraries/dsp/FPU/c28/include"
|
||||
%
|
||||
%var instance = moduleFFT.$instances[0];
|
||||
%var max = -1;
|
||||
%
|
||||
%if(moduleCFFT != null)
|
||||
%{
|
||||
% var instancesCFFT = moduleCFFT.$instances;
|
||||
%for(let i = 0; i < instancesCFFT.length; i++)
|
||||
%{
|
||||
%if(instancesCFFT[i].fftSize > max)
|
||||
%{
|
||||
%max = instancesCFFT[i].fftSize;
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
%
|
||||
%if(moduleRFFT != null)
|
||||
%{
|
||||
% var instancesRFFT = moduleRFFT.$instances;
|
||||
%for(let i = 0; i < instancesRFFT.length; i++)
|
||||
%{
|
||||
%if(instancesRFFT[i].fftSize > max)
|
||||
%{
|
||||
%max = instancesRFFT[i].fftSize;
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
%if(max != -1)
|
||||
%{
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
%max = max*4;
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
%max = max*8;
|
||||
%}
|
||||
--define=FFT_ALIGN=`max`
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,123 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
|
||||
let FPU_TYPE;
|
||||
if((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x"))
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "$name",
|
||||
hidden : false
|
||||
},
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
description : "Choose FPU32 or FPU64 Configuration",
|
||||
default : FPU_TYPE[0].name,
|
||||
onChange : onChangeFpu
|
||||
},
|
||||
{
|
||||
name : "coeffPtr",
|
||||
displayName : "Filter Coefficients Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "dBuffPtr",
|
||||
displayName : "Delay Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "cbIndex",
|
||||
displayName : "Circular Buffer Index",
|
||||
default : 0,
|
||||
hidden : false
|
||||
},
|
||||
//These two fields are not pointers, need to initialize? No examples, nothing to look at
|
||||
/*{
|
||||
name : "input",
|
||||
displayName : "Input value",
|
||||
default : 0,
|
||||
hidden : false
|
||||
},
|
||||
{
|
||||
name : "Output",
|
||||
displayName : "Output value",
|
||||
default : 0,
|
||||
hidden : false
|
||||
},
|
||||
*/
|
||||
{
|
||||
name : "filterOrder",
|
||||
displayName : "Order of FIR filter",
|
||||
description : "Number of Taps = Order + 1",
|
||||
longDescription : "Number of Taps = Order + 1",
|
||||
default : 1
|
||||
},
|
||||
|
||||
{
|
||||
name : "inPtr",
|
||||
displayName : "Input Buffer Pointer",
|
||||
default : "",
|
||||
hidden : true
|
||||
},
|
||||
{
|
||||
name : "outPtr",
|
||||
displayName : "Output Buffer Pointer",
|
||||
default : "",
|
||||
hidden : true
|
||||
},
|
||||
]
|
||||
|
||||
function onChangeFpu(inst, ui)
|
||||
{
|
||||
if(inst.fpuType == FPU_TYPE[0].name)
|
||||
{
|
||||
ui.inPtr.hidden = true;
|
||||
ui.outPtr.hidden = true;
|
||||
ui.cbIndex.hidden = false;
|
||||
}
|
||||
else if(((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x")) && (inst.fpuType == FPU_TYPE[1].name))
|
||||
{
|
||||
ui.inPtr.hidden = false;
|
||||
ui.outPtr.hidden = false;
|
||||
ui.cbIndex.hidden = true;
|
||||
}
|
||||
}
|
||||
function onValidate(inst, validation)
|
||||
{
|
||||
if((inst.filterOrder > 65535) || (inst.filterOrder < 0))
|
||||
{
|
||||
validation.logError("Filter order must be within range of uint16_t", inst, "filterOrder");
|
||||
}
|
||||
if((inst.coeffPtr == "") || (inst.dBuffPtr == "") || ((((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x")) && (inst.fpuType == FPU_TYPE[1].name)) && ((inst.inPtr == "") || (inst.outPtr == ""))))
|
||||
{
|
||||
validation.logError("All pointers must point to valid arrays", inst);
|
||||
}
|
||||
if((inst.coeffPtr == inst.dBuffPtr) || ((((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x")) && (inst.fpuType == FPU_TYPE[1].name)) && ((inst.inPtr == inst.coeffPtr) || (inst.outPtr == inst.coeffPtr) || (inst.outPtr == inst.inPtr) ||
|
||||
(inst.outPtr == inst.dBuffPtr) || (inst.inPtr == inst.dBuffPtr))))
|
||||
{
|
||||
validation.logError("No duplicate names allowed within FFT object", inst);
|
||||
}
|
||||
}
|
||||
|
||||
var firModule = {
|
||||
c2000wareLibraryName: "FIR",
|
||||
displayName: "FIR",
|
||||
defaultInstanceName: "myFIR",
|
||||
description: "Finite Impulse Response",
|
||||
config: config,
|
||||
validate : onValidate
|
||||
}
|
||||
exports = firModule;
|
||||
@@ -0,0 +1,284 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
|
||||
let longDescription = `
|
||||
(name)_handle = Filter object handle
|
||||
|
||||
FIR 32-bit Functions | Description
|
||||
---|---
|
||||
void FIR_f32_setCoefficientsPtr(FIR_f32_Handle fh, const float *pc) | Set coefficients pointer
|
||||
float * FIR_f32_getCoefficientsPtr(FIR_f32_Handle fh) | Get coefficients pointer
|
||||
void FIR_f32_setDelayLinePtr(FIR_f32_Handle fh, const float *pdl) | Set delay line pointer
|
||||
float * FIR_f32_getDelayLinePtr(FIR_f32_Handle fh) | Get delay line pointer
|
||||
void FIR_f32_setInput(FIR_f32_Handle fh, const float in) | Set the input
|
||||
float FIR_f32_getInput(FIR_f32_Handle fh) | Get the input
|
||||
void FIR_f32_setOutput(FIR_f32_Handle fh, const float out) | Set the output
|
||||
float FIR_f32_getOutput(FIR_f32_Handle fh) | Get the output
|
||||
void FIR_f32_setOrder(FIR_f32_Handle fh, const uint16_t order) | Set filter order
|
||||
uint16_t FIR_f32_getOrder(FIR_f32_Handle fh) | Get filter order
|
||||
void FIR_f32_setInitFunction(FIR_f32_Handle fh, const v_pfn_v pfn) | Set initialization function
|
||||
v_pfn_v FIR_f32_getInitFunction(FIR_f32_Handle fh) | Get initialization function
|
||||
void FIR_f32_setCalcFunction(FIR_f32_Handle fh, const v_pfn_v pfn) | Set calculation function
|
||||
v_pfn_v FIR_f32_getCalcFunction(FIR_f32_Handle fh) | Get calculation function
|
||||
void FIR_f32_calc(FIR_f32_Handle hndFIR_f32) | FIR calculation
|
||||
void FIR_f32_init(FIR_f32_Handle hndFIR_f32) | FIR initialization (zeros out delay line)
|
||||
|
||||
* All the coefficients of all-zero filter are assumed to be less than 1 in magnitude.
|
||||
* The delay and coefficients buffer must be aligned to a minimum of 2 x (order + 1) words.
|
||||
* To align the buffer, use the DATA_SECTION pragma to assign the buffer to a code section and then align the buffer to the proper offset in the linker
|
||||
command file. In the code example the buffer is assigned to the firldb section while the coefficients are assigned to the coefffilt section.
|
||||
* This routine requires the --c2xlp_src_compatible option to be enabled in the file specific properties
|
||||
|
||||
---
|
||||
|
||||
FIR 64-bit Functions | Description
|
||||
---|---
|
||||
void FIR_f64_setCoefficientsPtr(FIR_f64_Handle fh, const float64_t *pc) | Set coefficients pointer
|
||||
float64_t * FIR_f64_getCoefficientsPtr(FIR_f64_Handle fh) | Get coefficients pointer
|
||||
void FIR_f64_setDelayLinePtr(FIR_f64_Handle fh, const float64_t *pdl) | Set delay line pointer
|
||||
float64_t * FIR_f64_getDelayLinePtr(FIR_f64_Handle fh) | Get delay line pointer
|
||||
void FIR_f64_setInputPtr(FIR_f64_Handle fh, const float64_t *pi) | Set input pointer
|
||||
float64_t * FIR_f64_getInputPtr(FIR_f64_Handle fh) | Get input pointer
|
||||
void FIR_f64_setOutputPtr(FIR_f64_Handle fh, const float64_t *po) | Set output pointer
|
||||
float64_t * FIR_f64_getOutputPtr(FIR_f64_Handle fh) | Get output pointer
|
||||
void FIR_f64_setOrder(FIR_f64_Handle fh, const uint16_t order) | Set filter order
|
||||
uint16_t FIR_f64_getOrder(FIR_f64_Handle fh) | Get filter order
|
||||
void FIR_f64_setInitFunction(FIR_f64_Handle fh, const v_pfn_v pfn) | Set initialization function
|
||||
v_pfn_v FIR_f64_getInitFunction(FIR_f64_Handle fh) | Get initialization function
|
||||
void FIR_f64_setCalcFunction(FIR_f64_Handle fh, const v_pfn_v pfn) | Set calculation function
|
||||
v_pfn_v FIR_f64_getCalcFunction(FIR_f64_Handle fh) | Get calculation function
|
||||
void FIR_f64_calc(FIR_f64_Handle hndFIR_f64) | FIR calculation
|
||||
void FIR_f64_init(FIR_f64_Handle hndFIR_f64) | FIR initialization (zeros out delay line)
|
||||
|
||||
* The delay and coefficients buffer must be assigned a minimum of 4 x (order + 1) words.
|
||||
* In the code example the buffer is assigned to the .ebss section while the coefficients are assigned to the .econst section.
|
||||
|
||||
---
|
||||
|
||||
IIR 32-bit Functions | Description
|
||||
---|---
|
||||
void IIR_f32_setCoefficientsAPtr(IIR_f32_Handle fh, const float *pca) | Set denominator coefficients pointer
|
||||
float * IIR_f32_getCoefficientsAPtr(IIR_f32_Handle fh) | Get denominator coefficients pointer
|
||||
void IIR_f32_setCoefficientsBPtr(IIR_f32_Handle fh, const float *pcb) | Set numerator coefficients pointer
|
||||
float * IIR_f32_getCoefficientsBPtr(IIR_f32_Handle fh) | Get numerator coefficients pointer
|
||||
void IIR_f32_setDelayLinePtr(IIR_f32_Handle fh, const float *pdl) | Set delay line pointer
|
||||
float * IIR_f32_getDelayLinePtr(IIR_f32_Handle fh) | Get delay line pointer
|
||||
void IIR_f32_setInputPtr(IIR_f32_Handle fh, const float *pi) | Set input pointer
|
||||
float * IIR_f32_getInputPtr(IIR_f32_Handle fh) | Get input pointer
|
||||
void IIR_f32_setOutputPtr(IIR_f32_Handle fh, const float *po) | Set output pointer
|
||||
float * IIR_f32_getOutputPtr(IIR_f32_Handle fh) | Get output pointer
|
||||
void IIR_f32_setScalePtr(IIR_f32_Handle fh, const float *psv) | Set scale value pointer
|
||||
float * IIR_f32_getScalePtr(IIR_f32_Handle fh) | Get scale value pointer
|
||||
void IIR_f32_setOrder(IIR_f32_Handle fh, const uint16_t order) | Set filter order
|
||||
uint16_t IIR_f32_getOrder(IIR_f32_Handle fh) | Get filter order
|
||||
void IIR_f32_setInitFunction(IIR_f32_Handle fh, const v_pfn_v pfn) | Set initialization function
|
||||
v_pfn_v IIR_f32_getInitFunction(IIR_f32_Handle fh)"}, | Get initialization function
|
||||
void IIR_f32_setCalcFunction(IIR_f32_Handle fh, const v_pfn_v pfn) | Set calculation function
|
||||
v_pfn_v IIR_f32_getCalcFunction(IIR_f32_Handle fh) | Get calculation function
|
||||
void IIR_f32_calc(IIR_f32_Handle hndIIR_f32) | IIR calculation
|
||||
void IIR_f32_init(IIR_f32_Handle hndIIR_f32) | IIR initialization (zeros out delay line)
|
||||
|
||||
* The delay line buffer must be 2*(n_biquads * n_delay_elements_per_biquad), since there are 4 delay elements per biquad that are single precision
|
||||
(32-bits) we require a total of 8 * n_biquads words
|
||||
* In the code example the buffer is assigned to the .ebss section while the coefficients are assigned to the .econst section.
|
||||
|
||||
---
|
||||
|
||||
IIR 64-bit Functions | Description
|
||||
---|---
|
||||
void IIR_f64_setCoefficientsAPtr(IIR_f64_Handle fh, const float64_t *pca) | Set denominator coefficients pointer
|
||||
float64_t * IIR_f64_getCoefficientsAPtr(IIR_f64_Handle fh) | Get denominator coefficients pointer
|
||||
void IIR_f64_setCoefficientsBPtr(IIR_f64_Handle fh, const float64_t *pcb) | Set numerator coefficients pointer
|
||||
float64_t * IIR_f64_getCoefficientsBPtr(IIR_f64_Handle fh) | Get numerator coefficients pointer
|
||||
void IIR_f64_setDelayLinePtr(IIR_f64_Handle fh, const float64_t *pdl) | Set delay line pointer
|
||||
float64_t * IIR_f64_getDelayLinePtr(IIR_f64_Handle fh) | Get delay line pointer
|
||||
void IIR_f64_setInputPtr(IIR_f64_Handle fh, const float64_t *pi) | Set input pointer
|
||||
float64_t * IIR_f64_getInputPtr(IIR_f64_Handle fh) | Get input pointer
|
||||
void IIR_f64_setOutputPtr(IIR_f64_Handle fh, const float64_t *po) | Set output pointer
|
||||
float64_t * IIR_f64_getOutputPtr(IIR_f64_Handle fh) | Get output pointer
|
||||
void IIR_f64_setScalePtr(IIR_f64_Handle fh, const float64_t *psv) | Set scale value pointer
|
||||
float64_t * IIR_f64_getScalePtr(IIR_f64_Handle fh) | Get scale value pointer
|
||||
void IIR_f64_setOrder(IIR_f64_Handle fh, const uint16_t order) | Set filter order
|
||||
uint16_t IIR_f64_getOrder(IIR_f64_Handle fh) | Get filter order
|
||||
void IIR_f64_setInitFunction(IIR_f64_Handle fh, const v_pfn_v pfn) | Set initialization function
|
||||
v_pfn_v IIR_f64_getInitFunction(IIR_f64_Handle fh) | Get initialization function
|
||||
void IIR_f64_setCalcFunction(IIR_f64_Handle fh, const v_pfn_v pfn) | Set calculation function
|
||||
v_pfn_v IIR_f64_getCalcFunction(IIR_f64_Handle fh) | Get calculation function
|
||||
void IIR_f64_calc(IIR_f64_Handle hndIIR_f64) | IIR calculation
|
||||
void IIR_f64_init(IIR_f64_Handle hndIIR_f64) | IIR initialization (zeros out delay line)
|
||||
|
||||
* The delay line buffer must be 4*(n_biquads * n_delay_elements_per_biquad), since there are 4 delay elements per biquad that are double precision
|
||||
(64-bits) we require a total of 16 * n_biquads words
|
||||
* In the code example the buffer is assigned to the .ebss section while the coefficients are assigned to the .econst section.
|
||||
`
|
||||
|
||||
let FIR_F32_FUNCTIONS_FLOAT = [
|
||||
{name: "FIR_f32_setCoefficientsPtr", longDescription: "void FIR_f32_setCoefficientsPtr(FIR_f32_Handle fh, const float *pc)"},
|
||||
{name: "FIR_f32_getCoefficientsPtr", longDescription: "float * FIR_f32_getCoefficientsPtr(FIR_f32_Handle fh)"},
|
||||
{name: "FIR_f32_setDelayLinePtr", longDescription: "void FIR_f32_setDelayLinePtr(FIR_f32_Handle fh, const float *pdl)"},
|
||||
{name: "FIR_f32_getDelayLinePtr", longDescription: "float * FIR_f32_getDelayLinePtr(FIR_f32_Handle fh)"},
|
||||
{name: "FIR_f32_setInput", longDescription: "void FIR_f32_setInput(FIR_f32_Handle fh, const float in)"},
|
||||
{name: "FIR_f32_getInput", longDescription: "float FIR_f32_getInput(FIR_f32_Handle fh)"},
|
||||
{name: "FIR_f32_setOutput", longDescription: "void FIR_f32_setOutput(FIR_f32_Handle fh, const float out)"},
|
||||
{name: "FIR_f32_getOutput", longDescription: "float FIR_f32_getOutput(FIR_f32_Handle fh)"},
|
||||
{name: "FIR_f32_setOrder", longDescription: "void FIR_f32_setOrder(FIR_f32_Handle fh, const uint16_t order)"},
|
||||
{name: "FIR_f32_getOrder", longDescription: "uint16_t FIR_f32_getOrder(FIR_f32_Handle fh)"},
|
||||
{name: "FIR_f32_setInitFunction", longDescription: "void FIR_f32_setInitFunction(FIR_f32_Handle fh, const v_pfn_v pfn)"},
|
||||
{name: "FIR_f32_getInitFunction", longDescription: "v_pfn_v FIR_f32_getInitFunction(FIR_f32_Handle fh)"},
|
||||
{name: "FIR_f32_setCalcFunction", longDescription: "void FIR_f32_setCalcFunction(FIR_f32_Handle fh, const v_pfn_v pfn)"},
|
||||
{name: "FIR_f32_getCalcFunction", longDescription: "v_pfn_v FIR_f32_getCalcFunction(FIR_f32_Handle fh)"},
|
||||
{name: "FIR_f32_calc", longDescription: "void FIR_f32_calc(FIR_f32_Handle hndFIR_f32)"},
|
||||
{name: "FIR_f32_init", longDescription: "void FIR_f32_init(FIR_f32_Handle hndFIR_f32)"}
|
||||
]
|
||||
let FIR_F64_FUNCTIONS_FLOAT = [
|
||||
{name: "FIR_f64_setCoefficientsPtr", longDescription: "void FIR_f64_setCoefficientsPtr(FIR_f64_Handle fh, const float64_t *pc)"},
|
||||
{name: "FIR_f64_getCoefficientsPtr", longDescription: "float64_t * FIR_f64_getCoefficientsPtr(FIR_f64_Handle fh)"},
|
||||
{name: "FIR_f64_setDelayLinePtr", longDescription: "void FIR_f64_setDelayLinePtr(FIR_f64_Handle fh, const float64_t *pdl)"},
|
||||
{name: "FIR_f64_getDelayLinePtr", longDescription: "float64_t * FIR_f64_getDelayLinePtr(FIR_f64_Handle fh)"},
|
||||
{name: "FIR_f64_setInputPtr", longDescription: "void FIR_f64_setInputPtr(FIR_f64_Handle fh, const float64_t *pi)"},
|
||||
{name: "FIR_f64_getInputPtr", longDescription: "float64_t * FIR_f64_getInputPtr(FIR_f64_Handle fh)"},
|
||||
{name: "FIR_f64_setOutputPtr", longDescription: "void FIR_f64_setOutputPtr(FIR_f64_Handle fh, const float64_t *po)"},
|
||||
{name: "FIR_f64_getOutputPtr", longDescription: "float64_t * FIR_f64_getOutputPtr(FIR_f64_Handle fh)"},
|
||||
{name: "FIR_f64_setOrder", longDescription: "void FIR_f64_setOrder(FIR_f64_Handle fh, const uint16_t order)"},
|
||||
{name: "FIR_f64_getOrder", longDescription: "uint16_t FIR_f64_getOrder(FIR_f64_Handle fh)"},
|
||||
{name: "FIR_f64_setInitFunction", longDescription: "void FIR_f64_setInitFunction(FIR_f64_Handle fh, const v_pfn_v pfn)"},
|
||||
{name: "FIR_f64_getInitFunction", longDescription: "v_pfn_v FIR_f64_getInitFunction(FIR_f64_Handle fh)"},
|
||||
{name: "FIR_f64_setCalcFunction", longDescription: "void FIR_f64_setCalcFunction(FIR_f64_Handle fh, const v_pfn_v pfn)"},
|
||||
{name: "FIR_f64_getCalcFunction", longDescription: "v_pfn_v FIR_f64_getCalcFunction(FIR_f64_Handle fh)"},
|
||||
{name: "FIR_f64_calc", longDescription: "void FIR_f64_calc(FIR_f64_Handle hndFIR_f64)"},
|
||||
{name: "FIR_f64_init", longDescription: "void FIR_f64_init(FIR_f64_Handle hndFIR_f64)"}
|
||||
]
|
||||
let IIR_F32_FUNCTIONS_FLOAT = [
|
||||
{name: "IIR_f32_setCoefficientsAPtr", longDescription: "void IIR_f32_setCoefficientsAPtr(IIR_f32_Handle fh, const float *pca)"},
|
||||
{name: "IIR_f32_getCoefficientsAPtr", longDescription: "float * IIR_f32_getCoefficientsAPtr(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_setCoefficientsBPtr", longDescription: "void IIR_f32_setCoefficientsBPtr(IIR_f32_Handle fh, const float *pcb)"},
|
||||
{name: "IIR_f32_getCoefficientsBPtr", longDescription: "float * IIR_f32_getCoefficientsBPtr(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_setDelayLinePtr", longDescription: "void IIR_f32_setDelayLinePtr(IIR_f32_Handle fh, const float *pdl)"},
|
||||
{name: "IIR_f32_getDelayLinePtr", longDescription: "float * IIR_f32_getDelayLinePtr(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_setInputPtr", longDescription: "void IIR_f32_setInputPtr(IIR_f32_Handle fh, const float *pi)"},
|
||||
{name: "IIR_f32_getInputPtr", longDescription: "float * IIR_f32_getInputPtr(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_setOutputPtr", longDescription: "void IIR_f32_setOutputPtr(IIR_f32_Handle fh, const float *po)"},
|
||||
{name: "IIR_f32_getOutputPtr", longDescription: "float * IIR_f32_getOutputPtr(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_setScalePtr", longDescription: "void IIR_f32_setScalePtr(IIR_f32_Handle fh, const float *psv)"},
|
||||
{name: "IIR_f32_getScalePtr", longDescription: "float * IIR_f32_getScalePtr(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_setOrder", longDescription: "void IIR_f32_setOrder(IIR_f32_Handle fh, const uint16_t order)"},
|
||||
{name: "IIR_f32_getOrder", longDescription: "uint16_t IIR_f32_getOrder(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_setInitFunction", longDescription: "void IIR_f32_setInitFunction(IIR_f32_Handle fh, const v_pfn_v pfn)"},
|
||||
{name: "IIR_f32_getInitFunction", longDescription: "v_pfn_v IIR_f32_getInitFunction(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_setCalcFunction", longDescription: "void IIR_f32_setCalcFunction(IIR_f32_Handle fh, const v_pfn_v pfn)"},
|
||||
{name: "IIR_f32_getCalcFunction", longDescription: "v_pfn_v IIR_f32_getCalcFunction(IIR_f32_Handle fh)"},
|
||||
{name: "IIR_f32_calc", longDescription: "void IIR_f32_calc(IIR_f32_Handle hndIIR_f32)"},
|
||||
{name: "IIR_f32_init", longDescription: "void IIR_f32_init(IIR_f32_Handle hndIIR_f32)"}
|
||||
]
|
||||
let IIR_F64_FUNCTIONS_FLOAT = [
|
||||
{name: "IIR_f64_setCoefficientsAPtr", longDescription: "void IIR_f64_setCoefficientsAPtr(IIR_f64_Handle fh, const float64_t *pca)"},
|
||||
{name: "IIR_f64_getCoefficientsAPtr", longDescription: "float64_t * IIR_f64_getCoefficientsAPtr(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_setCoefficientsBPtr", longDescription: "void IIR_f64_setCoefficientsBPtr(IIR_f64_Handle fh, const float64_t *pcb)"},
|
||||
{name: "IIR_f64_getCoefficientsBPtr", longDescription: "float64_t * IIR_f64_getCoefficientsBPtr(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_setDelayLinePtr", longDescription: "void IIR_f64_setDelayLinePtr(IIR_f64_Handle fh, const float64_t *pdl)"},
|
||||
{name: "IIR_f64_getDelayLinePtr", longDescription: "float64_t * IIR_f64_getDelayLinePtr(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_setInputPtr", longDescription: "void IIR_f64_setInputPtr(IIR_f64_Handle fh, const float64_t *pi)"},
|
||||
{name: "IIR_f64_getInputPtr", longDescription: "float64_t * IIR_f64_getInputPtr(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_setOutputPtr", longDescription: "void IIR_f64_setOutputPtr(IIR_f64_Handle fh, const float64_t *po)"},
|
||||
{name: "IIR_f64_getOutputPtr", longDescription: "float64_t * IIR_f64_getOutputPtr(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_setScalePtr", longDescription: "void IIR_f64_setScalePtr(IIR_f64_Handle fh, const float64_t *psv)"},
|
||||
{name: "IIR_f64_getScalePtr", longDescription: "float64_t * IIR_f64_getScalePtr(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_setOrder", longDescription: "void IIR_f64_setOrder(IIR_f64_Handle fh, const uint16_t order)"},
|
||||
{name: "IIR_f64_getOrder", longDescription: "uint16_t IIR_f64_getOrder(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_setInitFunction", longDescription: "void IIR_f64_setInitFunction(IIR_f64_Handle fh, const v_pfn_v pfn)"},
|
||||
{name: "IIR_f64_getInitFunction", longDescription: "v_pfn_v IIR_f64_getInitFunction(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_setCalcFunction", longDescription: "void IIR_f64_setCalcFunction(IIR_f64_Handle fh, const v_pfn_v pfn)"},
|
||||
{name: "IIR_f64_getCalcFunction", longDescription: "v_pfn_v IIR_f64_getCalcFunction(IIR_f64_Handle fh)"},
|
||||
{name: "IIR_f64_calc", longDescription: "void IIR_f64_calc(IIR_f64_Handle hndIIR_f64)"},
|
||||
{name: "IIR_f64_init", longDescription: "void IIR_f64_init(IIR_f64_Handle hndIIR_f64)"}
|
||||
]
|
||||
|
||||
let FPU_TYPE;
|
||||
if((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x"))
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
|
||||
var moduleStatic = {
|
||||
name: "fpu",
|
||||
displayName: "FPU/TMU Global Settings",
|
||||
config: []
|
||||
}
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
description : "Choose FPU32 or FPU64 Configuration",
|
||||
default : FPU_TYPE[0].name,
|
||||
options : FPU_TYPE
|
||||
}
|
||||
]
|
||||
|
||||
function onValidate(inst, validation){
|
||||
var fpuMod = system.modules["/libraries/math/FPU/FPU.js"];
|
||||
if(fpuMod)
|
||||
{
|
||||
if(fpuMod.$static.fpuType != inst.fpuType)
|
||||
{
|
||||
validation.logError(system.getReference(fpuMod.$static, "fpuType") + " must be the same across modules.", inst, "fpuType");
|
||||
}
|
||||
}
|
||||
}
|
||||
function filterHardware(component)
|
||||
{
|
||||
return (Common.typeMatches(component.type, ["FPUfastRTS"]));
|
||||
}
|
||||
var filterModule = {
|
||||
c2000wareLibraryName: "FILTER",
|
||||
displayName: "FIR/IIR Filter",
|
||||
defaultInstanceName: "myFILTER",
|
||||
description: "FIR and IIR Filters",
|
||||
longDescription: longDescription,
|
||||
maxInstances : 1,
|
||||
filterHardware : filterHardware,
|
||||
config: config,
|
||||
moduleInstances : (inst) => {
|
||||
var fftInst = [];
|
||||
|
||||
fftInst.push({
|
||||
displayName: "FIR Configurations",
|
||||
name: "FIR",
|
||||
description: "",
|
||||
useArray : true,
|
||||
moduleName: "/libraries/dsp/FPU/Filter/FIR.js",
|
||||
requiredArgs: {
|
||||
fpuType: inst.fpuType
|
||||
}
|
||||
});
|
||||
fftInst.push({
|
||||
displayName: "IIR Configurations",
|
||||
name: "IIR",
|
||||
description: "",
|
||||
useArray : true,
|
||||
moduleName: "/libraries/dsp/FPU/Filter/IIR.js",
|
||||
requiredArgs: {
|
||||
fpuType: inst.fpuType
|
||||
}
|
||||
});
|
||||
return (fftInst);
|
||||
},
|
||||
modules: Common.autoForce("fpu", "/libraries/.meta/math/FPU/FPU.js"),
|
||||
templates: {
|
||||
c2000ware_libraries_h : "/libraries/dsp/FPU/Filter/templates/filter.c2000ware_libraries.h.xdt",
|
||||
c2000ware_libraries_c : "/libraries/dsp/FPU/Filter/templates/filter.c2000ware_libraries.c.xdt",
|
||||
c2000ware_libraries_opt : "/libraries/dsp/FPU/Filter/templates/filter.c2000ware_libraries.opt.xdt",
|
||||
c2000ware_libraries_cmd_genlibs : "/libraries/dsp/FPU/Filter/templates/filter.c2000ware_libraries.cmd.genlibs.xdt",
|
||||
},
|
||||
validate : onValidate
|
||||
};
|
||||
exports = filterModule;
|
||||
@@ -0,0 +1,96 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
|
||||
let FPU_TYPE;
|
||||
if((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x"))
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "$name",
|
||||
hidden : false
|
||||
},
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
description : "Choose FPU32 or FPU64 Configuration",
|
||||
default : FPU_TYPE[0].name
|
||||
},
|
||||
{
|
||||
name : "coeffPtrA",
|
||||
displayName : "Denominator Coefficients Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "coeffPtrB",
|
||||
displayName : "Numerator Coefficients Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "dBuffPtr",
|
||||
displayName : "Delay Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "inPtr",
|
||||
displayName : "Input Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "outPtr",
|
||||
displayName : "Output Buffer Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "scalePtr",
|
||||
displayName : "Biquad Scale Pointer",
|
||||
default : ""
|
||||
},
|
||||
{
|
||||
name : "filterOrder",
|
||||
displayName : "Order of FIR filter",
|
||||
description : "Number of Taps = Order + 1",
|
||||
longDescription : "Number of Taps = Order + 1",
|
||||
default : 1
|
||||
},
|
||||
]
|
||||
|
||||
function onValidate(inst, validation)
|
||||
{
|
||||
if((inst.filterOrder > 65535) || (inst.filterOrder < 0))
|
||||
{
|
||||
validation.logError("Filter order must be within range of uint16_t", inst, "filterOrder");
|
||||
}
|
||||
if((inst.coeffPtrA == "") || (inst.coeffPtrB == "") || (inst.dBuffPtr == "") || (inst.inPtr == "") || (inst.outPtr == "") || (inst.scalePtr == ""))
|
||||
{
|
||||
validation.logError("All pointers must point to valid arrays", inst);
|
||||
}
|
||||
if((inst.coeffPtrA == inst.coeffPtrB) || (inst.coeffPtrA == inst.dBuffPtr) || (inst.coeffPtrA == inst.inPtr) || (inst.coeffPtrA == inst.outPtr) ||
|
||||
(inst.coeffPtrA == inst.scalePtr) || (inst.coeffPtrB == inst.dBuffPtr) || (inst.coeffPtrB == inst.inPtr) || (inst.coeffPtrB == inst.outPtr) ||
|
||||
(inst.coeffPtrB == inst.scalePtr) || (inst.dBuffPtr == inst.inPtr) || (inst.dBuffPtr == inst.outPtr) || (inst.dBuffPtr == inst.scalePtr) ||
|
||||
(inst.inPtr == inst.outPtr) || (inst.inPtr == inst.scalePtr) || (inst.outPtr == inst.scalePtr))
|
||||
{
|
||||
validation.logError("No duplicate names allowed within FFT object", inst);
|
||||
}
|
||||
}
|
||||
|
||||
var iirModule = {
|
||||
c2000wareLibraryName: "IIR",
|
||||
displayName: "IIR",
|
||||
defaultInstanceName: "myIIR",
|
||||
description: "Infinite Impulse Response",
|
||||
config: config,
|
||||
validate : onValidate
|
||||
}
|
||||
exports = iirModule;
|
||||
@@ -0,0 +1,131 @@
|
||||
%//Auto set phase function for CFFT64/RFFT64
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var currnetSDKProductPath = system.getProducts()[0].path
|
||||
% var sdkPath = system.utils.path.join(currnetSDKProductPath + "../../../")
|
||||
% sdkPath = sdkPath.replace(new RegExp('\\' + system.utils.path.sep, 'g'), '/')
|
||||
%
|
||||
% var moduleName = "Filter"
|
||||
% var module = system.modules['/libraries/dsp/FPU/Filter' + '/' + moduleName + '.js'];
|
||||
%
|
||||
% var moduleNameFIR = "FIR"
|
||||
% var moduleFIR = system.modules['/libraries/dsp/FPU/Filter' + '/' + moduleNameFIR + '.js'];
|
||||
% var moduleNameIIR = "IIR"
|
||||
% var moduleIIR = system.modules['/libraries/dsp/FPU/Filter' + '/' + moduleNameIIR + '.js'];
|
||||
%
|
||||
void FILTER_init()
|
||||
{
|
||||
%if(moduleFIR != null)
|
||||
%{
|
||||
% var instancesFIR = moduleFIR.$instances;
|
||||
%for(let i = 0; i < instancesFIR.length; i++)
|
||||
%{
|
||||
`instancesFIR[i].$name`_init();
|
||||
%}
|
||||
%}
|
||||
%if(moduleIIR != null)
|
||||
%{
|
||||
% var instancesIIR = moduleIIR.$instances;
|
||||
%for(let i = 0; i < instancesIIR.length; i++)
|
||||
%{
|
||||
`instancesIIR[i].$name`_init();
|
||||
%}
|
||||
%}
|
||||
}
|
||||
|
||||
%if(module != null)
|
||||
%{
|
||||
% var instance = module.$instances[0];
|
||||
%
|
||||
%if(moduleFIR != null)
|
||||
%{
|
||||
% var instancesFIR = moduleFIR.$instances;
|
||||
%
|
||||
%for(let i = 0; i < instancesFIR.length; i++)
|
||||
%{
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
FIR_f32 `instancesFIR[i].$name`_obj;
|
||||
FIR_f32_Handle `instancesFIR[i].$name`_handle = &`instancesFIR[i].$name`_obj;
|
||||
|
||||
void `instancesFIR[i].$name`_init()
|
||||
{
|
||||
FIR_f32_setCoefficientsPtr(`instancesFIR[i].$name`_handle, `instancesFIR[i].coeffPtr`);
|
||||
FIR_f32_setDelayLinePtr(`instancesFIR[i].$name`_handle, `instancesFIR[i].dBuffPtr`);
|
||||
FIR_f32_setOrder(`instancesFIR[i].$name`_handle, `instancesFIR[i].$name`_FIR_ORDER);
|
||||
FIR_f32_setInitFunction(`instancesFIR[i].$name`_handle, (v_pfn_v)FIR_f32_init);
|
||||
FIR_f32_setCalcFunction(`instancesFIR[i].$name`_handle, (v_pfn_v)FIR_f32_calc);
|
||||
|
||||
`instancesFIR[i].$name`_handle->init(`instancesFIR[i].$name`_handle);
|
||||
}
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
FIR_f64 `instancesFIR[i].$name`_obj;
|
||||
FIR_f64_Handle `instancesFIR[i].$name`_handle = &`instancesFIR[i].$name`_obj;
|
||||
|
||||
void `instancesFIR[i].$name`_init()
|
||||
{
|
||||
FIR_f64_setCoefficientsPtr(`instancesFIR[i].$name`_handle, `instancesFIR[i].coeffPtr`);
|
||||
FIR_f64_setDelayLinePtr(`instancesFIR[i].$name`_handle, `instancesFIR[i].dBuffPtr`);
|
||||
FIR_f64_setInputPtr(`instancesFIR[i].$name`_handle, `instancesFIR[i].inPtr`);
|
||||
FIR_f64_setOutputPtr(`instancesFIR[i].$name`_handle, `instancesFIR[i].outPtr`);
|
||||
FIR_f64_setOrder(`instancesFIR[i].$name`_handle, `instancesFIR[i].$name`_FIR_ORDER);
|
||||
FIR_f64_setInitFunction(`instancesFIR[i].$name`_handle, (v_pfn_v)FIR_f64_init);
|
||||
FIR_f64_setCalcFunction(`instancesFIR[i].$name`_handle, (v_pfn_v)FIR_f64_calc);
|
||||
|
||||
`instancesFIR[i].$name`_handle->init(`instancesFIR[i].$name`_handle);
|
||||
}
|
||||
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
%if(moduleIIR != null)
|
||||
%{
|
||||
% var instancesIIR = moduleIIR.$instances;
|
||||
%
|
||||
%for(let i = 0; i < instancesIIR.length; i++)
|
||||
%{
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
IIR_f32 `instancesIIR[i].$name`_obj;
|
||||
IIR_f32_Handle `instancesIIR[i].$name`_handle = &`instancesIIR[i].$name`_obj;
|
||||
|
||||
void `instancesIIR[i].$name`_init()
|
||||
{
|
||||
IIR_f32_setCoefficientsAPtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].coeffPtrA`);
|
||||
IIR_f32_setCoefficientsBPtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].coeffPtrB`);
|
||||
IIR_f32_setDelayLinePtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].dBuffPtr`);
|
||||
IIR_f32_setInputPtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].inPtr`);
|
||||
IIR_f32_setOutputPtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].outPtr`);
|
||||
IIR_f32_setScalePtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].scalePtr`);
|
||||
IIR_f32_setOrder(`instancesIIR[i].$name`_handle, `instancesIIR[i].$name`_IIR_ORDER);
|
||||
IIR_f32_setInitFunction(`instancesIIR[i].$name`_handle, (v_pfn_v)IIR_f32_init);
|
||||
IIR_f32_setCalcFunction(`instancesIIR[i].$name`_handle, (v_pfn_v)IIR_f32_calc);
|
||||
|
||||
`instancesIIR[i].$name`_handle->init(`instancesIIR[i].$name`_handle);
|
||||
}
|
||||
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
IIR_f64 `instancesIIR[i].$name`_obj;
|
||||
IIR_f64_Handle `instancesIIR[i].$name`_handle = &`instancesIIR[i].$name`_obj;
|
||||
|
||||
void `instancesIIR[i].$name`_init()
|
||||
{
|
||||
IIR_f64_setCoefficientsAPtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].coeffPtrA`);
|
||||
IIR_f64_setCoefficientsBPtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].coeffPtrB`);
|
||||
IIR_f64_setDelayLinePtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].dBuffPtr`);
|
||||
IIR_f64_setInputPtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].inPtr`);
|
||||
IIR_f64_setOutputPtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].outPtr`);
|
||||
IIR_f64_setScalePtr(`instancesIIR[i].$name`_handle, `instancesIIR[i].scalePtr`);
|
||||
IIR_f64_setOrder(`instancesIIR[i].$name`_handle, `instancesIIR[i].$name`_IIR_ORDER);
|
||||
IIR_f64_setInitFunction(`instancesIIR[i].$name`_handle, (v_pfn_v)IIR_f64_init);
|
||||
IIR_f64_setCalcFunction(`instancesIIR[i].$name`_handle, (v_pfn_v)IIR_f64_calc);
|
||||
|
||||
`instancesIIR[i].$name`_handle->init(`instancesIIR[i].$name`_handle);
|
||||
}
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,23 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var moduleNameFFT = "FFT"
|
||||
% var moduleFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameFFT + '.js'];
|
||||
% var moduleNameFILTER = "Filter"
|
||||
% var moduleFILTER = system.modules['/libraries/dsp/FPU/Filter' + '/' + moduleNameFILTER + '.js'];
|
||||
% var moduleNameVec = "Vector"
|
||||
% var moduleVec = system.modules['/libraries/dsp/FPU/Vector' + '/' + moduleNameVec + '.js'];
|
||||
%
|
||||
%if((moduleFFT == null) && (moduleVec == null))
|
||||
%{
|
||||
%if(moduleFILTER != null)
|
||||
%{
|
||||
% var instance = moduleFILTER.$instances[0];
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
-l"libraries/dsp/FPU/c28/lib/c28x_fpu_dsp_library.lib"
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
-l"libraries/dsp/FPU/c28/lib/c28x_fpu64_dsp_library.lib"
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,86 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var currnetSDKProductPath = system.getProducts()[0].path
|
||||
% var sdkPath = system.utils.path.join(currnetSDKProductPath + "../../../")
|
||||
% sdkPath = sdkPath.replace(new RegExp('\\' + system.utils.path.sep, 'g'), '/')
|
||||
%
|
||||
% var moduleName = "Filter"
|
||||
% var module = system.modules['/libraries/dsp/FPU/Filter/' + moduleName + '.js'];
|
||||
%
|
||||
#include <dsp.h>
|
||||
%if(module != null)
|
||||
%{
|
||||
% var moduleNameFIR = "FIR"
|
||||
% var moduleFIR = system.modules['/libraries/dsp/FPU/Filter/' + moduleNameFIR + '.js'];
|
||||
% var moduleNameIIR = "IIR"
|
||||
% var moduleIIR = system.modules['/libraries/dsp/FPU/Filter/' + moduleNameIIR + '.js'];
|
||||
%
|
||||
% var instance = module.$instances[0];
|
||||
% if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
#include <fpu32/fpu_filter.h>
|
||||
#include <fpu32/fpu_rfft.h>
|
||||
|
||||
%}
|
||||
% else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
#include <fpu64/filter.h>
|
||||
|
||||
%}
|
||||
%
|
||||
%if(moduleFIR != null)
|
||||
%{
|
||||
% var instancesFIR = moduleFIR.$instances;
|
||||
%for(let i = 0; i < instancesFIR.length; i++)
|
||||
%{
|
||||
#define `instancesFIR[i].$name`_FIR_ORDER `instancesFIR[i].filterOrder`
|
||||
% if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
extern FIR_f32_Handle `instancesFIR[i].$name`_handle;
|
||||
extern float32_t *`instancesFIR[i].coeffPtr`;
|
||||
extern float32_t *`instancesFIR[i].dBuffPtr`;
|
||||
%}
|
||||
% else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
extern FIR_f64_Handle `instancesFIR[i].$name`_handle;
|
||||
extern float64_t *`instancesFIR[i].coeffPtr`;
|
||||
extern float64_t *`instancesFIR[i].dBuffPtr`;
|
||||
extern float64_t *`instancesFIR[i].inPtr`;
|
||||
extern float64_t *`instancesFIR[i].outPtr`;
|
||||
%}
|
||||
|
||||
void `instancesFIR[i].$name`_init();
|
||||
%}
|
||||
|
||||
%}
|
||||
%
|
||||
%if(moduleIIR != null)
|
||||
%{
|
||||
% var instancesIIR = moduleIIR.$instances;
|
||||
%for(let i = 0; i < instancesIIR.length; i++)
|
||||
%{
|
||||
#define `instancesIIR[i].$name`_IIR_ORDER `instancesIIR[i].filterOrder`
|
||||
% if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
extern IIR_f32_Handle `instancesIIR[i].$name`_handle;
|
||||
extern float32_t *`instancesIIR[i].coeffPtrA`;
|
||||
extern float32_t *`instancesIIR[i].coeffPtrB`;
|
||||
extern float32_t *`instancesIIR[i].dBuffPtr`;
|
||||
extern float32_t *`instancesIIR[i].inPtr`;
|
||||
extern float32_t *`instancesIIR[i].outPtr`;
|
||||
extern float32_t *`instancesIIR[i].scalePtr`;
|
||||
%}
|
||||
% else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
extern IIR_f64_Handle `instancesIIR[i].$name`_handle;
|
||||
extern float64_t *`instancesIIR[i].coeffPtrA`;
|
||||
extern float64_t *`instancesIIR[i].coeffPtrB`;
|
||||
extern float64_t *`instancesIIR[i].dBuffPtr`;
|
||||
extern float64_t *`instancesIIR[i].inPtr`;
|
||||
extern float64_t *`instancesIIR[i].outPtr`;
|
||||
extern float64_t *`instancesIIR[i].scalePtr`;
|
||||
%}
|
||||
|
||||
void `instancesIIR[i].$name`_init();
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,17 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var c2000warePath = Common.getC2000WarePath()
|
||||
%
|
||||
% var moduleNameFFT = "FFT"
|
||||
% var moduleFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameFFT + '.js'];
|
||||
% var moduleNameFILTER = "Filter"
|
||||
% var moduleFILTER = system.modules['/libraries/dsp/FPU/Filter' + '/' + moduleNameFILTER + '.js'];
|
||||
% var moduleNameVec = "Vector"
|
||||
% var moduleVec = system.modules['/libraries/dsp/FPU/Vector' + '/' + moduleNameVec + '.js'];
|
||||
%
|
||||
%if((moduleFFT == null) && (moduleVec == null))
|
||||
%{
|
||||
%if(moduleFILTER != null)
|
||||
%{
|
||||
-I"`c2000warePath`libraries/dsp/FPU/c28/include"
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,543 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
|
||||
let longDescription = ``
|
||||
let VEC_FPU32 = [
|
||||
{name: "Absolute Value of a Complex Vector", displayName: "Complex Vector", description: "void abs_SP_CV(float *y, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Absolute Value of an Even Length Complex Vector", displayName: "Even Length Complex Vector", description: "void abs_SP_CV_2(float *y, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Absolute Value of a Complex Vector (TMU0)", displayName: "Complex Vector (TMU0)", description: "void abs_SP_CV_TMU0(float *y, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Addition (Element-Wise) of a Complex Scalar to a Complex Vector", displayName: "(Element-Wise) Complex Scalar to a Complex Vector", description: "void add_SP_CSxCV(complex_float *y, const complex_float *x, const complex_float c, const uint16_t N)", longDescription: ``},
|
||||
{name: "Addition of Two Complex Vectors", displayName: "Two Complex Vectors", description: "void add_SP_CVxCV(complex_float *y, const complex_float *w, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Inverse Absolute Value of a Complex Vector", displayName: "Complex Vector", description: "void iabs_SP_CV(float *y, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Inverse Absolute Value of an Even Length Complex Vector", displayName: "Even Length Complex Vector", description: "void iabs_SP_CV_2(float *y, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Inverse Absolute Value of a Complex Vector (TMU0)", displayName: "Complex Vector (TMU0)", description: "void iabs_SP_CV_TMU0(float *y, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiply-and-Accumulate of a Complex Vector and a Complex Vector", displayName: "Complex Vector and a Complex Vector", description: "complex_float mac_SP_CVxCV(const complex_float *w, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiply-and-Accumulate of a Real Vector and a Complex Vector", displayName: "Real Vector and a Complex Vector", description: "complex_float mac_SP_RVxCV(const complex_float *w, const float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiply-and-Accumulate of a 16-bit Integer Real Vector and a Floating Point Complex Vector", displayName: "16-bit Integer Real Vector and a Floating Point Complex Vector", description: "complex_float mac_SP_i16RVxCV(const complex_float *w, const int16_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Median of a Real Valued Array of Floats (Preserved Inputs)", displayName: "Real Valued Array of Floats (Preserved Inputs)", description: "float median_noreorder_SP_RV(const float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Median of a Real Array of floats", displayName: "Real Array of floats", description: "float median_SP_RV(float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Complex Multiply of Two Floating Point Numbers", displayName: "(Complex) Two Floating Point Numbers", description: "complex_float mpy_SP_CSxCS(const complex_float w, const complex_float x)", longDescription: ``},
|
||||
{name: "Complex Multiply of Two Complex Vectors", displayName: "(Complex) Two Complex Vectors", description: "void mpy_SP_CVxCV(complex_float *y, const complex_float *w, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of a Complex Vector and the Complex Conjugate of Another Vector", displayName: "Complex Vector and the Complex Conjugate of Another Vector", description: "void mpy_SP_CVxCVC(complex_float *y, const complex_float *w, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of Two Real Matrices", displayName: "Two Real Matrices", description: "void mpy_SP_RMxRM(float *y, const float *w, const float *x, const uint16_t m, const uint16_t n, const uint16_t p)", longDescription: ``},
|
||||
{name: "Multiplication of Two Real Matrices (n Even)", displayName: "Two Real Matrices (n Even)", description: "void mpy_SP_RMxRM_2(float *y, const float *w, const float *x, const uint16_t m, const uint16_t n, const uint16_t p)", longDescription: ``},
|
||||
{name: "Multiplication of a Real Scalar and a Real Vector", displayName: "Real Scalar and a Real Vector", description: "void mpy_SP_RSxRV_2(float *y, const float *x, const float c, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of a Real Scalar, a Real Vector, and another Real Vector", displayName: "Real Scalar, a Real Vector, and another Real Vector", description: "void mpy_SP_RSxRVxRV_2(float *y, const float *w, const float *x, const float c, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of a Real Vector and a Complex Vector", displayName: "Real Vector and a Complex Vector", description: "void mpy_SP_RVxCV(complex_float *y, const complex_float *w, const float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of a Real Vector and a Real Vector", displayName: "Real Vector and a Real Vector", description: "void mpy_SP_RVxRV_2(float *y, const float *w, const float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Subtraction of a Complex Scalar from a Complex Vector", displayName: "Complex Scalar from a Complex Vector", description: "void sub_SP_CSxCV(complex_float *y, const complex_float *x, const complex_float c, const uint16_t N)", longDescription: ``},
|
||||
{name: "Subtraction of a Complex Vector and another Complex Vector", displayName: "Complex Vector and another Complex Vector", description: "void sub_SP_CVxCV(complex_float *y, const complex_float *w, const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Index of Maximum Value of an Even Length Real Array", displayName: "Index of Maximum Value of an Even Length Real Array", description: "uint16_t maxidx_SP_RV_2(const float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Mean of Real and Imaginary Parts of a Complex Vector", displayName: "Mean of Real and Imaginary Parts of a Complex Vector", description: "complex_float mean_SP_CV_2(const complex_float *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Optimized Memory Copy", displayName: "Optimized Memory Copy", description: "void memcpy_fast(void *dst, const void *src, const uint16_t N)", longDescription: ``},
|
||||
{name: "Optimized Memory Set", displayName: "Optimized Memory Set", description: "void memset_fast(void* dst, const int16_t value, const uint16_t N)", longDescription: ``},
|
||||
{name: "Sort an Array of Floats", displayName: "Sort an Array of Floats", description: "void qsort_SP_RV(void *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Rounding (Unbiased) of a Floating Point Scalar", displayName: "Rounding (Unbiased) of a Floating Point Scalar", description: "float rnd_SP_RS(const float x)", longDescription: ``},
|
||||
]
|
||||
let VEC_FPU64 = [
|
||||
{name: "Absolute Value of a Complex Vector (Double Precision)", displayName: "Complex Vector", description: "void abs_DP_CV(float64_t *y, const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Absolute Value of an Even Length Complex Vector (Double Precision)", displayName: "Even Length Complex Vector", description: "void abs_DP_CV_2(float64_t *y, const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Addition (Element-Wise) of a Complex Scalar to a Complex Vector (Double Precision)", displayName: "(Element-Wise) Complex Scalar to a Complex Vector", description: "void add_DP_CSxCV(complexf64_t *y, const complexf64_t *x, const complexf64_t *c, const uint16_t N)", longDescription: ``},
|
||||
{name: "Addition of Two Complex Vectors (Double Precision)", displayName: "Two Complex Vectors", description: "void add_DP_CVxCV(complexf64_t *y, const complexf64_t *w, const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Inverse Absolute Value of a Complex Vector (Double Precision)", displayName: "Complex Vector", description: "void iabs_DP_CV(float64_t *y, const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Inverse Absolute Value of an Even Length Complex Vector (Double Precision)", displayName: "Even Length Complex Vector", description: "void iabs_DP_CV_2(float64_t *y, const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiply-and-Accumulate of a Real Vector (Integer) and a Complex Vector (Double Precision)", displayName: "Real Vector (Integer) and a Complex Vector", description: "complexf64_t mac_DP_i16RVxCV(const complexf64_t *w, const int16_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiply-and-Accumulate of a Complex Vector and a Complex Vector (Double Precision)", displayName: "Complex Vector and a Complex Vector", description: "complexf64_t mac_DP_CVxCV(const complexf64_t *w, const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiply-and-Accumulate of a Real Vector and a Complex Vector (Double Precision)", displayName: "Real Vector and a Complex Vector", description: "complexf64_t mac_DP_RVxCV(const complexf64_t *w, const float64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Complex Multiply of Two Double Precision Numbers", displayName: "(Complex) Two Double Precision Numbers", description: "complexf64_t mpy_DP_CSxCS(const complexf64_t *w, const complexf64_t *x)", longDescription: ``},
|
||||
{name: "Complex Multiply of Two Complex Vectors (Double Precision)", displayName: "(Complex) Two Complex Vectors", description: "complexf64_t mpy_DP_CSxCS(const complexf64_t *w, const complexf64_t *x)", longDescription: ``},
|
||||
{name: "Multiplication of a Complex Vector and the Complex Conjugate of Another Vector (Double Precision)", displayName: "Complex Vector and the Complex Conjugate of Another Vector", description: "void mpy_DP_CVxCVC(complexf64_t *y, const complexf64_t *w, const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of Two Real Matrices (Double Precision)", displayName: "Two Real Matrices", description: "void mpy_DP_RMxRM(float64_t *y, const float64_t *w, const float64_t *x, const uint16_t m, const uint16_t n, const uint16_t p)", longDescription: ``},
|
||||
{name: "Multiplication of Two Real Matrices (n even, Double Precision)", displayName: "Two Real Matrices (n even)", description: "void mpy_DP_RMxRM_2(float64_t *y, const float64_t *w, const float64_t *x, const uint16_t m, const uint16_t n, const uint16_t p)", longDescription: ``},
|
||||
{name: "Multiplication of a Real scalar and a Real Vector (Double Precision)", displayName: "Real scalar and a Real Vector", description: "void mpy_DP_RSxRV_2(float64_t *y, const float64_t *x, const float64_t c, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of a Real Scalar, a Real Vector, and another Real Vector (Double Precision)", displayName: "Real Scalar, a Real Vector, and another Real Vector", description: "void mpy_DP_RSxRVxRV_2(float64_t *y, const float64_t *w, const float64_t *x, const float64_t c, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of a Real Vector and a Complex Vector (Double Precision)", displayName: "Real Vector and a Complex Vector", description: "void mpy_DP_RVxCV(complexf64_t *y, const complexf64_t *w, const float64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Multiplication of a Real Vector and a Real Vector", displayName: "Real Vector and a Real Vector", description: "void mpy_DP_RVxRV_2(float64_t *y, const float64_t *w, const float64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Subtraction of a Complex Scalar from a Complex Vector", displayName: "Complex Scalar from a Complex Vector", description: "void sub_DP_CSxCV(complexf64_t *y, const complexf64_t *x, const complexf64_t *c, const uint16_t N)", longDescription: ``},
|
||||
{name: "Subtraction of a Complex Vector and another Complex Vector (Double Precision)", displayName: "Complex Vector and another Complex Vector", description: "void sub_DP_CVxCV(complexf64_t *y, const complexf64_t *w, const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Index of Maximum Value of an Even Length Real Array (Double Precision)", displayName: "Index of Maximum Value of an Even Length Real Array", description: "uint16_t maxidx_DP_RV_2(const float64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Mean of Real and Imaginary Parts of a Complex Vector (Double Precision)", displayName: "Mean of Real and Imaginary Parts of a Complex Vector", description: "complexf64_t mean_DP_CV_2(const complexf64_t *x, const uint16_t N)", longDescription: ``},
|
||||
{name: "Rounding (Unbiased) of a Floating Point Scalar (Double Precision)", displayName: "Rounding (Unbiased) of a Floating Point Scalar", description: "float64_t rnd_DP_RS(const float64_t x)", longDescription: ``},
|
||||
]
|
||||
let FPU_TYPE;
|
||||
if((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x"))
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
var vec_configs_fpu32_abs = [];
|
||||
var vec_configs_fpu32_add = [];
|
||||
var vec_configs_fpu32_inv_abs = [];
|
||||
var vec_configs_fpu32_mac = [];
|
||||
var vec_configs_fpu32_med = [];
|
||||
var vec_configs_fpu32_mult = [];
|
||||
var vec_configs_fpu32_sub = [];
|
||||
var vec_configs_fpu32_misc = [];
|
||||
|
||||
var vec_configs_fpu64_abs = [];
|
||||
var vec_configs_fpu64_add = [];
|
||||
var vec_configs_fpu64_inv_abs = [];
|
||||
var vec_configs_fpu64_mac = [];
|
||||
var vec_configs_fpu64_mult = [];
|
||||
var vec_configs_fpu64_sub = [];
|
||||
var vec_configs_fpu64_misc = [];
|
||||
var moduleStatic = {
|
||||
name: "fpu",
|
||||
displayName: "FPU/TMU Global Settings",
|
||||
config: []
|
||||
}
|
||||
|
||||
for(let i = 0; i < 3; i++)
|
||||
{
|
||||
vec_configs_fpu32_abs = vec_configs_fpu32_abs.concat([
|
||||
{
|
||||
name: "VEC32_" + i,
|
||||
displayName : VEC_FPU32[i].displayName,
|
||||
hidden : false,
|
||||
default : VEC_FPU32[i].description,
|
||||
longDescription : VEC_FPU32[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 3; i < 5; i++)
|
||||
{
|
||||
vec_configs_fpu32_add = vec_configs_fpu32_add.concat([
|
||||
{
|
||||
name: "VEC32_" + i,
|
||||
displayName : VEC_FPU32[i].displayName,
|
||||
hidden : false,
|
||||
default : VEC_FPU32[i].description,
|
||||
longDescription : VEC_FPU32[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 5; i < 8; i++)
|
||||
{
|
||||
vec_configs_fpu32_inv_abs = vec_configs_fpu32_inv_abs.concat([
|
||||
{
|
||||
name: "VEC32_" + i,
|
||||
displayName : VEC_FPU32[i].displayName,
|
||||
hidden : false,
|
||||
default : VEC_FPU32[i].description,
|
||||
longDescription : VEC_FPU32[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 8; i < 11; i++)
|
||||
{
|
||||
vec_configs_fpu32_mac = vec_configs_fpu32_mac.concat([
|
||||
{
|
||||
name: "VEC32_" + i,
|
||||
displayName : VEC_FPU32[i].displayName,
|
||||
hidden : false,
|
||||
default : VEC_FPU32[i].description,
|
||||
longDescription : VEC_FPU32[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 11; i < 13; i++)
|
||||
{
|
||||
vec_configs_fpu32_med = vec_configs_fpu32_med.concat([
|
||||
{
|
||||
name: "VEC32_" + i,
|
||||
displayName : VEC_FPU32[i].displayName,
|
||||
hidden : false,
|
||||
default : VEC_FPU32[i].description,
|
||||
longDescription : VEC_FPU32[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 13; i < 22; i++)
|
||||
{
|
||||
vec_configs_fpu32_mult = vec_configs_fpu32_mult.concat([
|
||||
{
|
||||
name: "VEC32_" + i,
|
||||
displayName : VEC_FPU32[i].displayName,
|
||||
hidden : false,
|
||||
default : VEC_FPU32[i].description,
|
||||
longDescription : VEC_FPU32[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 22; i < 24; i++)
|
||||
{
|
||||
vec_configs_fpu32_sub = vec_configs_fpu32_sub.concat([
|
||||
{
|
||||
name: "VEC32_" + i,
|
||||
displayName : VEC_FPU32[i].displayName,
|
||||
hidden : false,
|
||||
default : VEC_FPU32[i].description,
|
||||
longDescription : VEC_FPU32[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 24; i < VEC_FPU32.length; i++)
|
||||
{
|
||||
vec_configs_fpu32_misc = vec_configs_fpu32_misc.concat([
|
||||
{
|
||||
name: "VEC32_" + i,
|
||||
displayName : VEC_FPU32[i].displayName,
|
||||
hidden : false,
|
||||
default : VEC_FPU32[i].description,
|
||||
longDescription : VEC_FPU32[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 0; i < 2; i++)
|
||||
{
|
||||
vec_configs_fpu64_abs = vec_configs_fpu64_abs.concat([
|
||||
{
|
||||
name: "VEC64_" + i,
|
||||
displayName : VEC_FPU64[i].displayName,
|
||||
hidden : true,
|
||||
default : VEC_FPU64[i].description,
|
||||
longDescription : VEC_FPU64[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 2; i < 4; i++)
|
||||
{
|
||||
vec_configs_fpu64_add = vec_configs_fpu64_add.concat([
|
||||
{
|
||||
name: "VEC64_" + i,
|
||||
displayName : VEC_FPU64[i].displayName,
|
||||
hidden : true,
|
||||
default : VEC_FPU64[i].description,
|
||||
longDescription : VEC_FPU64[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 4; i < 6; i++)
|
||||
{
|
||||
vec_configs_fpu64_inv_abs = vec_configs_fpu64_inv_abs.concat([
|
||||
{
|
||||
name: "VEC64_" + i,
|
||||
displayName : VEC_FPU64[i].displayName,
|
||||
hidden : true,
|
||||
default : VEC_FPU64[i].description,
|
||||
longDescription : VEC_FPU64[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 6; i < 9; i++)
|
||||
{
|
||||
vec_configs_fpu64_mac = vec_configs_fpu64_mac.concat([
|
||||
{
|
||||
name: "VEC64_" + i,
|
||||
displayName : VEC_FPU64[i].displayName,
|
||||
hidden : true,
|
||||
default : VEC_FPU64[i].description,
|
||||
longDescription : VEC_FPU64[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 9; i < 18; i++)
|
||||
{
|
||||
vec_configs_fpu64_mult = vec_configs_fpu64_mult.concat([
|
||||
{
|
||||
name: "VEC64_" + i,
|
||||
displayName : VEC_FPU64[i].displayName,
|
||||
hidden : true,
|
||||
default : VEC_FPU64[i].description,
|
||||
longDescription : VEC_FPU64[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 18; i < 20; i++)
|
||||
{
|
||||
vec_configs_fpu64_sub = vec_configs_fpu64_sub.concat([
|
||||
{
|
||||
name: "VEC64_" + i,
|
||||
displayName : VEC_FPU64[i].displayName,
|
||||
hidden : true,
|
||||
default : VEC_FPU64[i].description,
|
||||
longDescription : VEC_FPU64[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
for(let i = 20; i < VEC_FPU64.length; i++)
|
||||
{
|
||||
vec_configs_fpu64_misc = vec_configs_fpu64_misc.concat([
|
||||
{
|
||||
name: "VEC64_" + i,
|
||||
displayName : VEC_FPU64[i].displayName,
|
||||
hidden : true,
|
||||
default : VEC_FPU64[i].description,
|
||||
longDescription : VEC_FPU64[i].longDescription,
|
||||
readOnly : true
|
||||
},
|
||||
])
|
||||
}
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
default : FPU_TYPE[0].name,
|
||||
options : FPU_TYPE,
|
||||
onChange : onChangeFPU
|
||||
},
|
||||
{
|
||||
name : "fpu32Abs",
|
||||
displayName : "Absolute Value Vector Functions",
|
||||
config : vec_configs_fpu32_abs
|
||||
},
|
||||
{
|
||||
name : "fpu32Add",
|
||||
displayName : "Addition Vector Functions",
|
||||
config : vec_configs_fpu32_add
|
||||
},
|
||||
{
|
||||
name : "fpu32InvAbs",
|
||||
displayName : "Inverse Absolute Value Vector Functions",
|
||||
config : vec_configs_fpu32_inv_abs
|
||||
},
|
||||
{
|
||||
name : "fpu32Mac",
|
||||
displayName : "Multiply-and-Accumulate Vector Functions",
|
||||
config : vec_configs_fpu32_mac
|
||||
},
|
||||
{
|
||||
name : "fpu32Med",
|
||||
displayName : "Median Vector Functions",
|
||||
config : vec_configs_fpu32_med
|
||||
},
|
||||
{
|
||||
name : "fpu32Mult",
|
||||
displayName : "Multiply Vector Functions",
|
||||
config : vec_configs_fpu32_mult
|
||||
},
|
||||
{
|
||||
name : "fpu32Sub",
|
||||
displayName : "Subtraction Vector Functions",
|
||||
config : vec_configs_fpu32_sub
|
||||
},
|
||||
{
|
||||
name : "fpu32Misc",
|
||||
displayName : "Miscellaneous Vector Functions",
|
||||
config : vec_configs_fpu32_misc
|
||||
},
|
||||
{
|
||||
name : "fpu64Abs",
|
||||
displayName : "Absolute Value Vector Functions",
|
||||
config : vec_configs_fpu64_abs
|
||||
},
|
||||
{
|
||||
name : "fpu64Add",
|
||||
displayName : "Addition Vector Functions",
|
||||
config : vec_configs_fpu64_add
|
||||
},
|
||||
{
|
||||
name : "fpu64InvAbs",
|
||||
displayName : "Inverse Absolute Value Vector Functions",
|
||||
config : vec_configs_fpu64_inv_abs
|
||||
},
|
||||
{
|
||||
name : "fpu64Mac",
|
||||
displayName : "Multiply-and-Accumulate Vector Functions",
|
||||
config : vec_configs_fpu64_mac
|
||||
},
|
||||
{
|
||||
name : "fpu64Mult",
|
||||
displayName : "Multiply Vector Functions",
|
||||
config : vec_configs_fpu64_mult
|
||||
},
|
||||
{
|
||||
name : "fpu64Sub",
|
||||
displayName : "Subtraction Vector Functions",
|
||||
config : vec_configs_fpu64_sub
|
||||
},
|
||||
{
|
||||
name : "fpu64Misc",
|
||||
displayName : "Miscellaneous Vector Functions",
|
||||
config : vec_configs_fpu64_misc
|
||||
},
|
||||
]
|
||||
|
||||
function onChangeFPU(inst, ui)
|
||||
{
|
||||
if(inst.fpuType == FPU_TYPE[0].name)
|
||||
{
|
||||
for(var i in vec_configs_fpu32_abs)
|
||||
{
|
||||
ui[vec_configs_fpu32_abs[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_add)
|
||||
{
|
||||
ui[vec_configs_fpu32_add[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_inv_abs)
|
||||
{
|
||||
ui[vec_configs_fpu32_inv_abs[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_mac)
|
||||
{
|
||||
ui[vec_configs_fpu32_mac[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_med)
|
||||
{
|
||||
ui[vec_configs_fpu32_med[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_mult)
|
||||
{
|
||||
ui[vec_configs_fpu32_mult[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_sub)
|
||||
{
|
||||
ui[vec_configs_fpu32_sub[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_misc)
|
||||
{
|
||||
ui[vec_configs_fpu32_misc[i].name].hidden = false;
|
||||
}
|
||||
|
||||
for(var i in vec_configs_fpu64_abs)
|
||||
{
|
||||
ui[vec_configs_fpu64_abs[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_add)
|
||||
{
|
||||
ui[vec_configs_fpu64_add[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_inv_abs)
|
||||
{
|
||||
ui[vec_configs_fpu64_inv_abs[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_mac)
|
||||
{
|
||||
ui[vec_configs_fpu64_mac[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_mult)
|
||||
{
|
||||
ui[vec_configs_fpu64_mult[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_sub)
|
||||
{
|
||||
ui[vec_configs_fpu64_sub[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_misc)
|
||||
{
|
||||
ui[vec_configs_fpu64_misc[i].name].hidden = true;
|
||||
}
|
||||
}
|
||||
else if(((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x")) && (inst.fpuType == FPU_TYPE[1].name))
|
||||
{
|
||||
for(var i in vec_configs_fpu32_abs)
|
||||
{
|
||||
ui[vec_configs_fpu32_abs[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_add)
|
||||
{
|
||||
ui[vec_configs_fpu32_add[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_inv_abs)
|
||||
{
|
||||
ui[vec_configs_fpu32_inv_abs[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_mac)
|
||||
{
|
||||
ui[vec_configs_fpu32_mac[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_med)
|
||||
{
|
||||
ui[vec_configs_fpu32_med[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_mult)
|
||||
{
|
||||
ui[vec_configs_fpu32_mult[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_sub)
|
||||
{
|
||||
ui[vec_configs_fpu32_sub[i].name].hidden = true;
|
||||
}
|
||||
for(var i in vec_configs_fpu32_misc)
|
||||
{
|
||||
ui[vec_configs_fpu32_misc[i].name].hidden = true;
|
||||
}
|
||||
|
||||
for(var i in vec_configs_fpu64_abs)
|
||||
{
|
||||
ui[vec_configs_fpu64_abs[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_add)
|
||||
{
|
||||
ui[vec_configs_fpu64_add[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_inv_abs)
|
||||
{
|
||||
ui[vec_configs_fpu64_inv_abs[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_mac)
|
||||
{
|
||||
ui[vec_configs_fpu64_mac[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_mult)
|
||||
{
|
||||
ui[vec_configs_fpu64_mult[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_sub)
|
||||
{
|
||||
ui[vec_configs_fpu64_sub[i].name].hidden = false;
|
||||
}
|
||||
for(var i in vec_configs_fpu64_misc)
|
||||
{
|
||||
ui[vec_configs_fpu64_misc[i].name].hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
function onValidate(inst, validation){
|
||||
var fpuMod = system.modules["/libraries/math/FPU/FPU.js"];
|
||||
if(fpuMod)
|
||||
{
|
||||
if(fpuMod.$static.fpuType != inst.fpuType)
|
||||
{
|
||||
validation.logError(system.getReference(fpuMod.$static, "fpuType") + " must be the same across modules.", inst, "fpuType");
|
||||
}
|
||||
}
|
||||
}
|
||||
function filterHardware(component)
|
||||
{
|
||||
return (Common.typeMatches(component.type, ["Vector"]));
|
||||
}
|
||||
var vecModule = {
|
||||
c2000wareLibraryName: "VECTOR",
|
||||
displayName: "Vector",
|
||||
defaultInstanceName: "myVEC",
|
||||
description: "Vector Operations",
|
||||
longDescription: longDescription,
|
||||
filterHardware : filterHardware,
|
||||
maxInstances : 1,
|
||||
config: config,
|
||||
templates: {
|
||||
c2000ware_libraries_h : "/libraries/dsp/FPU/Vector/templates/vector.c2000ware_libraries.h.xdt",
|
||||
c2000ware_libraries_opt : "/libraries/dsp/FPU/Vector/templates/vector.c2000ware_libraries.opt.xdt",
|
||||
c2000ware_libraries_cmd_genlibs : "/libraries/dsp/FPU/Vector/templates/vector.c2000ware_libraries.cmd.genlibs.xdt",
|
||||
},
|
||||
modules: Common.autoForce("fpu", "/libraries/.meta/math/FPU/FPU.js"),
|
||||
validate : onValidate
|
||||
};
|
||||
exports = vecModule;
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,23 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var moduleNameFFT = "FFT"
|
||||
% var moduleFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameFFT + '.js'];
|
||||
% var moduleNameFILTER = "Filter"
|
||||
% var moduleFILTER = system.modules['/libraries/dsp/FPU/Filter' + '/' + moduleNameFILTER + '.js'];
|
||||
% var moduleNameVec = "Vector"
|
||||
% var moduleVec = system.modules['/libraries/dsp/FPU/Vector' + '/' + moduleNameVec + '.js'];
|
||||
%
|
||||
%if(moduleFFT == null)
|
||||
%{
|
||||
%if(moduleVec != null)
|
||||
%{
|
||||
% var instance = moduleVec.$instances[0];
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
-l"libraries/dsp/FPU/c28/lib/c28x_fpu_dsp_library.lib"
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
-l"libraries/dsp/FPU/c28/lib/c28x_fpu64_dsp_library.lib"
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <dsp.h>
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var moduleName = "Vector"
|
||||
% var module = system.modules['/libraries/dsp/FPU/Vector/' + moduleName + '.js'];
|
||||
% var instance = module.$instances[0];
|
||||
%
|
||||
% if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
#include <fpu32/fpu_types.h>
|
||||
#include <fpu32/fpu_vector.h>
|
||||
%}
|
||||
% else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
#include <fpu64/vector.h>
|
||||
%}
|
||||
@@ -0,0 +1,17 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var c2000warePath = Common.getC2000WarePath()
|
||||
%
|
||||
% var moduleNameFFT = "FFT"
|
||||
% var moduleFFT = system.modules['/libraries/dsp/FPU/FFT' + '/' + moduleNameFFT + '.js'];
|
||||
% var moduleNameFILTER = "Filter"
|
||||
% var moduleFILTER = system.modules['/libraries/dsp/FPU/Filter' + '/' + moduleNameFILTER + '.js'];
|
||||
% var moduleNameVec = "Vector"
|
||||
% var moduleVec = system.modules['/libraries/dsp/FPU/Vector' + '/' + moduleNameVec + '.js'];
|
||||
%
|
||||
%if(moduleFFT == null)
|
||||
%{
|
||||
%if(moduleVec != null)
|
||||
%{
|
||||
-I"`c2000warePath`libraries/dsp/FPU/c28/include"
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,139 @@
|
||||
%let Common = system.getScript("/driverlib/Common.js");
|
||||
% var moduleName = "vcrc"
|
||||
% var libraryFolder = "vcrc"
|
||||
% var module = system.modules['/libraries/dsp/VCU/VCRC/' + moduleName + '.js'];
|
||||
% var initFunctions = [];
|
||||
% if (module!=null){
|
||||
% var crc8TableIncludes = false;
|
||||
% var crc8TableReflectedIncludes = false;
|
||||
% var crc16P1TableIncludes = false;
|
||||
% var crc16P1TableReflectedIncludes = false;
|
||||
% var crc16P2TableIncludes = false;
|
||||
% var crc16P2TableReflectedIncludes = false;
|
||||
% var crc24TableIncludes = false;
|
||||
% var crc24TableReflectedIncludes = false;
|
||||
% var crc32P1TableIncludes = false;
|
||||
% var crc32P1TableReflectedIncludes = false;
|
||||
% var crc32P2TableIncludes = false;
|
||||
% var crc32P2TableReflectedIncludes = false;
|
||||
% for(var i = 0; i < module.$instances.length; i++) {
|
||||
% var instance = module.$instances[i];
|
||||
%if ((instance.crcTable == "crc8Table")&&(crc8TableIncludes == false)){
|
||||
% crc8TableIncludes = true;
|
||||
#include "common/crctable0x7.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc8TableReflected")&&(crc8TableReflectedIncludes == false)){
|
||||
% crc8TableReflectedIncludes = true;
|
||||
#include "common/crctable0x7reflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc16P1Table")&&(crc16P1TableIncludes == false)){
|
||||
% crc16P1TableIncludes = true;
|
||||
#include "common/crctable0x8005.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc16P1TableReflected")&&(crc16P1TableReflectedIncludes == false)){
|
||||
% crc16P1TableReflectedIncludes = true;
|
||||
#include "common/crctable0x8005reflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc16P2Table")&&(crc16P2TableIncludes == false)){
|
||||
% crc16P2TableIncludes = true;
|
||||
#include "common/crctable0x1021.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc16P2TableReflected")&&(crc16P2TableReflectedIncludes == false)){
|
||||
% crc16P2TableReflectedIncludes = true;
|
||||
#include "common/crctable0x1021reflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc24Table")&&(crc24TableIncludes == false)){
|
||||
% crc24TableIncludes = true;
|
||||
#include "common/crctable0x5d6dcb.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc24TableReflected")&&(crc24TableReflectedIncludes == false)){
|
||||
% crc24TableReflectedIncludes = true;
|
||||
#include "common/crctable0x5d6dcbreflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc32P1Table")&&(crc32P1TableIncludes == false)){
|
||||
% crc32P1TableIncludes = true;
|
||||
#include "common/crctable0x04c11db7.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc32P1TableReflected")&&(crc32P1TableReflectedIncludes == false)){
|
||||
% crc32P1TableReflectedIncludes = true;
|
||||
#include "common/crctable0x04c11db7reflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc32P2Table")&&(crc32P2TableIncludes == false)){
|
||||
% crc32P2TableIncludes = true;
|
||||
#include "common/crctable0x1edc6f41.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc32P2TableReflected")&&(crc32P2TableReflectedIncludes == false)){
|
||||
% crc32P2TableReflectedIncludes = true;
|
||||
#include "common/crctable0x1edc6f41reflected.h"
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
|
||||
% for(var i = 0; i < module.$instances.length; i++) {
|
||||
% var instance = module.$instances[i];
|
||||
%if (module != null){
|
||||
%
|
||||
% initFunctions.push(instance.$name+ "_init");
|
||||
//
|
||||
// VCRC Global Variables - `instance.$name`
|
||||
//
|
||||
CRC_Obj `instance.$name`_CRC;
|
||||
CRC_Handle `instance.$name`_Handle;
|
||||
uint32_t `instance.$name`_goldenValue = 0;
|
||||
%
|
||||
//
|
||||
// `instance.$name` init
|
||||
//
|
||||
void `instance.$name`_init(){
|
||||
// Populate CRC object with sysconfig options
|
||||
`instance.$name`_CRC.seedValue = `instance.$name`_SEEDVAL; //enter the seed value for CRC computation
|
||||
`instance.$name`_CRC.nMsgBytes = `instance.$name`_NUMMSGBYTES; //enter the number of bytes on which the CRC is to be computated
|
||||
`instance.$name`_CRC.nMsgBits = `instance.$name`_NUMMSGBITS; //enter the number of bits for CRC computation
|
||||
`instance.$name`_CRC.parity = `instance.$name`_PARITY; //choose to compute CRC for lower byte(8 bits) first or upper byte first based on the parity value
|
||||
% if (instance.runVerification && (instance.crcTableInputMode == "PREDEFINED")){
|
||||
`instance.$name`_CRC.pCrcTable = (uint32_t *)`instance.crcTable`;
|
||||
% }
|
||||
% if (instance.runVerification && (instance.crcTableInputMode == "MANUAL")){
|
||||
`instance.$name`_CRC.pCrcTable = (uint32_t *)`instance.crcTableManual`;
|
||||
%}
|
||||
`instance.$name`_CRC.crcResult = `instance.$name`_RESULT; //CRC result would be stored in the location
|
||||
`instance.$name`_CRC.pMsgBuffer = (uint16_t *)`instance.msgBuffer`; //pointer to the message buffer
|
||||
`instance.$name`_CRC.polynomial = `instance.$name`_POLY; //user polynomial
|
||||
`instance.$name`_CRC.polySize = `instance.$name`_POLYSIZE; //polynomial size
|
||||
`instance.$name`_CRC.dataSize = `instance.$name`_DATASIZE; //data size
|
||||
`instance.$name`_CRC.reflected = `instance.$name`_REFLECTED; //Whether the computation is to be done from LSB or MSB, if CRC.reflected = 1 then the data bytes would be flipped before CRC computation
|
||||
`instance.$name`_CRC.init = `instance.$name`_CRCINIT; //initialize the CRC routine by context save and context restore calls
|
||||
`instance.$name`_CRC.run = `instance.$name`_CRCRUN; //point to HW function for CRC computation
|
||||
|
||||
// Initialize the handle
|
||||
`instance.$name`_Handle = &`instance.$name`_CRC;
|
||||
`instance.$name`_Handle->init(`instance.$name`_Handle);
|
||||
|
||||
if (`instance.$name`_Handle == NULL)
|
||||
{
|
||||
//
|
||||
// An error occured during initialization
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
% if (instance.runCRC){
|
||||
% if (instance.runVerification){
|
||||
`instance.$name`_CRC.run = `instance.$name`_CROUTINE;
|
||||
%}
|
||||
//Calculate golden value using the C Routine
|
||||
`instance.$name`_CRC.run(`instance.$name`_Handle);
|
||||
//result stored in global var
|
||||
`instance.$name`_goldenValue = `instance.$name`_CRC.crcResult;
|
||||
`instance.$name`_CRC.run = `instance.$name`_CRCRUN;
|
||||
%}
|
||||
}
|
||||
%}
|
||||
%}
|
||||
void `module.c2000wareLibraryName`_init(){
|
||||
//
|
||||
// Initialize the instances
|
||||
//
|
||||
% for (var initFunc of initFunctions) {
|
||||
`initFunc`();
|
||||
% }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
% var moduleName = "vcrc"
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var module = system.modules['/libraries/dsp/VCU/VCRC' + '/' + moduleName + '.js'];
|
||||
/* libraries required for /libraries/dsp/VCU/c28/lib/c28x_vcrc */
|
||||
% var instance = module.$instances[0];
|
||||
%
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
-l"libraries/dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib"
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
-l"libraries/dsp/VCU/c28/lib/c28x_vcrc_library_fpu64.lib"
|
||||
%}
|
||||
@@ -0,0 +1,68 @@
|
||||
% var moduleName = "vcrc"
|
||||
% var libraryFolder = "vcrc"
|
||||
% var module = system.modules['/libraries/dsp/VCU/VCRC/' + moduleName + '.js'];
|
||||
%if (module != null)
|
||||
%{
|
||||
#include "vcu2/vcu2_crc.h"
|
||||
#include "vcrc/vcrc_configpoly.h"
|
||||
#include "vcu2/vcu2_deinterleaver.h"
|
||||
#include "vcu2/vcu2_fft.h"
|
||||
#include "vcu2/vcu2_reedsolomon_decoder.h"
|
||||
#include "vcu2/vcu2_types.h"
|
||||
#include "vcu2/vcu2_viterbi_decoder.h"
|
||||
|
||||
% for(var i = 0; i < module.$instances.length; i++) {
|
||||
% var instance = module.$instances[i];
|
||||
% let modInst = instance[moduleName];
|
||||
%}
|
||||
% for(var i = 0; i < module.$instances.length; i++) {
|
||||
% var instance = module.$instances[i];
|
||||
% let modInst = instance[moduleName];
|
||||
//
|
||||
// `instance.$name` variables
|
||||
//
|
||||
extern uint32_t `instance.$name`_goldenValue;
|
||||
#define `instance.$name`_SEEDVAL `instance.seedVal`
|
||||
#define `instance.$name`_NUMMSGBYTES `instance.numMsgBytes`
|
||||
#define `instance.$name`_NUMMSGBITS `instance.numMsgBits`
|
||||
#define `instance.$name`_PARITY `instance.parity`
|
||||
#define `instance.$name`_RESULT `instance.result`
|
||||
extern void *`instance.msgBuffer`;
|
||||
%if (instance.userPolyInputMode == "PREDEFINED"){
|
||||
#define `instance.$name`_POLY `instance.userPoly`
|
||||
%}
|
||||
%if (instance.userPolyInputMode == "MANUAL"){
|
||||
#define `instance.$name`_POLY `instance.userPolyManual`
|
||||
%}
|
||||
#define `instance.$name`_POLYSIZE `instance.polySize`
|
||||
#define `instance.$name`_DATASIZE `instance.dataSize`
|
||||
% if (instance.reflected){
|
||||
#define `instance.$name`_REFLECTED 1
|
||||
% } else{
|
||||
#define `instance.$name`_REFLECTED 0
|
||||
% }
|
||||
#define `instance.$name`_CRCINIT (void(*)(void*))`instance.crcInit`
|
||||
%if (instance.cRoutineInputMode == "PREDEFINED"){
|
||||
#define `instance.$name`_CROUTINE (void(*)(void*))`instance.cRoutine`
|
||||
%}
|
||||
%if (instance.cRoutineInputMode == "MANUAL"){
|
||||
#define `instance.$name`_CROUTINE (void(*)(void*))`instance.cRoutineManual`
|
||||
%}
|
||||
#define `instance.$name`_CRCRUN (void(*)(void*))`instance.crcRun`
|
||||
% if (instance.runVerification && (instance.crcTableInputMode == "PREDEFINED")){
|
||||
%
|
||||
% var crcTableType = "uint32_t"
|
||||
% if (instance.crcTable.includes("crc8")) { crcTableType = "uint16_t" }
|
||||
% else if (instance.crcTable.includes("crc16")) { crcTableType = "uint16_t" }
|
||||
% else if (instance.crcTable.includes("crc32")) { crcTableType = "uint32_t" }
|
||||
%
|
||||
% //extern const `crcTableType` `instance.crcTable`[];
|
||||
% }
|
||||
% if (instance.runVerification && (instance.crcTableInputMode == "MANUAL")){
|
||||
extern const void *`instance.crcTableManual`;
|
||||
% }
|
||||
extern CRC_Handle `instance.$name`_Handle;
|
||||
|
||||
void `instance.$name`_init();
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,4 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var c2000warePath = Common.getC2000WarePath()
|
||||
%
|
||||
-I"`c2000warePath`libraries/dsp/VCU/c28/include/"
|
||||
@@ -0,0 +1,429 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
|
||||
let longDescription = `VCRC - This is the latest version of the VCU module which contains only CRC functionality.
|
||||
The module supports computation of fixed polynomial 8-bit, 16-bit, 24-bit, or 32-bit CRCs that exist in VCU2.
|
||||
The VCRC module newly supports user configurable polynomials, flexible both in value and size (1 to 32 bits).
|
||||
It also supports user configurable data sizes (1 to 8 bits).
|
||||
|
||||
The software library c28x_vcrc_library_fpu32 and c28x_vcrc_library_fpu64 provide users with APIs that can be used
|
||||
for CRC computation. Note that the fixed polynomial APIs running on VCU-II will run as is on VCRC and these APIs have been
|
||||
also included in the VCRC libraries mentioned. VCRC library provides APIs for:
|
||||
|
||||
> Fixed Polynomial for 8, 16, 24 and 32 bit CRC
|
||||
> Configurable Polynomial and Size for 1 to 32 bit polynomial and 1 to 8 bits size \n`;
|
||||
|
||||
longDescription += "* [VCRC User Guide](https://dev.ti.com/tirex/explore/node?node=AOyVY9Rz0NHXU4V88GtEFw__gYkahfz__LATEST)\n"
|
||||
|
||||
function onChangeVerification (inst,ui) {
|
||||
ui["cRoutine"].hidden = !inst["runVerification"];
|
||||
ui["crcTable"].hidden = !inst["runVerification"];
|
||||
ui["crcTableInputMode"].hidden = !inst["runVerification"];
|
||||
}
|
||||
|
||||
let INPUT_MODE_PREDEFINED = "PREDEFINED"
|
||||
let INPUT_MODE_MANUAL = "MANUAL"
|
||||
|
||||
let INPUT_MODE = [
|
||||
{name: INPUT_MODE_PREDEFINED, displayName: "Predefined Input"},
|
||||
{name: INPUT_MODE_MANUAL, displayName: "Manual Input"},
|
||||
]
|
||||
var moduleStatic = {
|
||||
name: "fpu",
|
||||
displayName: "FPU/TMU Global Settings",
|
||||
config: []
|
||||
}
|
||||
|
||||
function onChangeInputMode(inst,ui)
|
||||
{
|
||||
if (inst.userPolyInputMode == INPUT_MODE_MANUAL) {
|
||||
ui.userPoly.hidden = true
|
||||
ui.userPolyManual.hidden = false
|
||||
}
|
||||
if (inst.userPolyInputMode == INPUT_MODE_PREDEFINED) {
|
||||
ui.userPoly.hidden = false
|
||||
ui.userPolyManual.hidden = true
|
||||
}
|
||||
if (inst.crcTableInputMode == INPUT_MODE_MANUAL) {
|
||||
ui.crcTable.hidden = true
|
||||
ui.crcTableManual.hidden = false
|
||||
}
|
||||
if (inst.crcTableInputMode == INPUT_MODE_PREDEFINED) {
|
||||
ui.crcTable.hidden = false
|
||||
ui.crcTableManual.hidden = true
|
||||
}
|
||||
if (inst.cRoutineInputMode == INPUT_MODE_MANUAL) {
|
||||
ui.cRoutine.hidden = true
|
||||
ui.cRoutineManual.hidden = false
|
||||
}
|
||||
if (inst.cRoutineInputMode == INPUT_MODE_PREDEFINED) {
|
||||
ui.cRoutine.hidden = false
|
||||
ui.cRoutineManual.hidden = true
|
||||
}
|
||||
}
|
||||
/*
|
||||
function onChangeHWRun(inst, ui)
|
||||
{
|
||||
if (inst.runHwCRC){
|
||||
ui.runVerification.hidden = true
|
||||
ui.crcTable.hidden = true
|
||||
ui.crcTableInputMode.hidden = true
|
||||
ui.crcTableManual.hidden = true
|
||||
ui.runPredefRoutine.hidden = true
|
||||
ui.cRoutine.hidden = true
|
||||
} else{
|
||||
ui.runVerification.hidden = false
|
||||
ui.crcTable.hidden = false
|
||||
ui.crcTableInputMode.hidden = false
|
||||
ui.crcTableManual.hidden = false
|
||||
ui.runPredefRoutine.hidden = false
|
||||
ui.cRoutine.hidden = false
|
||||
}
|
||||
}*/
|
||||
let FPU_TYPE;
|
||||
if((Common.getDeviceName() == "F2838x") || (Common.getDeviceName() == "F28P65x"))
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
let data_sizes = [
|
||||
{name: 0, displayName: "CRC_SIZE_1_BITS"},
|
||||
{name: 1, displayName: "CRC_SIZE_2_BITS"},
|
||||
{name: 2, displayName: "CRC_SIZE_3_BITS"},
|
||||
{name: 3, displayName: "CRC_SIZE_4_BITS"},
|
||||
{name: 4, displayName: "CRC_SIZE_5_BITS"},
|
||||
{name: 5, displayName: "CRC_SIZE_6_BITS"},
|
||||
{name: 6, displayName: "CRC_SIZE_7_BITS"},
|
||||
{name: 7, displayName: "CRC_SIZE_8_BITS"},
|
||||
{name: 8, displayName: "CRC_SIZE_9_BITS"},
|
||||
{name: 9, displayName: "CRC_SIZE_10_BITS"},
|
||||
{name: 10, displayName: "CRC_SIZE_11_BITS"},
|
||||
{name: 11, displayName: "CRC_SIZE_12_BITS"},
|
||||
{name: 12, displayName: "CRC_SIZE_13_BITS"},
|
||||
{name: 13, displayName: "CRC_SIZE_14_BITS"},
|
||||
{name: 14, displayName: "CRC_SIZE_15_BITS"},
|
||||
{name: 15, displayName: "CRC_SIZE_16_BITS"},
|
||||
{name: 16, displayName: "CRC_SIZE_17_BITS"},
|
||||
{name: 17, displayName: "CRC_SIZE_18_BITS"},
|
||||
{name: 18, displayName: "CRC_SIZE_19_BITS"},
|
||||
{name: 19, displayName: "CRC_SIZE_20_BITS"},
|
||||
{name: 20, displayName: "CRC_SIZE_21_BITS"},
|
||||
{name: 21, displayName: "CRC_SIZE_22_BITS"},
|
||||
{name: 22, displayName: "CRC_SIZE_23_BITS"},
|
||||
{name: 23, displayName: "CRC_SIZE_24_BITS"},
|
||||
{name: 24, displayName: "CRC_SIZE_25_BITS"},
|
||||
{name: 25, displayName: "CRC_SIZE_26_BITS"},
|
||||
{name: 26, displayName: "CRC_SIZE_27_BITS"},
|
||||
{name: 27, displayName: "CRC_SIZE_28_BITS"},
|
||||
{name: 28, displayName: "CRC_SIZE_29_BITS"},
|
||||
{name: 29, displayName: "CRC_SIZE_30_BITS"},
|
||||
{name: 30, displayName: "CRC_SIZE_31_BITS"},
|
||||
{name: 31, displayName: "CRC_SIZE_32_BITS"},
|
||||
]
|
||||
|
||||
let crc_options = [
|
||||
{name: "CRC_runConfigPolyBytesReflected", displayName: "CRC_runConfigPolyBytesReflected"},
|
||||
{name: "CRC_runConfigPolyBitsReflected" , displayName: "CRC_runConfigPolyBitsReflected"},
|
||||
{name: "CRC_runConfigPolyBytes", displayName: "CRC_runConfigPolyBytes"},
|
||||
{name: "CRC_runConfigPolyBits" , displayName: "CRC_runConfigPolyBits"}
|
||||
]
|
||||
|
||||
let crc_init = [
|
||||
{name: "CRC_init8Bit", displayName: "CRC_init8Bit"},
|
||||
{name: "CRC_init16Bit", displayName: "CRC_init16Bit"},
|
||||
{name: "CRC_init24Bit", displayName: "CRC_init24Bit"},
|
||||
{name: "CRC_init32Bit", displayName: "CRC_init32Bit"},
|
||||
]
|
||||
|
||||
let crc_routines = [
|
||||
{name: "CRC_run8BitTableLookupC", displayName: "CRC_run8BitTableLookupC"},
|
||||
{name: "CRC_run8BitReflectedTableLookupC", displayName: "CRC_run8BitReflectedTableLookupC"},
|
||||
{name: "CRC_run16BitTableLookupC", displayName: "CRC_run16BitTableLookupC"},
|
||||
{name: "CRC_run16BitReflectedTableLookupC", displayName: "CRC_run16BitReflectedTableLookupC"},
|
||||
{name: "CRC_run24BitTableLookupC", displayName: "CRC_run24BitTableLookupC"},
|
||||
{name: "CRC_run24BitReflectedTableLookupC", displayName: "CRC_run24BitReflectedTableLookupC"},
|
||||
{name: "CRC_run32BitTableLookupC", displayName: "CRC_run32BitTableLookupC"},
|
||||
{name: "CRC_run32BitReflectedTableLookupC", displayName: "CRC_run32BitReflectedTableLookupC"},
|
||||
]
|
||||
|
||||
let parity = [
|
||||
{name: "CRC_parity_even", displayName: "CRC_parity_even"},
|
||||
{name: "CRC_parity_odd", displayName: "CRC_parity_odd"}
|
||||
]
|
||||
|
||||
let polynomial = [
|
||||
{name: '0x0003', displayName: '0x0003'},
|
||||
{name: '0x0007', displayName: '0x0007'},
|
||||
{name: '0x1021', displayName: '0x1021'},
|
||||
{name: '0x8005', displayName: '0x8005'},
|
||||
{name: '0x04C11DB7', displayName: '0x04C11DB7'},
|
||||
{name: '0x1EDC6F41', displayName: '0x1EDC6F41'}
|
||||
]
|
||||
|
||||
let crc_tables = [
|
||||
{name: "crc8Table", displayName: "crc8Table"},
|
||||
{name: "crc8TableReflected", displayName: "crc8TableReflected"},
|
||||
{name: "crc16P1Table", displayName: "crc16P1Table"},
|
||||
{name: "crc16P2Table", displayName: "crc16P2Table"},
|
||||
{name: "crc16P1TableReflected", displayName: "crc16P1TableReflected"},
|
||||
{name: "crc16P2TableReflected", displayName: "crc16P2TableReflected"},
|
||||
{name: "crc24Table", displayName: "crc24Table"},
|
||||
{name: "crc24TableReflected", displayName: "crc24TableReflected"},
|
||||
{name: "crc32P1Table", displayName: "crc32P1Table"},
|
||||
{name: "crc32P2Table", displayName: "crc32P2Table"},
|
||||
{name: "crc32P1TableReflected", displayName: "crc32P1TableReflected"},
|
||||
{name: "crc32P2TableReflected", displayName: "crc32P2TableReflected"}
|
||||
]
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
description : "Choose FPU32 or FPU64 Configuration",
|
||||
default : FPU_TYPE[0].name,
|
||||
options : FPU_TYPE
|
||||
},
|
||||
{
|
||||
name: "crcConfig",
|
||||
displayName : "CRC Configuration",
|
||||
description : '',
|
||||
collapsed : false,
|
||||
config :[
|
||||
{
|
||||
name: "seedVal",
|
||||
displayName : "Seed Value",
|
||||
description : 'Enter the seed value for CRC computation',
|
||||
hidden : false,
|
||||
default : '0x0'
|
||||
},
|
||||
{
|
||||
name: "numMsgBytes",
|
||||
displayName : "Number of Bytes",
|
||||
description : 'Enter the number of bytes on which the CRC is to be calculated',
|
||||
hidden : false,
|
||||
default : 0
|
||||
},
|
||||
{
|
||||
name: "numMsgBits",
|
||||
displayName : "Number of Bits",
|
||||
description : 'Enter the number of bits for CRC computation',
|
||||
hidden : false,
|
||||
default : 0
|
||||
},
|
||||
{
|
||||
name: "parity",
|
||||
displayName : "Parity",
|
||||
description : 'Choose to compute CRC for lower byte or upper byte first ',
|
||||
hidden : false,
|
||||
default : parity[0].name,
|
||||
options : parity
|
||||
},
|
||||
{
|
||||
name: "result",
|
||||
displayName : "CRC Result",
|
||||
description : 'Variable for storing CRC result',
|
||||
hidden : true,
|
||||
default : 0
|
||||
},
|
||||
{
|
||||
name: "msgBuffer",
|
||||
displayName : "Message Buffer Variable",
|
||||
description : "Void pointer to function/variable of source address.",
|
||||
hidden : false,
|
||||
default : "testInput",
|
||||
},
|
||||
{
|
||||
name: "userPolyInputMode",
|
||||
displayName : "Polynomial Input Type",
|
||||
description : 'Type of start address input.',
|
||||
hidden : false,
|
||||
default : INPUT_MODE[0].name,
|
||||
options : INPUT_MODE,
|
||||
onChange : onChangeInputMode
|
||||
},
|
||||
{
|
||||
name: "userPoly",
|
||||
displayName : "Predefined Polynomial",
|
||||
description : "User polynomial",
|
||||
hidden : false,
|
||||
default : polynomial[0].name,
|
||||
options : polynomial
|
||||
},
|
||||
{
|
||||
name: "userPolyManual",
|
||||
displayName : "Manual Polynomial Entry",
|
||||
description : 'User polynomial',
|
||||
hidden : true,
|
||||
default : '0x0'
|
||||
},
|
||||
{
|
||||
name: "polySize",
|
||||
displayName : "Polynomial Size",
|
||||
description : "User polynomial Size",
|
||||
hidden : false,
|
||||
default : data_sizes[3].name,
|
||||
options : data_sizes
|
||||
},
|
||||
{
|
||||
name: "dataSize",
|
||||
displayName : "Data Size",
|
||||
description : "",
|
||||
hidden : false,
|
||||
default : data_sizes[0].name,
|
||||
options : data_sizes
|
||||
},
|
||||
{
|
||||
name: "reflected",
|
||||
displayName : "Reflected",
|
||||
description : "Whether the computation is to be done from LSB or MSB",
|
||||
hidden : false,
|
||||
default : false
|
||||
},
|
||||
{
|
||||
name: "crcInit",
|
||||
displayName : "CRC Init Routine",
|
||||
description : "initialize the CRC routine by context save and context restore calls",
|
||||
hidden : false,
|
||||
default : crc_init[0].name,
|
||||
options : crc_init
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "runConfig",
|
||||
displayName : "Hardware CRC Computation",
|
||||
description : "",
|
||||
collapsed : false,
|
||||
config : [
|
||||
{
|
||||
name: "crcRun",
|
||||
displayName : "Hardware CRC Functions",
|
||||
description : "",
|
||||
hidden : false,
|
||||
default : crc_options[0].name,
|
||||
options : crc_options
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "verificationConfig",
|
||||
displayName : "Software CRC Verification (Development Purposes Only)",
|
||||
description : "",
|
||||
collapsed : false,
|
||||
config : [
|
||||
{
|
||||
name: "runVerification",
|
||||
displayName : "Use SW CRC for Verification",
|
||||
description : "Calculate Golden Value & Run CRC with SW",
|
||||
hidden : false,
|
||||
default : true,
|
||||
onChange : onChangeVerification
|
||||
},
|
||||
{
|
||||
name: "crcTableInputMode",
|
||||
displayName : "CRC Table Input Type",
|
||||
description : 'Type of input.',
|
||||
hidden : false,
|
||||
default : INPUT_MODE[0].name,
|
||||
options : INPUT_MODE,
|
||||
onChange : onChangeInputMode
|
||||
},
|
||||
{
|
||||
name: "crcTable",
|
||||
displayName : "CRC Table",
|
||||
description : "Void pointer to function/variable of source address.",
|
||||
hidden : false,
|
||||
default : crc_tables[0].name,
|
||||
options : crc_tables
|
||||
},
|
||||
{
|
||||
name: "crcTableManual",
|
||||
displayName : "CRC Table Name",
|
||||
description : "Void pointer to function/variable of source address.",
|
||||
hidden : true,
|
||||
default : ''
|
||||
},
|
||||
{
|
||||
name: "cRoutineInputMode",
|
||||
displayName : "C Routine Input Type",
|
||||
description : 'Type of input.',
|
||||
hidden : false,
|
||||
default : INPUT_MODE[0].name,
|
||||
options : INPUT_MODE,
|
||||
onChange : onChangeInputMode
|
||||
},
|
||||
{
|
||||
name: "cRoutine",
|
||||
displayName : "Predefined C Routine",
|
||||
description : "Point to the C Routine",
|
||||
hidden : false,
|
||||
default : crc_routines[0].name,
|
||||
options : crc_routines
|
||||
},
|
||||
{
|
||||
name: "cRoutineManual",
|
||||
displayName : "C Routine Function Name",
|
||||
description : "Void pointer to function/variable of source address.",
|
||||
hidden : true,
|
||||
default : ''
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "runCRC",
|
||||
displayName: "Run CRC",
|
||||
default: false
|
||||
}
|
||||
]
|
||||
|
||||
function onValidate(inst, validation) {
|
||||
var fpuMod = system.modules["/libraries/math/FPU/FPU.js"];
|
||||
if(fpuMod)
|
||||
{
|
||||
if(fpuMod.$static.fpuType != inst.fpuType)
|
||||
{
|
||||
validation.logError(system.getReference(fpuMod.$static, "fpuType") + " must be the same across modules.", inst, "fpuType");
|
||||
}
|
||||
}
|
||||
|
||||
if (inst.userPolyManual < 0x0 || inst.userPolyManual > 0xFFFFFFFF){
|
||||
validation.logError(
|
||||
"Please enter a valid 0-32 bit polynomial",
|
||||
inst, "userPolyManual");
|
||||
}
|
||||
|
||||
if (inst.seedValue < 0x0 || inst.seedValue > 0xFFFFFFFF){
|
||||
validation.logError(
|
||||
"Please enter a valid 0-32 bit polynomial",
|
||||
inst, "seedValue");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var vcrcModule = {
|
||||
c2000wareLibraryName: "VCRC",
|
||||
displayName: "VCRC",
|
||||
defaultInstanceName: "myVCRC",
|
||||
description: "VCRC computation module",
|
||||
longDescription: longDescription,
|
||||
//moduleInstances: moduleInstances,
|
||||
//sharedModuleInstances: sharedModuleInstances,
|
||||
modules: Common.autoForce("fpu", "/libraries/.meta/math/FPU/FPU.js"),
|
||||
config: config,
|
||||
templates: {
|
||||
c2000ware_libraries_h : "/libraries/dsp/VCU/VCRC/templates/vcrc.c2000ware_libraries.h.xdt",
|
||||
c2000ware_libraries_c : "/libraries/dsp/VCU/VCRC/templates/vcrc.c2000ware_libraries.c.xdt",
|
||||
c2000ware_libraries_opt : "/libraries/dsp/VCU/VCRC/templates/vcrc.c2000ware_libraries.opt.xdt",
|
||||
c2000ware_libraries_cmd_genlibs : "/libraries/dsp/VCU/VCRC/templates/vcrc.c2000ware_libraries.cmd.genlibs.xdt",
|
||||
},
|
||||
validate : onValidate,
|
||||
};
|
||||
exports = vcrcModule;
|
||||
@@ -0,0 +1,139 @@
|
||||
%let Common = system.getScript("/driverlib/Common.js");
|
||||
% var moduleName = "vcrc"
|
||||
% var libraryFolder = "vcrc"
|
||||
% var module = system.modules['/libraries/dsp/vcu_vcrc/' + moduleName + '.js'];
|
||||
% var initFunctions = [];
|
||||
% if (module!=null){
|
||||
% var crc8TableIncludes = false;
|
||||
% var crc8TableReflectedIncludes = false;
|
||||
% var crc16P1TableIncludes = false;
|
||||
% var crc16P1TableReflectedIncludes = false;
|
||||
% var crc16P2TableIncludes = false;
|
||||
% var crc16P2TableReflectedIncludes = false;
|
||||
% var crc24TableIncludes = false;
|
||||
% var crc24TableReflectedIncludes = false;
|
||||
% var crc32P1TableIncludes = false;
|
||||
% var crc32P1TableReflectedIncludes = false;
|
||||
% var crc32P2TableIncludes = false;
|
||||
% var crc32P2TableReflectedIncludes = false;
|
||||
% for(var i = 0; i < module.$instances.length; i++) {
|
||||
% var instance = module.$instances[i];
|
||||
%if ((instance.crcTable == "crc8Table")&&(crc8TableIncludes == false)){
|
||||
% crc8TableIncludes = true;
|
||||
#include "common/crctable0x7.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc8TableReflected")&&(crc8TableReflectedIncludes == false)){
|
||||
% crc8TableReflectedIncludes = true;
|
||||
#include "common/crctable0x7reflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc16P1Table")&&(crc16P1TableIncludes == false)){
|
||||
% crc16P1TableIncludes = true;
|
||||
#include "common/crctable0x8005.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc16P1TableReflected")&&(crc16P1TableReflectedIncludes == false)){
|
||||
% crc16P1TableReflectedIncludes = true;
|
||||
#include "common/crctable0x8005reflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc16P2Table")&&(crc16P2TableIncludes == false)){
|
||||
% crc16P2TableIncludes = true;
|
||||
#include "common/crctable0x1021.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc16P2TableReflected")&&(crc16P2TableReflectedIncludes == false)){
|
||||
% crc16P2TableReflectedIncludes = true;
|
||||
#include "common/crctable0x1021reflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc24Table")&&(crc24TableIncludes == false)){
|
||||
% crc24TableIncludes = true;
|
||||
#include "common/crctable0x5d6dcb.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc24TableReflected")&&(crc24TableReflectedIncludes == false)){
|
||||
% crc24TableReflectedIncludes = true;
|
||||
#include "common/crctable0x5d6dcbreflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc32P1Table")&&(crc32P1TableIncludes == false)){
|
||||
% crc32P1TableIncludes = true;
|
||||
#include "common/crctable0x04c11db7.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc32P1TableReflected")&&(crc32P1TableReflectedIncludes == false)){
|
||||
% crc32P1TableReflectedIncludes = true;
|
||||
#include "common/crctable0x04c11db7reflected.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc32P2Table")&&(crc32P2TableIncludes == false)){
|
||||
% crc32P2TableIncludes = true;
|
||||
#include "common/crctable0x1edc6f41.h"
|
||||
%}
|
||||
%if ((instance.crcTable == "crc32P2TableReflected")&&(crc32P2TableReflectedIncludes == false)){
|
||||
% crc32P2TableReflectedIncludes = true;
|
||||
#include "common/crctable0x1edc6f41reflected.h"
|
||||
%}
|
||||
%}
|
||||
%}
|
||||
|
||||
% for(var i = 0; i < module.$instances.length; i++) {
|
||||
% var instance = module.$instances[i];
|
||||
%if (module != null){
|
||||
%
|
||||
% initFunctions.push(instance.$name+ "_init");
|
||||
//
|
||||
// VCRC Global Variables - `instance.$name`
|
||||
//
|
||||
CRC_Obj `instance.$name`_CRC;
|
||||
CRC_Handle `instance.$name`_Handle;
|
||||
uint32_t `instance.$name`_goldenValue = 0;
|
||||
%
|
||||
//
|
||||
// `instance.$name` init
|
||||
//
|
||||
void `instance.$name`_init(){
|
||||
// Populate CRC object with sysconfig options
|
||||
`instance.$name`_CRC.seedValue = `instance.$name`_SEEDVAL; //enter the seed value for CRC computation
|
||||
`instance.$name`_CRC.nMsgBytes = `instance.$name`_NUMMSGBYTES; //enter the number of bytes on which the CRC is to be computated
|
||||
`instance.$name`_CRC.nMsgBits = `instance.$name`_NUMMSGBITS; //enter the number of bits for CRC computation
|
||||
`instance.$name`_CRC.parity = `instance.$name`_PARITY; //choose to compute CRC for lower byte(8 bits) first or upper byte first based on the parity value
|
||||
% if (instance.runVerification && (instance.crcTableInputMode == "PREDEFINED")){
|
||||
`instance.$name`_CRC.pCrcTable = (uint32_t *)`instance.crcTable`;
|
||||
% }
|
||||
% if (instance.runVerification && (instance.crcTableInputMode == "MANUAL")){
|
||||
`instance.$name`_CRC.pCrcTable = (uint32_t *)`instance.crcTableManual`;
|
||||
%}
|
||||
`instance.$name`_CRC.crcResult = `instance.$name`_RESULT; //CRC result would be stored in the location
|
||||
`instance.$name`_CRC.pMsgBuffer = (uint16_t *)`instance.msgBuffer`; //pointer to the message buffer
|
||||
`instance.$name`_CRC.polynomial = `instance.$name`_POLY; //user polynomial
|
||||
`instance.$name`_CRC.polySize = `instance.$name`_POLYSIZE; //polynomial size
|
||||
`instance.$name`_CRC.dataSize = `instance.$name`_DATASIZE; //data size
|
||||
`instance.$name`_CRC.reflected = `instance.$name`_REFLECTED; //Whether the computation is to be done from LSB or MSB, if CRC.reflected = 1 then the data bytes would be flipped before CRC computation
|
||||
`instance.$name`_CRC.init = `instance.$name`_CRCINIT; //initialize the CRC routine by context save and context restore calls
|
||||
`instance.$name`_CRC.run = `instance.$name`_CRCRUN; //point to HW function for CRC computation
|
||||
|
||||
// Initialize the handle
|
||||
`instance.$name`_Handle = &`instance.$name`_CRC;
|
||||
`instance.$name`_Handle->init(`instance.$name`_Handle);
|
||||
|
||||
if (`instance.$name`_Handle == NULL)
|
||||
{
|
||||
//
|
||||
// An error occured during initialization
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
% if (instance.runCRC){
|
||||
% if (instance.runVerification){
|
||||
`instance.$name`_CRC.run = `instance.$name`_CROUTINE;
|
||||
%}
|
||||
//Calculate golden value using the C Routine
|
||||
`instance.$name`_CRC.run(`instance.$name`_Handle);
|
||||
//result stored in global var
|
||||
`instance.$name`_goldenValue = `instance.$name`_CRC.crcResult;
|
||||
`instance.$name`_CRC.run = `instance.$name`_CRCRUN;
|
||||
%}
|
||||
}
|
||||
%}
|
||||
%}
|
||||
void `module.c2000wareLibraryName`_init(){
|
||||
//
|
||||
// Initialize the instances
|
||||
//
|
||||
% for (var initFunc of initFunctions) {
|
||||
`initFunc`();
|
||||
% }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
% var moduleName = "vcrc"
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var module = system.modules['/libraries/dsp/vcu_vcrc' + '/' + moduleName + '.js'];
|
||||
/* libraries required for /libraries/dsp/VCU/c28/lib/c28x_vcrc */
|
||||
% var instance = module.$instances[0];
|
||||
%
|
||||
%if(instance.fpuType == "FPU32")
|
||||
%{
|
||||
-l"/libraries/dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib"
|
||||
%}
|
||||
%else if(instance.fpuType == "FPU64")
|
||||
%{
|
||||
-l"/libraries/dsp/VCU/c28/lib/c28x_vcrc_library_fpu64.lib"
|
||||
%}
|
||||
@@ -0,0 +1,68 @@
|
||||
% var moduleName = "vcrc"
|
||||
% var libraryFolder = "vcrc"
|
||||
% var module = system.modules['/libraries/dsp/vcu_vcrc/' + moduleName + '.js'];
|
||||
%if (module != null)
|
||||
%{
|
||||
#include "vcu2/vcu2_crc.h"
|
||||
#include "vcrc/vcrc_configpoly.h"
|
||||
#include "vcu2/vcu2_deinterleaver.h"
|
||||
#include "vcu2/vcu2_fft.h"
|
||||
#include "vcu2/vcu2_reedsolomon_decoder.h"
|
||||
#include "vcu2/vcu2_types.h"
|
||||
#include "vcu2/vcu2_viterbi_decoder.h"
|
||||
|
||||
% for(var i = 0; i < module.$instances.length; i++) {
|
||||
% var instance = module.$instances[i];
|
||||
% let modInst = instance[moduleName];
|
||||
%}
|
||||
% for(var i = 0; i < module.$instances.length; i++) {
|
||||
% var instance = module.$instances[i];
|
||||
% let modInst = instance[moduleName];
|
||||
//
|
||||
// `instance.$name` variables
|
||||
//
|
||||
extern uint32_t `instance.$name`_goldenValue;
|
||||
#define `instance.$name`_SEEDVAL `instance.seedVal`
|
||||
#define `instance.$name`_NUMMSGBYTES `instance.numMsgBytes`
|
||||
#define `instance.$name`_NUMMSGBITS `instance.numMsgBits`
|
||||
#define `instance.$name`_PARITY `instance.parity`
|
||||
#define `instance.$name`_RESULT `instance.result`
|
||||
extern void *`instance.msgBuffer`;
|
||||
%if (instance.userPolyInputMode == "PREDEFINED"){
|
||||
#define `instance.$name`_POLY `instance.userPoly`
|
||||
%}
|
||||
%if (instance.userPolyInputMode == "MANUAL"){
|
||||
#define `instance.$name`_POLY `instance.userPolyManual`
|
||||
%}
|
||||
#define `instance.$name`_POLYSIZE `instance.polySize`
|
||||
#define `instance.$name`_DATASIZE `instance.dataSize`
|
||||
% if (instance.reflected){
|
||||
#define `instance.$name`_REFLECTED 1
|
||||
% } else{
|
||||
#define `instance.$name`_REFLECTED 0
|
||||
% }
|
||||
#define `instance.$name`_CRCINIT (void(*)(void*))`instance.crcInit`
|
||||
%if (instance.cRoutineInputMode == "PREDEFINED"){
|
||||
#define `instance.$name`_CROUTINE (void(*)(void*))`instance.cRoutine`
|
||||
%}
|
||||
%if (instance.cRoutineInputMode == "MANUAL"){
|
||||
#define `instance.$name`_CROUTINE (void(*)(void*))`instance.cRoutineManual`
|
||||
%}
|
||||
#define `instance.$name`_CRCRUN (void(*)(void*))`instance.crcRun`
|
||||
% if (instance.runVerification && (instance.crcTableInputMode == "PREDEFINED")){
|
||||
%
|
||||
% var crcTableType = "uint32_t"
|
||||
% if (instance.crcTable.includes("crc8")) { crcTableType = "uint16_t" }
|
||||
% else if (instance.crcTable.includes("crc16")) { crcTableType = "uint16_t" }
|
||||
% else if (instance.crcTable.includes("crc32")) { crcTableType = "uint32_t" }
|
||||
%
|
||||
% //extern const `crcTableType` `instance.crcTable`[];
|
||||
% }
|
||||
% if (instance.runVerification && (instance.crcTableInputMode == "MANUAL")){
|
||||
extern const void *`instance.crcTableManual`;
|
||||
% }
|
||||
extern CRC_Handle `instance.$name`_Handle;
|
||||
|
||||
void `instance.$name`_init();
|
||||
%}
|
||||
%}
|
||||
@@ -0,0 +1,6 @@
|
||||
% let Common = system.getScript("/driverlib/Common.js");
|
||||
% var currnetSDKProductPath = system.getProducts()[0].path
|
||||
% var sdkPath = system.utils.path.join(currnetSDKProductPath + "../../../")
|
||||
% sdkPath = sdkPath.replace(new RegExp('\\' + system.utils.path.sep, 'g'), '/')
|
||||
%
|
||||
-I"`sdkPath`libraries/dsp/VCU/c28/include/"
|
||||
@@ -0,0 +1,429 @@
|
||||
let Common = system.getScript("/driverlib/Common.js");
|
||||
let Pinmux = system.getScript("/driverlib/pinmux.js");
|
||||
|
||||
let longDescription = `VCRC - This is the latest version of the VCU module which contains only CRC functionality.
|
||||
The module supports computation of fixed polynomial 8-bit, 16-bit, 24-bit, or 32-bit CRCs that exist in VCU2.
|
||||
The VCRC module newly supports user configurable polynomials, flexible both in value and size (1 to 32 bits).
|
||||
It also supports user configurable data sizes (1 to 8 bits).
|
||||
|
||||
The software library c28x_vcrc_library_fpu32 and c28x_vcrc_library_fpu64 provide users with APIs that can be used
|
||||
for CRC computation. Note that the fixed polynomial APIs running on VCU-II will run as is on VCRC and these APIs have been
|
||||
also included in the VCRC libraries mentioned. VCRC library provides APIs for:
|
||||
|
||||
> Fixed Polynomial for 8, 16, 24 and 32 bit CRC
|
||||
> Configurable Polynomial and Size for 1 to 32 bit polynomial and 1 to 8 bits size \n`;
|
||||
|
||||
longDescription += "* [VCRC User Guide](https://dev.ti.com/tirex/explore/node?node=AOyVY9Rz0NHXU4V88GtEFw__gYkahfz__LATEST)\n"
|
||||
|
||||
function onChangeVerification (inst,ui) {
|
||||
ui["cRoutine"].hidden = !inst["runVerification"];
|
||||
ui["crcTable"].hidden = !inst["runVerification"];
|
||||
ui["crcTableInputMode"].hidden = !inst["runVerification"];
|
||||
}
|
||||
|
||||
let INPUT_MODE_PREDEFINED = "PREDEFINED"
|
||||
let INPUT_MODE_MANUAL = "MANUAL"
|
||||
|
||||
let INPUT_MODE = [
|
||||
{name: INPUT_MODE_PREDEFINED, displayName: "Predefined Input"},
|
||||
{name: INPUT_MODE_MANUAL, displayName: "Manual Input"},
|
||||
]
|
||||
var moduleStatic = {
|
||||
name: "fpu",
|
||||
displayName: "FPU/TMU Global Settings",
|
||||
config: []
|
||||
}
|
||||
|
||||
function onChangeInputMode(inst,ui)
|
||||
{
|
||||
if (inst.userPolyInputMode == INPUT_MODE_MANUAL) {
|
||||
ui.userPoly.hidden = true
|
||||
ui.userPolyManual.hidden = false
|
||||
}
|
||||
if (inst.userPolyInputMode == INPUT_MODE_PREDEFINED) {
|
||||
ui.userPoly.hidden = false
|
||||
ui.userPolyManual.hidden = true
|
||||
}
|
||||
if (inst.crcTableInputMode == INPUT_MODE_MANUAL) {
|
||||
ui.crcTable.hidden = true
|
||||
ui.crcTableManual.hidden = false
|
||||
}
|
||||
if (inst.crcTableInputMode == INPUT_MODE_PREDEFINED) {
|
||||
ui.crcTable.hidden = false
|
||||
ui.crcTableManual.hidden = true
|
||||
}
|
||||
if (inst.cRoutineInputMode == INPUT_MODE_MANUAL) {
|
||||
ui.cRoutine.hidden = true
|
||||
ui.cRoutineManual.hidden = false
|
||||
}
|
||||
if (inst.cRoutineInputMode == INPUT_MODE_PREDEFINED) {
|
||||
ui.cRoutine.hidden = false
|
||||
ui.cRoutineManual.hidden = true
|
||||
}
|
||||
}
|
||||
/*
|
||||
function onChangeHWRun(inst, ui)
|
||||
{
|
||||
if (inst.runHwCRC){
|
||||
ui.runVerification.hidden = true
|
||||
ui.crcTable.hidden = true
|
||||
ui.crcTableInputMode.hidden = true
|
||||
ui.crcTableManual.hidden = true
|
||||
ui.runPredefRoutine.hidden = true
|
||||
ui.cRoutine.hidden = true
|
||||
} else{
|
||||
ui.runVerification.hidden = false
|
||||
ui.crcTable.hidden = false
|
||||
ui.crcTableInputMode.hidden = false
|
||||
ui.crcTableManual.hidden = false
|
||||
ui.runPredefRoutine.hidden = false
|
||||
ui.cRoutine.hidden = false
|
||||
}
|
||||
}*/
|
||||
let FPU_TYPE;
|
||||
if(Common.getDeviceName() == "F2838x")
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"},
|
||||
{name: "FPU64", displayName: "FPU64"}
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
FPU_TYPE = [
|
||||
{name: "FPU32", displayName: "FPU32"}
|
||||
];
|
||||
}
|
||||
let data_sizes = [
|
||||
{name: 0, displayName: "CRC_SIZE_1_BITS"},
|
||||
{name: 1, displayName: "CRC_SIZE_2_BITS"},
|
||||
{name: 2, displayName: "CRC_SIZE_3_BITS"},
|
||||
{name: 3, displayName: "CRC_SIZE_4_BITS"},
|
||||
{name: 4, displayName: "CRC_SIZE_5_BITS"},
|
||||
{name: 5, displayName: "CRC_SIZE_6_BITS"},
|
||||
{name: 6, displayName: "CRC_SIZE_7_BITS"},
|
||||
{name: 7, displayName: "CRC_SIZE_8_BITS"},
|
||||
{name: 8, displayName: "CRC_SIZE_9_BITS"},
|
||||
{name: 9, displayName: "CRC_SIZE_10_BITS"},
|
||||
{name: 10, displayName: "CRC_SIZE_11_BITS"},
|
||||
{name: 11, displayName: "CRC_SIZE_12_BITS"},
|
||||
{name: 12, displayName: "CRC_SIZE_13_BITS"},
|
||||
{name: 13, displayName: "CRC_SIZE_14_BITS"},
|
||||
{name: 14, displayName: "CRC_SIZE_15_BITS"},
|
||||
{name: 15, displayName: "CRC_SIZE_16_BITS"},
|
||||
{name: 16, displayName: "CRC_SIZE_17_BITS"},
|
||||
{name: 17, displayName: "CRC_SIZE_18_BITS"},
|
||||
{name: 18, displayName: "CRC_SIZE_19_BITS"},
|
||||
{name: 19, displayName: "CRC_SIZE_20_BITS"},
|
||||
{name: 20, displayName: "CRC_SIZE_21_BITS"},
|
||||
{name: 21, displayName: "CRC_SIZE_22_BITS"},
|
||||
{name: 22, displayName: "CRC_SIZE_23_BITS"},
|
||||
{name: 23, displayName: "CRC_SIZE_24_BITS"},
|
||||
{name: 24, displayName: "CRC_SIZE_25_BITS"},
|
||||
{name: 25, displayName: "CRC_SIZE_26_BITS"},
|
||||
{name: 26, displayName: "CRC_SIZE_27_BITS"},
|
||||
{name: 27, displayName: "CRC_SIZE_28_BITS"},
|
||||
{name: 28, displayName: "CRC_SIZE_29_BITS"},
|
||||
{name: 29, displayName: "CRC_SIZE_30_BITS"},
|
||||
{name: 30, displayName: "CRC_SIZE_31_BITS"},
|
||||
{name: 31, displayName: "CRC_SIZE_32_BITS"},
|
||||
]
|
||||
|
||||
let crc_options = [
|
||||
{name: "CRC_runConfigPolyBytesReflected", displayName: "CRC_runConfigPolyBytesReflected"},
|
||||
{name: "CRC_runConfigPolyBitsReflected" , displayName: "CRC_runConfigPolyBitsReflected"},
|
||||
{name: "CRC_runConfigPolyBytes", displayName: "CRC_runConfigPolyBytes"},
|
||||
{name: "CRC_runConfigPolyBits" , displayName: "CRC_runConfigPolyBits"}
|
||||
]
|
||||
|
||||
let crc_init = [
|
||||
{name: "CRC_init8Bit", displayName: "CRC_init8Bit"},
|
||||
{name: "CRC_init16Bit", displayName: "CRC_init16Bit"},
|
||||
{name: "CRC_init24Bit", displayName: "CRC_init24Bit"},
|
||||
{name: "CRC_init32Bit", displayName: "CRC_init32Bit"},
|
||||
]
|
||||
|
||||
let crc_routines = [
|
||||
{name: "CRC_run16BitTableLookupC", displayName: "CRC_run16BitTableLookupC"},
|
||||
{name: "CRC_run16BitReflectedTableLookupC", displayName: "CRC_run16BitReflectedTableLookupC"},
|
||||
{name: "CRC_run32BitTableLookupC", displayName: "CRC_run32BitTableLookupC"},
|
||||
{name: "CRC_run32BitReflectedTableLookupC", displayName: "CRC_run32BitReflectedTableLookupC"},
|
||||
]
|
||||
|
||||
let parity = [
|
||||
{name: "CRC_parity_even", displayName: "CRC_parity_even"},
|
||||
{name: "CRC_parity_odd", displayName: "CRC_parity_odd"}
|
||||
]
|
||||
|
||||
let polynomial = [
|
||||
{name: '0x0003', displayName: '0x0003'},
|
||||
{name: '0x0007', displayName: '0x0007'},
|
||||
{name: '0x1021', displayName: '0x1021'},
|
||||
{name: '0x8005', displayName: '0x8005'},
|
||||
{name: '0x04C11DB7', displayName: '0x04C11DB7'},
|
||||
{name: '0x1EDC6F41', displayName: '0x1EDC6F41'}
|
||||
]
|
||||
|
||||
let crc_tables = [
|
||||
{name: "crc8Table", displayName: "crc8Table"},
|
||||
{name: "crc8TableReflected", displayName: "crc8TableReflected"},
|
||||
{name: "crc16P1Table", displayName: "crc16P1Table"},
|
||||
{name: "crc16P2Table", displayName: "crc16P2Table"},
|
||||
{name: "crc16P1TableReflected", displayName: "crc16P1TableReflected"},
|
||||
{name: "crc16P2TableReflected", displayName: "crc16P2TableReflected"},
|
||||
{name: "crc24Table", displayName: "crc24Table"},
|
||||
{name: "crc24TableReflected", displayName: "crc24TableReflected"},
|
||||
{name: "crc32P1Table", displayName: "crc32P1Table"},
|
||||
{name: "crc32P2Table", displayName: "crc32P2Table"},
|
||||
{name: "crc32P1TableReflected", displayName: "crc32P1TableReflected"},
|
||||
{name: "crc32P2TableReflected", displayName: "crc32P2TableReflected"}
|
||||
]
|
||||
|
||||
let config = [
|
||||
{
|
||||
name: "fpuType",
|
||||
displayName : "FPU Configuration",
|
||||
description : "Choose FPU32 or FPU64 Configuration",
|
||||
default : FPU_TYPE[0].name,
|
||||
options : FPU_TYPE
|
||||
},
|
||||
{
|
||||
name: "crcConfig",
|
||||
displayName : "CRC Configuration",
|
||||
description : '',
|
||||
collapsed : false,
|
||||
config :[
|
||||
{
|
||||
name: "seedVal",
|
||||
displayName : "Seed Value",
|
||||
description : 'Enter the seed value for CRC computation',
|
||||
hidden : false,
|
||||
default : '0x0'
|
||||
},
|
||||
{
|
||||
name: "numMsgBytes",
|
||||
displayName : "Number of Bytes",
|
||||
description : 'Enter the number of bytes on which the CRC is to be calculated',
|
||||
hidden : false,
|
||||
default : 0
|
||||
},
|
||||
{
|
||||
name: "numMsgBits",
|
||||
displayName : "Number of Bits",
|
||||
description : 'Enter the number of bits for CRC computation',
|
||||
hidden : false,
|
||||
default : 0
|
||||
},
|
||||
{
|
||||
name: "parity",
|
||||
displayName : "Parity",
|
||||
description : 'Choose to compute CRC for lower byte or upper byte first ',
|
||||
hidden : false,
|
||||
default : parity[0].name,
|
||||
options : parity
|
||||
},
|
||||
{
|
||||
name: "result",
|
||||
displayName : "CRC Result",
|
||||
description : 'Variable for storing CRC result',
|
||||
hidden : true,
|
||||
default : 0
|
||||
},
|
||||
{
|
||||
name: "msgBuffer",
|
||||
displayName : "Message Buffer Variable",
|
||||
description : "Void pointer to function/variable of source address.",
|
||||
hidden : false,
|
||||
default : "testInput",
|
||||
},
|
||||
{
|
||||
name: "userPolyInputMode",
|
||||
displayName : "Polynomial Input Type",
|
||||
description : 'Type of start address input.',
|
||||
hidden : false,
|
||||
default : INPUT_MODE[0].name,
|
||||
options : INPUT_MODE,
|
||||
onChange : onChangeInputMode
|
||||
},
|
||||
{
|
||||
name: "userPoly",
|
||||
displayName : "Predefined Polynomial",
|
||||
description : "User polynomial",
|
||||
hidden : false,
|
||||
default : polynomial[0].name,
|
||||
options : polynomial
|
||||
},
|
||||
{
|
||||
name: "userPolyManual",
|
||||
displayName : "Manual Polynomial Entry",
|
||||
description : 'User polynomial',
|
||||
hidden : true,
|
||||
default : '0x0'
|
||||
},
|
||||
{
|
||||
name: "polySize",
|
||||
displayName : "Polynomial Size",
|
||||
description : "User polynomial Size",
|
||||
hidden : false,
|
||||
default : data_sizes[3].name,
|
||||
options : data_sizes
|
||||
},
|
||||
{
|
||||
name: "dataSize",
|
||||
displayName : "Data Size",
|
||||
description : "",
|
||||
hidden : false,
|
||||
default : data_sizes[0].name,
|
||||
options : data_sizes
|
||||
},
|
||||
{
|
||||
name: "reflected",
|
||||
displayName : "Reflected",
|
||||
description : "Whether the computation is to be done from LSB or MSB",
|
||||
hidden : false,
|
||||
default : false
|
||||
},
|
||||
{
|
||||
name: "crcInit",
|
||||
displayName : "CRC Init Routine",
|
||||
description : "initialize the CRC routine by context save and context restore calls",
|
||||
hidden : false,
|
||||
default : crc_init[0].name,
|
||||
options : crc_init
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "runConfig",
|
||||
displayName : "Hardware CRC Computation",
|
||||
description : "",
|
||||
collapsed : false,
|
||||
config : [
|
||||
{
|
||||
name: "crcRun",
|
||||
displayName : "Hardware CRC Functions",
|
||||
description : "",
|
||||
hidden : false,
|
||||
default : crc_options[0].name,
|
||||
options : crc_options
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "verificationConfig",
|
||||
displayName : "Software CRC Verification (Development Purposes Only)",
|
||||
description : "",
|
||||
collapsed : false,
|
||||
config : [
|
||||
{
|
||||
name: "runVerification",
|
||||
displayName : "Use SW CRC for Verification",
|
||||
description : "Calculate Golden Value & Run CRC with SW",
|
||||
hidden : false,
|
||||
default : true,
|
||||
onChange : onChangeVerification
|
||||
},
|
||||
{
|
||||
name: "crcTableInputMode",
|
||||
displayName : "CRC Table Input Type",
|
||||
description : 'Type of input.',
|
||||
hidden : false,
|
||||
default : INPUT_MODE[0].name,
|
||||
options : INPUT_MODE,
|
||||
onChange : onChangeInputMode
|
||||
},
|
||||
{
|
||||
name: "crcTable",
|
||||
displayName : "CRC Table",
|
||||
description : "Void pointer to function/variable of source address.",
|
||||
hidden : false,
|
||||
default : crc_tables[0].name,
|
||||
options : crc_tables
|
||||
},
|
||||
{
|
||||
name: "crcTableManual",
|
||||
displayName : "CRC Table Name",
|
||||
description : "Void pointer to function/variable of source address.",
|
||||
hidden : true,
|
||||
default : ''
|
||||
},
|
||||
{
|
||||
name: "cRoutineInputMode",
|
||||
displayName : "C Routine Input Type",
|
||||
description : 'Type of input.',
|
||||
hidden : false,
|
||||
default : INPUT_MODE[0].name,
|
||||
options : INPUT_MODE,
|
||||
onChange : onChangeInputMode
|
||||
},
|
||||
{
|
||||
name: "cRoutine",
|
||||
displayName : "Predefined C Routine",
|
||||
description : "Point to the C Routine",
|
||||
hidden : false,
|
||||
default : crc_routines[0].name,
|
||||
options : crc_routines
|
||||
},
|
||||
{
|
||||
name: "cRoutineManual",
|
||||
displayName : "C Routine Function Name",
|
||||
description : "Void pointer to function/variable of source address.",
|
||||
hidden : true,
|
||||
default : ''
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "runCRC",
|
||||
displayName: "Run CRC",
|
||||
default: false
|
||||
}
|
||||
]
|
||||
|
||||
function onValidate(inst, validation) {
|
||||
var fpuMod = system.modules["/libraries/math/FPU/FPU.js"];
|
||||
if(fpuMod)
|
||||
{
|
||||
if(fpuMod.$static.fpuType != inst.fpuType)
|
||||
{
|
||||
validation.logError(system.getReference(fpuMod.$static, "fpuType") + " must be the same across modules.", inst, "fpuType");
|
||||
}
|
||||
}
|
||||
|
||||
if (inst.userPolyManual < 0x0 || inst.userPolyManual > 0xFFFFFFFF){
|
||||
validation.logError(
|
||||
"Please enter a valid 0-32 bit polynomial",
|
||||
inst, "userPolyManual");
|
||||
}
|
||||
|
||||
if (inst.seedValue < 0x0 || inst.seedValue > 0xFFFFFFFF){
|
||||
validation.logError(
|
||||
"Please enter a valid 0-32 bit polynomial",
|
||||
inst, "seedValue");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var vcrcModule = {
|
||||
c2000wareLibraryName: "VCRC",
|
||||
displayName: "VCRC",
|
||||
defaultInstanceName: "myVCRC",
|
||||
description: "VCRC computation module",
|
||||
longDescription: longDescription,
|
||||
//moduleInstances: moduleInstances,
|
||||
//sharedModuleInstances: sharedModuleInstances,
|
||||
modules: Common.autoForce("fpu", "/libraries/.meta/math/FPU/FPU.js"),
|
||||
config: config,
|
||||
templates: {
|
||||
c2000ware_libraries_h : "/libraries/dsp/vcu_vcrc/templates/vcrc.c2000ware_libraries.h.xdt",
|
||||
c2000ware_libraries_c : "/libraries/dsp/vcu_vcrc/templates/vcrc.c2000ware_libraries.c.xdt",
|
||||
c2000ware_libraries_opt : "/libraries/dsp/vcu_vcrc/templates/vcrc.c2000ware_libraries.opt.xdt",
|
||||
c2000ware_libraries_cmd_genlibs : "/libraries/dsp/vcu_vcrc/templates/vcrc.c2000ware_libraries.cmd.genlibs.xdt",
|
||||
},
|
||||
validate : onValidate,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
exports = vcrcModule;
|
||||