Several enhancements have been added to VisualDSP++ 5.0 in Update 9. This FAQ provides an overview for the new features. For full details of the changes in VisualDSP++ 5.0 Update 9 please refer to the Release Note, which is available from the Updates page on our website.
The Blackfin and SHARC compilers and libraries have improvements in the following areas:
- C/C++ Standard compliance.
- Fractional (fixed-point) type support
- Stack Overflow Detection.
- New diagnostic remarks
The Blackfin compiler and libraries have improvements in the following areas:
- Floating point emulation
- CPLB event handling
- 40-bit accumulator support
- Blackfin Libdsp fract32 support
The SHARC compiler and libraries have improvements in the following area:
- 64-bit integer support
VDK has improvements in the following areas:
- User-modifiable exception handlers for Blackfin projects.
- More flexible CreateThread() APIs for SHARC and Blackfin.
What are the improvements in C/C++ Standard compliance?
The Blackfin and SHARC compilers default to the "C89" dialect (ISO/IEC 9899:1990 C standard), but now also support the "C99" dialect (ISO/IEC 9899:1999 C standard), as a freestanding implementation. You can enable the C99 mode via the -c99 switch. The compilers also support the "C++ 2003" dialect of C++ (ISO/IEC 14822:2003 C++ standard), as a freestanding implementation.
Chapter 1 of the compiler manuals now include a section on Language Standards Conformance, which provides guidance on how to compile applications in a more strictly conforming manner.
What are the improvements to fractional (fixed-point) support?
In C89 and C99 modes, the Blackfin and SHARC compilers implement the fixed-point fractional data type fract as a default type, as defined by TR18037. The Blackfin compiler also implements the fixed-point accum data type as a default type. Whereas previous releases of VisualDSP++ supported fractional operations through built-in functions and the fract16 or fract32 typedefs, or through the C++ fract and shortfract classes, VisualDSP++ 5.0 Update 9 supports default fixed-point types at the same level as other default types, such as int. You do not need to use built-in functions to perform arithmetic operations such as addition or multiplication; the usual infix operators are sufficient.
The non-default types are still supported: fract16 and fract32 still work as before. Moreover, the Blackfin library has been greatly expanded, with most of the fract16 functions now having corresponding fract32 equivalents. Plus, the Blackfin library supports 16- and 32-bit versions of these functions using the new default fractional types, as well.
For further details, refer to Using default Fixed-Point Types in Chapter 1 of the compiler manual, and the following entry on the EngineerZone Spotlight: default Fixed-Point Types in VisualDSP++ 5.0
What is Stack Overflow Detection?
The SHARC and Blackfin tools provide support for detecting when an application's stack increases beyond its allocated size. This greatly enhances the debugging experience, as it means a pernicious issue can be detected immediately, before data corruption leads to hard-to-resolve second-order effects.
The SHARC and Blackfin tools use different facilities to provide this support.
The SHARC run-time library makes use of the CB7 circular buffer interrupt to detect when the stack would extend beyond its bounds. This facility is enabled by default, and does not need specific selection.
The Blackfin compiler provides the -stack-detect switch. When you specify this switch, the compiler instruments the generated code with additional checks, to ensure that when the stack size increases, it remains within the allocated bounds.
VDK support is provided for multi-threaded applications, for both SHARC and Blackfin processors. To enable stack overflow detection in VDK Blackfin projects, a change in the application's LDF is required.
For more information, see Stack Overflow Detection in Chapter 2 of the compiler manual and the Stack Overflow Detection sections in the Processor-specific Appendix of the VDK manual.
What is new regarding Compiler diagnostic messages?
Many new diagnostics messages have been added to the VisualDSP++ Blackfin and SHARC compiler. These have mostly been added as remarks (rather than warnings or errors) so will not be seen by default. All of these new messages can be suppressed or raised to warnings or errors in the same way as with other messages using the –W switch or #pragma diag.
A complete list of new diagnostic messages is available in the VisualDSP++ 5.0 Update 9 Release Note.
In prior VisualDSP++ releases, there were various compiler diagnostic messages that could not be controlled using #pragma diag. The Blackfin and SHARC compilers now have the ability to suppress all diagnostics using #pragma diag.
What are the floating-point improvements?
The Blackfin run-time libraries provide support routines for floating-point emulation. The addition, subtraction, multiplication and comparison routines for the default set of IEEE single-precision emulation routines (corresponding to the switch –fast-fp) have undergone considerable improvements to enhance their performance. Improvements to the accuracy of results may also be seen for some inputs.
What are the CPLB event handling improvements?
The Blackfin run-time library includes routines for CPLB management, including replacement of Instruction CPLBs and Data CPLBs, in response to ICPLB Miss or DCPLB Miss events. These routines have been enhanced to provide a faster replacement process.
What is the 40-bit accumulator support?
The Blackfin compiler now provides new built-in functions for accessing and manipulating the processor's 40-bit accumulators, using the new non-default acc40 data type. For more details, see Full-Precision Accumulator Built-in Functions, in Chapter 1 of the Blackfin compiler manual.
What new support is in Libdsp?
The DSP library for Blackfin (libdsp) has added a set of general purpose DSP library functions that operate on 32-bit fixed-point data (fract32). These new functions have similar prototypes and functionality as the fract16 functions. The library also includes a function that computes the magnitude of an FFT for the fract16 and the fract32 types. In addition, the set of matrix transpose functions has been expanded to include a set of functions for the complex data types. Please see chapter 4 “DSP Run-Time Library” in the Blackfin C/C++ Compiler and Library manual for more information.
What is the 64-bit integer support?
The SHARC compiler and libraries now provide support for the 64-bit integer types long long and unsigned long long, as emulated types. The libraries contain additional functions to support these new types, such as llabs and llmax, and the fprintf and fscanf families of functions have been enhanced to support the new types.
What is the support for user-modifiable exception handlers?
In older versions of VDK, an assembly exception handler was added to all new Blackfin projects. When an exception which was not recognized was raised, its default behavior was to return. VDK no longer adds the assembly exception handler to all new projects. Instead, the default behavior when an unrecognized exception is raised, is to go to KernelPanic(). If an application requires different handling of exceptions, then it can add a user exception handler from the Kernel tab written in either assembly, C or C++.
What is the more flexible VDK CreateThread() API?
For SHARC and Blackfin processors, VDK now includes CreateThreadEx2() which allows applications to specify the memory location that should be used for the thread stack.
For more information see the API description in the API reference section of the VDK manual.
For full details of the changes in VisualDSP++ 5.0 Update 9 please refere to the Release Note, which is available from the Updates page on our website