Texas Memory Systems manual XP-15 User Guide Texas Memory Systems, Inc /6/01

Page 12

*/

while ((cc = getopt(argc, argv, "hx:")) != EOF)

{

switch (cc)

{

case 'x':

xp15 = atoi(optarg); break;

case 'h': case '?': default :

help();

}

}

/*

*Print some useful information

*/

printf("XP-15 Confidence test performing a %d point CFFT on XP-15 #%d\n", fft_size,

xp15);

/*

*Allocate host memory for a test signal

*/

printf("Allocate memory for test signal and FFT results\n"); signal = (TMS_COMPLEX *)malloc(fft_size * sizeof(TMS_COMPLEX)); if (signal == NULL)

{

printf("Failed to allocate signal buffer memory\n"); exit(-1);

}

results = (TMS_COMPLEX *)malloc(fft_size * sizeof(TMS_COMPLEX)); if (results == NULL)

{

printf("Failed to allocate results buffer memory\n"); exit(-1);

}

/*

*Create a test signal, a single spike, and clear results buffer

*/

printf("Clearing results buffer\n"); memset(results, 0, fft_size * sizeof(TMS_COMPLEX)); printf("Creating test signal\n"); memset(signal, 0, fft_size * sizeof(TMS_COMPLEX)); signal[0].real = 16.0;

real_val = signal[0].real; imag_val = 0.0;

/*

*Allocate XP-15 buffers

*/

cu = (TMS_COMPLEX *)vb_pointer(xp15, VP_RAM_A_MEM, 0); cy = (TMS_COMPLEX *)vb_pointer(xp15, VP_RAM_B_MEM, 0);

/*

*Move the input signal into XP-15 local memory

*/

XP-15 User Guide

Texas Memory Systems, Inc. (8/6/01)

A-2

Image 12
Contents XP-15 Vector Processor User GuideTable of Contents Introduction Related TextsTypographical Conventions Overview Installation Installing the XP-15 HardwareInstalling the XP-15 Software Diagnostic Confidence Test Running the XP-15 Confidence TestMake Gcc -I$TMS/include -o cfft cfft.c -L$TMS/lib -lvp -lsam XP-15 User Guide Texas Memory Systems, Inc /6/01 Midas Programming Example Xtmic OverviewRunning the Xtmic Example XP-15 User Guide Texas Memory Systems, Inc /6/01 Appendix a XP-15 Confidence Test CfftXP-15 User Guide Texas Memory Systems, Inc /6/01 Null XP-15 User Guide Texas Memory Systems, Inc /6/01 Appendix B PCI Local Bus Specifications SpecificationAppendix C XP-15 Hardware Control and Status Registers ReservedEcho