DSP/BIOS for C6000/C5000
DSP/BIOS for C6000/C5000
What is DSP/BIOS
• Real-time Environment– Thread execution model
• Threads, Mailboxes, Semaphores
– Device independent I/O • Logging, Streaming I/O
• RTDX (Real-time data exchange)
• Real-time Analysis– Debug facility ( with CCS)
• Device Configuration and Management– GUI based configuration in CCS
DSP/BIOS Modules
Kernel Module Description
Hardware Interrupts Interface from hardware interrupts to DSP/BIOS kernel
Software Interrupts Lightweight pre-emptible threads that use program stack
Tasks Independent threads of execution that can yield the processor
Periodic Functions Time-triggered lightweight threads
Mailboxes Synchronized data exchange between tasks
Lock Nestable binary semaphores
Semaphores Counting semaphores
Queues Atomic link lists
Clock Interface to hardware timers
Streams Streaming I/O for tasks
Pipes Streaming I/O for software interrupts
Memory Manager Low overhead dynamic memory allocation
DSP/BIOS Configuration
DSP/BIOS Configuration
DSP/BIOS Real-time Kernel
DSP/BIOS Task Synchronization
DSP/BIOS Real-time Analysis
DSP/BIOS Real-time Analysis Features
• Low overhead (formatting done in IDE)
Real-time AnalysisOperations
C5000CPUCycles
Time (usec)for 100 MHz5410
C6000CPUCycles
Time (usec)for 200 MHz6201
Log operations
LOG_event 59 0.59 33 0.165
LOG_printf 59 0.59 36 0.18
Statistics operations
STS_set 19 0.19 14 0.07
STS_add 42 0.42 15 0.075
STS_delta 48 0.48 21 0.105
DSP/BIOS Execution Graph
DSP/BIOS Statistics View
DSP/BIOS Input/Output Capability
DSP/BIOS I/O Example
AudioFilter( inputPipe, outputPipe )
{
PIP_get(inputPipe); /* dequeue full frame */
PIP_alloc(outputPipe); /* dequeue empty frame */
copy algorithm; /* read/write data frames */
PIP_free(inputPipe); /* recycle input frame */
PIP_put(outputPipe); /* enqueue output frame */
return; /* wait for next frame pair */
}
DSP/BIOS Audio I/O Example
Void audio(PIP_Obj *in, PIP_Obj *out) { Uns *src, *dst; Uns size; if(PIP_getReaderNumFrames(in) == 0 || PIP_getWriterNumFrames(out)==0){
error(); } /* get input data and allocate output buffer */ PIP_get(in); PIP_alloc(out); /* copy input data to output buffer */ src = PIP_getReaderAddr(in); dst = PIP_getWriterAddr(out); size = PIP_getReaderSize(in); PIP_setWriterSize(out,size); for (; size > 0; size++) { *dst++ = *src++; } /* output copied data and free input buffer */ PIP_put(out); PIP_free(in); }
CSL and Peripheral Configuration
Peripheral Configuration using IDE
System Configuration
• Allows detailed specification of target– Memory: Data and Code location
• Generates peripheral initialization code– Interrupts, Timers, McBSP, DMA etc.
• Generates linker configuration file (.cmd)
Conclusions
• Royalty-free real-time kernel for production use• Allows for rapid development of product from
concept• Can be integrated with another real-time OS• Small footprint (can be as small as 1K words)
– Modules used are controlled by the user
• Allows for on-the-fly debug/analysis in the field• Available with C6000 and C5000 processors