The World Leader in High Performance Signal Processing Solutions  An Introduction to theVisualDSP++ Kernel (VDK)          ...
About This Module    This module discusses the VisualDSP++ kernel (VDK)    concepts and capabilities.    It is recommended...
Module Outline    Introduction     Operating system choices for Blackfin     Introducing the VDK    Capabilities of the VD...
OS Choices for Blackfin Processors      uClinux                Find third party RTOS options at:                   http://...
Introducing the VisualDSP++ Kernel (VDK)    Small, robust kernel bundled with VisualDSP++     Designed for application wit...
VDK Concepts    Threads    Priority and scheduling     Pre-emptive, cooperative, and time-slicing    Critical and unschedu...
Capabilities of the VDK7
Threads and Priorities (1)    Arbitrary number of threads    running at 31 priority levels     Highest     Preemptive sche...
Threads and Priorities (2)    Arbitrary number of threads       VDK_ClearThreadError()    running at 31 priority levels   ...
Critical and Unscheduled Regions     Critical regions disables all      VDK_PopCriticalRegion()     interrupts and context...
Semaphores (1)     A facility for coordination         VDK_CreateSemaphore()     between threads or from an ISR      VDK_D...
Semaphores (2)     A facility for coordination         VDK_CreateSemaphore()     between threads or from an ISR      VDK_D...
Messages     A message is a targeted                VDK_CreateMessage()     transmission from one                  VDK_Des...
On-line Demo:Building and Debugging VDK Projects     Project Window/VDK tab     Thread creation template     VDK Status Wi...
Sizes and Timings15
VDK Static Memory FootprintsApplication                                                    Code          DataOne C-languag...
Cycle Counts for Performance-SensitiveActivitiesEvent                                                                     ...
Conclusion     VDK is provided at no additional cost with VisualDSP++      Designed to be a robust solution for light-weig...
For Additional Information     Review other BOLD topics (especially System Services and     drivers)     Take a test drive...
Upcoming SlideShare
Loading in …5
×

Introduction to visual DSP++ Kernel

1,160 views

Published on

