JTC1/SC22/WG14 N902

Subject: Text for an NP on Embedded extensions for C.
Source: Willem Wakker (ACE, the Netherlands)
Status: Discussed at the October 1999 WG14 meeting.

1. Title

Extensions for the programming language C to support embedded processors.

2. Scope

To define extensions to the syntax and semantics of the C language (as defined in ISO/IEC 9899:1999) that allow the development of portable C programs that make optimal use of the characteristics of processors (such as Digital Signal Processors) used in embedded systems.

3. Purpose and Justification

In the fast growing market of embedded systems 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 embedded systems get more complex (and hence are difficult to maintain in assembly language) and the different types of embedded systems processors have a decreasing lifespan (which implies more frequent re-adapting of the applications to the new instruction set).
Various technical areas have been identified where functionality offered by processors (such as DSPs) that are used in embedded systems cannot easily be exploited by applications written in C. Examples are fixed-point operations, usage of different memory spaces, low level I/O operations and others. The current proposal addresses only a few of these technical areas; WG14 might propose further work on the other issues.
This NP proposes 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 fixed-point operations offered by embedded processors while ensuring portability of implemented algorithms. Some other issues (like the usage of different memory spaces) will be studied; it is not yet clear whether this functionality is suitable for specification in the proposed Technical Report, or if the topic will be dealt with in a future TR (under another NP).
The main area of work will the definition of the syntax and semantics of fixed-point 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 fixed-point arithmetic related issues will be addressed. Where possible, issues that arise from the fixed-point arithmetic (like saturation) will be formulated in a general way so that they can be applied to non fixed-point artithmetic as well. Although embedded processors typically work with binary (radix=2) fixed-point datatypes, the inclusion of decimal (radix=10) fixed-point datatypes or the inclusion of a generalized fixed-point datatype (like the Scaled datatype as defined in the Language-independent datatypes standard) will be considered. Prior art (for instance as described in WG14 N854) will be taken into account while developing the specifications.
Other technical 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 embedded processors. 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, with a supporting Rationale will be developed for this project.

5. Relevant documents to be considered

  • ISO/IEC 9899:1999 - 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 embedded 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.