WG14 N889 Subject: Draft text for an NP on DSP extensions for C Source: Willem Wakker (ACE, the Netherlands) Status: For discussion at the October WG14 meeting. Note that the draft text has not yet been approved by the Dutch SC22 committee. 1. Title DSP Extensions for the programming language C. 2. Scope To define extensions to the syntax and semantics of the C language (as defined in ISO/IEC 9899:2000) that allow the development of portable C programs that make optimal use of the characteristics of Digital Signal Processors. 3. Purpose and Justification In the fast growing market of Digital Signal Processors (DSPs) there is an increasing need to write application programs in a high-level language such as C. Basically there are two reasons for this trend: programs for DSPs get more complex (and hence are difficult to maintain in assembly language) and the different types of DSPs have a decreasing lifespan (which implies more frequent re-adapting of the applications to the new instruction set). It is proposed to establish a new project to produce a Technical Report (type 2) in which extensions to the C language are defined that allow programmers to fully exploit the general DSP characteristics while ensuring portability of implemented algorithms. The main area of work will the definition of the syntax and semantics of fixedpoint datatypes within the C typesystem. Both the C aspects (type specifiers, type conversions, constant definitions and the relationship with the standard C datatypes) as well as typical DSP characteristics (like saturation) will be addressed. Although DSPs typically work with binary (radix=2) fixedpoint datatypes, the inclusion of decimal (radix=10) fixedpoint datatypes or the inclusion of a generalized fixedpoint datatype (like the Scaled datatype as defined in the Language-independent datatypes standard) will be considered. Other DSP specific areas that might be addressed (depending on input received) are different memory spaces and the handling of circular buffers. The project also includes the production of the text for a Rationale document (either separate or as part of the project document). Although the proposed extensions will be defined as 'general' (i.e., full and complete) additions to the C standard, the scope of application of the extensions is (at least at this moment) assumed to be limited to DSPs. Hence it is not proposed to define the extensions in an Amendment to the C standard but as a Technical Report type 2, which can at a later stage, and if deemed relevant, be included in the C standard as a new part or (normative of informative) annex. 4. Program of Work A Technical Report Type 2 will be developed for this project. 5. Relevant documents to be considered ISO/IEC 9899:2000 - Programming Language C WG14 N854 - DCP-C: An extension to ISO/IEC 9899:1990 ISO/IEC 11404:1996 - Language-independent datatypes. 6. Cooperation and liaison All ISO/IEC JTC1/SC22 Working groups that have an interest in supporting DSP applications. 7. Preparatory work offered with target date(s) A PDTR document will be ready for registration 24 months after the approval of the project by JTC1.