Introduction to visual DSP++ Kernel

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,160
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to visual DSP++ Kernel

  1. 1. The World Leader in High Performance Signal Processing Solutions An Introduction to theVisualDSP++ Kernel (VDK) Presented by: Ken Atwell Product Line Manager
  2. 2. About This Module This module discusses the VisualDSP++ kernel (VDK) concepts and capabilities. It is recommended that users have: A working knowledge of software terminology Previous experience with other commercial or home-grown operating systems2
  3. 3. Module Outline Introduction Operating system choices for Blackfin Introducing the VDK Capabilities of the VDK On-line Demo: Building and Debugging VDK Projects Timings and Sizes Footprints and benchmarks3
  4. 4. OS Choices for Blackfin Processors uClinux Find third party RTOS options at: http://dspcollaborative.analog.com/developers/ DSP_ThirdParty_Search_Home.asp4
  5. 5. Introducing the VisualDSP++ Kernel (VDK) Small, robust kernel bundled with VisualDSP++ Designed for application with light-weight OS requirements No additional cost or run-time licenses/fees Fully supported and maintained along with the rest of VisualDSP++ Supports all current and future Blackfin derivatives Complements and co-exists with System Services and its device drivers5
  6. 6. VDK Concepts Threads Priority and scheduling Pre-emptive, cooperative, and time-slicing Critical and unscheduled regions Semaphores, including periodic Messages Beyond discussion today, but available in VDK Events and event bits Multi-processor messaging Memory pools Device flags Fully documented in VisualDSP++ help and PDF manuals6
  7. 7. Capabilities of the VDK7
  8. 8. Threads and Priorities (1) Arbitrary number of threads running at 31 priority levels Highest Preemptive scheduling by priority, cooperative or time sliced within a priority Priority can be statically or dynamically assigned Threads may be instantiated at boot time or later at run time Each gets its own stack Each thread implements four functions Create, run, destroy, error All major execution occurs in “run”, many threads never exit run Lowest A thread’s life ends when the8 “run” function exits
  9. 9. Threads and Priorities (2) Arbitrary number of threads VDK_ClearThreadError() running at 31 priority levels VDK_CreateThread() Preemptive scheduling by VDK_CreateThreadEx() priority, cooperative or time VDK_DestroyThread() sliced within a priority VDK_FreeDestroyedThreads() Priority can be statically or VDK_GetLastThreadError() dynamically assigned VDK_GetLastThreadErrorValue() Threads may be instantiated VDK_GetPriority() at boot time or later at run VDK_GetThreadID() time VDK_GetThreadStackUsage() Each thread gets its own stack VDK_GetThreadStatus() Each thread implements four VDK_ResetPriority() functions VDK_SetPriority() Create, run, destroy, error VDK_SetThreadError() All major execution occurs in VDK_Sleep() “run”, many threads never exit VDK_Yield() run A thread’s life ends when the9 “run” function exits
  10. 10. Critical and Unscheduled Regions Critical regions disables all VDK_PopCriticalRegion() interrupts and context VDK_PopNestedCriticalRegions() switches VDK_PopNestedUnscheduled Use with discretion to perform Regions() actions that cannot be VDK_PopUnscheduledRegion() interrupted VDK_PushCriticalRegion() Typical used in test-and-set or read-modify-write style VDK_PushUnscheduledRegion() operations Unscheduled regions are less drastic, disabling the VDK context switch only Other interrupts are allowed to continue10
  11. 11. Semaphores (1) A facility for coordination VDK_CreateSemaphore() between threads or from an ISR VDK_DestroySemaphore() to a thread VDK_MakePeriodic() A semaphore can be used to a VDK_PendSemaphore() control access to a shared VDK_PostSemaphore() resource in threads VDK_RemovePeriodic() For example, protecting a buffer from simultaneous read and write11
  12. 12. Semaphores (2) A facility for coordination VDK_CreateSemaphore() between threads or from an ISR VDK_DestroySemaphore() to a thread VDK_MakePeriodic() A semaphore can be used to a VDK_PendSemaphore() control access to a shared resource in threads VDK_PostSemaphore() For example, protecting a buffer VDK_RemovePeriodic() from simultaneous read and write Many semaphores are of a Boolean nature (yes or no), but they can also be used to allow multiple access, “counting semaphores” Semaphores may be periodically and automatically posted by the VDK12
  13. 13. Messages A message is a targeted VDK_CreateMessage() transmission from one VDK_DestroyMessage() thread to another VDK_ForwardMessage() Message type VDK_FreeMessagePayload() Payload address and size VDK_GetMessageDetails() An arbitrary amount of information VDK_GetMessagePayload() of any type may be passed VDK_GetMessageReceiveInfo() between two threads VDK_MessageAvailable() Facilities for multi- VDK_PendMessage() core/processor messaging VDK_PostMessage() exist VDK_SetMessagePayload()13
  14. 14. On-line Demo:Building and Debugging VDK Projects Project Window/VDK tab Thread creation template VDK Status Window VDK History Window14
  15. 15. Sizes and Timings15
  16. 16. VDK Static Memory FootprintsApplication Code DataOne C-language thread, no API calls 5384 1120Two C-language threads, no API calls 5584 1208Two threads, usage of a static semaphore 6916 1252Add critical regions 7068 1252Add message passing 9260 1292Add a history window of 512 events and full 13304 9536instrumentation (debugging scenario) Size of VDK libraries’ contributions, not entire application. Measured under VisualDSP++ 4.5 (base release) with dead code/data elimination enabled. Sizes are in bytes.16
  17. 17. Cycle Counts for Performance-SensitiveActivitiesEvent CyclesBoot (from reset vector to first instruction of highest 15,311priority thread’s run function)Tick, no change of thread 67Tick, change of thread 722Post semaphore, no change of thread 76Post semaphore, change of thread 286Push a critical region, increment a global variable, pop 199Create a new thread, no change of thread 2,352 Measurements with entire application in internal memory. The application contains five running threads. Measured with VisualDSP++ 4.5 (base release). Processor was an ADSP-BF533 r0.5.17
  18. 18. Conclusion VDK is provided at no additional cost with VisualDSP++ Designed to be a robust solution for light-weight requirements Many commercial RTOS’s are also available for Blackfin Basic facilities include threads, prioritization, semaphores, messaging, and critical and unscheduled regions Other facilities are available and documented as part of VisualDSP++ VDK is well integrated into the VisualDSP++ user interface, with facilities to configure VDK, generate template thread code, and display status and history while debugging your application18
  19. 19. For Additional Information Review other BOLD topics (especially System Services and drivers) Take a test drive of VisualDSP++ and/or get an EZ-KIT Lite http://www.analog.com/processors/VisualDSP/testDrive.html Examples demonstrating all major features …BlackfinExamplesNo Hardware RequiredVDK Consult detailed documentation within VisualDSP++ Also available for download http://www.analog.com/processors/blackfin/technicalLibrary/manuals Find third party RTOS options http://dspcollaborative.analog.com/developers/DSP_ThirdParty_Search_Home.asp For questions, use the “Ask a Question” button19

×