Professional Documents
Culture Documents
DSP/BIOS
Chapter 4
DSP/BIOS
Part 1 - Introduction
Learning Objectives
Introduce DSP/BIOS and its
components.
Introduce the software tools for
managing DSP/BIOS components and
objects.
Run some examples.
Algorithm 1
Algorithm 2
CPU processing Algorithm 2
When the CPU is not processing algorithm1 it can process one of the sub-functions (to
completion) as shown:
algorithm2 (); function1();
function2();
function3();
Algorithm 1
Algorithm 2
function1 function2 function3
SEM_pend block
“run to
start
completion”
end end
SWI 2 return
return
TSK 1
interrupt interrupt
main()
return
IDL
interrupt
SWI_post (&SWI_for_algorithm_1);
(2) Tasks
The task can be removed from semaphore queue and put it on the ready queue:
SEM_post (&taskOneSem);
/* Hardware Interrupt */
void timerIsr (void)
{
/* Put your code here */
SWI_post (&SWI_for_algorithm_1);
SEM_post (&taskOneSem);
}
/*Software Interrupt */
void algorithm_1 (void)
{
/* Put your code here */
}
/* Task */
void ProcessTask (void)
{
while (1)
{
SEM_pend (&taskOneSem, SYS_FOREVER);
/* Insert your code here */
}
}
hapter 4, Slide 43 Dr. Nai
Putting it all together…
void main (void)
{
/* Put all your setup code here */
return; /*DSP BIOS starts after the return */
}
/* Hardware Interrupt */
void timerIsr (void)
{
/* Put your code here */
SWI_post (&SWI_for_algorithm_1);
SEM_post (&taskOneSem);
}
/*Software Interrupt */
void algorithm_1 (void)
{
/* Put your code here */
}
/* Task */
void ProcessTask (void)
{
while (1)
{
SEM_pend (&taskOneSem, SYS_FOREVER);
/* Insert your code here */
}
}
hapter 4, Slide 44 Dr. Nai
Putting it all together…
> 34000
(2) Include the following external reference to the DSP/BIOS object in the C
code:
(5) Exercise: Compare the number of cycles the printf and LOG_printf take.
Each STS object uses only four words of data memory. This means that the host transfers only four words to upload data from a statistics object.
EMU H/W
IEEE User
RTDX
JTAG
CCS TI
3rd Party
MS
Third COM
Party
Display
DSK6711 Host
bios_lab3.pjt s1l1.c
s1l1.exe