Using GEL File for Parallel Development and Testing of DSP Applications
2. The GEL File and CCS Project
To better illustrate the idea of using the GEL file, we will use a typical MCU-DSP build running on a TMS320C5402DSK as the starting point. The project file attached within this report uses DSPBIOS tasks, semaphores, software interrupts and periodic timers to function. The code was compiled on the Code Composer Studio version 2.10. The code has been written in a generic fashion to run on the 54xx family by ensuring that all code exists in near memory onchip RAM.
The project illustrates the below activities:
The idea is a very simple framework that samples an analog signal and does analysis and processing on it. The framework is initiated by the GEL activate.

[click image to enlarge - opens new window]
This project has defined three tasks using the DSPBIOS configuration setup. The picture below shows the dspbios.cdb file which defines all the rtos elements used in this example. As one can note the above three tasks as defined as TSK_APP, TSK_DRV_HPI and TSK_idl. The function calls associated with each task is shown above.
The IDL_Task takes care of the RTDX and log print f refreshing between the host and the target DSP.

[click image to enlarge - opens new window]
From the picture above, we note that under the Software interrupt manager there are 3 interrupt objects defined. KNL_swi and PRD_swi are DSPBIOS system defined ones in charge of task scheduling and periodic timer intiation respectively. The third software object defined SWI_APP_Start_Event is used in our project file. Software interrupts here are initiated with the syntax SWI_post. A function is associated with a software interrupt so when a software interrupt is posted it executes the function associated with it.
Moving on, we note from the picture that under the PRD Periodic Function Manager an object called PRD_debug_stuff is defined.
The framework code in this article has setup a function called debug_stuff which will monitor the GEL activation events. This function is periodically called by an DSPBIOS object created from the PRD Periodic Function Manager. This setups a timer call with resolution of 1ms.
This project file also utilizes semaphores. Semaphores have been added to the picture to synchronize the tasks. The semaphores provided within DSPBIOS are counting semaphores. Their syntax usage is sem_post and sem_pend. Please see the code for more details.
Previous Page | Next Page
1 | 2 | 3 | 4
If you found this page useful, bookmark and share it on:
If you are familiar with RSS feeds, you can also sign up for our free blog feed. Our RSS feed is updated in real-time while our newsletter is updated daily.
