|
Post by wphrwm on Mar 4, 2017 9:57:24 GMT
I am interested in developing Software Defined Radio applications and am there for interested in accessing the DSP functions of the chip. I can find not references to these in the available documentation despite a suggestion on the RS site that such documentation would be made available. Can anyone advise me where to find such documents or even whether they are available? I am a competent and experienced amateur programmer and would like to convince myself that I will be able to access these facilities before committing to a purchase as, I suspect, they will not be accessible from the Arduino interface.
Many thanks in advance.
|
|
|
Post by Admin on Mar 5, 2017 11:02:22 GMT
Thr DSP functionality is available from the Arduino IDE. In fact all Aurix cpu features are accessible,they are just not widely known about. We will prepare some examples!
|
|
|
Post by Admin on Mar 6, 2017 8:23:31 GMT
|
|
|
Post by Admin on Mar 6, 2017 13:27:01 GMT
The TriLib is a DSP Library for Aurix/TriCore and is C-callable. It consists of hand-coded assembly, general purpose signal processing routines. These routines are extensively used in real-time applications where speed is critical.
The TriLib includes more than 60 commonly used DSP routines. The throughput of the system using the TriLib routines is considerably better than those achieved using the equivalent code written in ANSI C language. The TriLib significantly helps in understanding the general purpose signal processing routines, its implementation on TriCore. It also reduces the DSP application development time. The TriLib also provides the source code. Some example applications are also provided as part of TriLib to demonstrate the usage of functions.
The routines are broadly classified into the following functional categories:
• Complex Arithmetic • Vector Arithmetic • FIR Filters • IIR Filters • Adaptive Filters • Fast Fourier Transforms • Discrete Cosine Transform • Mathematical functions • Matrix operations • Statistical functions
Specific Features • Covers the common DSP algorithms with Source codes • Hand-coded and optimized assembly modules • Bit-exact reference C codes for easy understanding and verification of the algorithms • Assembly implementation tested for bit exactness against model C codes • Examples to demonstrate the usage of functions
The DSP functions are all accessible through the Arduino IDE:
void setup1() { // put your setup code for core 1 here, to run once:
}
void loop1() { // put your main code for core 1 here, to run repeatedly:
short NF;
// Generate the Twiddle factors FFT_TF_32( TF1,nX1 );
// Real Fast Fourier Transform Forward with two real sequences // Xa and Xb in real and imaginary parts of X1 respectively. // Output will have first block FFT of Xa results of length N // followed by second block FFT of Xb complex results of length N digitalWrite(1,HIGH); NF = FFTReal_2_32(R1, X1, TF1, nX1); // 4.6us on core0, 3.8us on core1 digitalWrite(1,LOW);
// Generate the Twiddle factors FFT_TF_32( TF2, nX2 );
// The input is is arranged in Xa[0],Xa[1]....Xa[n-1],Xb[0], // Xb[1]...Xbn-1] in a 2N length complex array and o/p is alternated // by Xa[0], Xb[0]..Xa[N-1], Xa[N-1] in a N length complex input array.
digitalWrite(2,HIGH); NF = IFFTReal_2_32(R2, X2, TF2, nX2, 0); // 5.5us on core0, 4.2us on core1 digitalWrite(2,LOW);
StopPoint = 1; //Only to set breakpoint
}
|
|
|
Post by wphrwm on Mar 6, 2017 16:05:12 GMT
Many thanks guys. I'll get on and order!!
|
|
|
Post by lukint on Jun 25, 2018 13:38:21 GMT
Hi, I've got a problem with using the FFT_TF_32 function. void FFT_2D (){ FFT_TF_32(TwF,SAMPLES); CplxL inp[SAMPLES]; for (int i = 0; i<SAMPLES; i++){ inp[i].real = decimal_IQ[i]; inp[i].imag = decimal_IQ[i+SAMPLES]; } FFT_2_32(&FFT_1[0][curRamp], inp,TwF,SAMPLES); curRamp++; The compiler always shows the error "undefined reference to 'FFT_TF_32'" but it doesn't have a problem with the FFT_2_32 function. So does anybody knows what the problem is here? The trilib.h library is included and I'm working with Eclipse.
Many Thanks!
|
|
|
Post by lukint on Jun 26, 2018 13:40:25 GMT
Detected my problem! The FFT_TF_16 function is only in the trilib.h file but is not impelemted anywhere. So I searched for the implementation in the Internet and copied this in the libaurix folder. Now it is working.
|
|