{___________________________________________________________________________ demo.h This is the header file for the 21k EZlab demo programs. ____________________________________________________________________________} #include "def21020.h" #define PNTS 1024 #define TRIGLEN 20000 {DAC trigger length in cycles} #define DACPER 600 {=30usec DAC sample period} #define TDLYLEN 10000 #define FSCL -30 /* This is the FP conv. scaling */ #define AOSCL 29 /* Fix to float scaling (ifft) */ #define LGOFF 15.0 /* log2 offset (float) */ #define DRNG 100 /* Dynamic Range in decibels */ #define SCLIP 0xe8 /*Clipping value for sprectral display*/ #define JOYSCL -28 /*Joy stick scaling for lin. FFT disp.*/ /* more prepoc. variables for intffir */ #define TAPS 257 /* Number of FIR taps, 2^x+1 < PNTS */ #define LOGPNTS 10 /* log2(PNTS) */ #define SEG (PNTS-TAPS+1) /* Number of samples proc./FFT */ #define UNITY 0xd0 /* Unity gain level */ #define TAPSCL 7 /* Tap coeff. display coeff. */ { configuration word for spectral demo} #define CNFG_SPEC 0x10000014 { configuration word for ispec demo} #define CNFG_ISPEC 0x2000003f { configuration word for intffir demo} #define CNFG_FFIR 0x4000003f {_________The constants below must be changed for different length FFTs______ N = number of points in the FFT, must be a power of 2 STAGES = log2(N) BRMODIFY = bitrev(32 bit N/2) IRE = bitrev(32 bit addr of input real in dm), addr is 0,N,2N,3N,... IREP1 = bitrev((32 bit addr of input real)+1), addr is 0,N,2N,3N,... BRMODH = bitrev(32-bit N/4) VIRE = bitrev(32-bit addr of refft in dm), addr is 0,N/2,N,3N/2,... VORE = bitrev(32-bit addr of real in dm), addr is 0,N/2,N,3N/2,... ____________________________________________________________________________} #define N PNTS #define HN N/2 #define STAGES 10 {for rfft2} #define BRMODIFY 0x00400000 #define IRE 0x00000000 #define IREP1 0x80000000 {for irfft2} #define BRMODH 0x00800000 #define VIRE 0x00200000 #define VORE 0x00000000 { This are the bit definitions of USTAT1} #define DEMO_3 0x80000000 #define DEMO_2 0x40000000 #define DEMO_1 0x20000000 #define DEMO_0 0x10000000 #define UM1 0x08000000 /* User mode bit 1 */ #define FLIRQ 0x04000000 /* Flg0 and IRQ2 at the same time */ #define IRQED 0x02000000 /* IRQ2 has been pressed */ #define OKND 0x01000000 /* O.K. to go to next demo */ #define CDTH 0x00200000 /* cursor dither status bit */ #define LADC 0x00100000 /* last adc conv (a/b) indicator */ #define INBF 0x00080000 /* In audio buffer full */ #define INBH 0x00040000 /* In audio buffer half-full */ #define OUTBF 0x00020000 /* Out audio buffer full */ #define OUTBH 0x00010000 /* Out audio buffer half-full */ #define ENDAB 0x00000020 /* Enable data output DAC B */ #define ENDAA 0x00000010 /* Enable data output DAC A */ #define ENIAR 0x00000008 /* Enable in audio data right */ #define ENIAL 0x00000004 /* Enable in audio data left */ #define ENOAR 0x00000002 /* Enable out audio data right */ #define ENOAL 0x00000001 /* Enable out audio data left */