Analog Devices ADRV9001 User Manual page 49

Hide thumbs Also See for ADRV9001:
Table of Contents

Advertisement

Reference Manual
SYSTEM INITIALIZATION AND SHUTDOWN
Measurement Method
Irrespective of the application, the methodology remains the same. The idea is to generate code that programs the setup to use with the
ADRV9001 product, modify it to include functionality unique to an application, if necessary, and then time its execution. There are several
aspects to consider with this idea, the foremost being the choice of programming language. TES can autogenerate code for four languages:
C99, C#, Python, and MATLAB. For timing, use the C99 code running on the platform as it yields the most accurate results without incurring
TCP/IP communication overhead.
Following is an example of how to measure the time taken by the main method. The time is found at the beginning and end of the function, and
the difference between the start and end time is calculated to be the time taken for the program to run. The code in this snippet is taken from
the autogenerated C99 code from TES.
int main()
{
// Start Timer
struct timeval start_t, end_t;
gettimeofday(&start_t, NULL);
int32_t error_code = 0;
adi_adrv9001_Device_t * adrv9001Device_0 = (adi_adrv9001_Device_t *) calloc(1,
sizeof(adi_adrv9001_Device_t));
adi_fpga9001_Device_t * fpga9001Device_0 = (adi_fpga9001_Device_t *) calloc(1,
sizeof(adi_fpga9001_Device_t));
error_code = linux_uio_initialize(adrv9001Device_0, fpga9001Device_0, NULL);
AUTOGENERATOR_ERROR_HANDLER(error_code);
error_code = initialize(adrv9001Device_0, fpga9001Device_0);
AUTOGENERATOR_ERROR_HANDLER(error_code);
.
.
.
error_code = stopTransmitting(fpga9001Device_0);
AUTOGENERATOR_ERROR_HANDLER(error_code);
//End Timer
gettimeofday(&end_t, NULL);
//Print Out Time Taken
printf("Time taken to run is : %ld micro seconds\n",
((end_t.tv_sec * 1000000 + end_t.tv_usec) -
(start_t.tv_sec * 1000000 + start_t.tv_usec)));
return error_code;
}
analog.com
ADRV9001
Rev. 0 | 49 of 351

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADRV9001 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents