There are validated Ada compilers available for DSP chips and in
Tartan's case they have been fielded and used in many programs
(successfully) for many years.
When Tartan began selling Ada Development Systems for Texas
Instruments 320C30 digital signal processor in 1990, there were quite
a few skeptics in the real-time community. Luckily, TI had realized
back in 1988 when Tartan began this work under contract with TI that
the real-time embedded DSP community had two major needs:
1. real-time performance
2. see number 1
Therefore, TI and Tartan made real-time performance the key acceptance
criteria in the technical specifications. To make a long story short,
Tartan's only skeptics in 1994 are users who have not developed
real-time DSP applications using Tartan Ada for the C3x (C30 and C31).
TI and Tartan released an Ada development system for the C40 in 1992
and are developing Ada for the C50 to be validated and released late
this calendar year.
Tartan has pioneered Ada development for DSP processors. Tartan was
uniquely situated to do so for three reasons: Tartan people have been
involved with Ada since its inception; Tartan has an extensive
background in the code optimization techniques required for real-time
performance; and Tartan has a long-standing relationship with Texas
Instruments, the leading DSP processor manufacturer.
Tartan's development of an Ada compiler for the TI 320C30 digital
signal processor changed the waiver situation with respect to DSP
applications. The availability of an Ada compiler (that, in fact,
often outperforms C and assembly) has become a reason for the denial
of waivers for DSP applications.
Tartan grew out of research at Carnegie Mellon University in the
production of highly optimized application code. Tartan's founders
had developed techniques to customize optimizations to particular
architectures, to segregate optimizations as individual compiler
components, and to combine them in each compiler in the manner most
suited for the target machine's architecture. To this day, Tartan
continues to develop optimization technology as a major focus.
Beyond optimizations applied automatically, there are a few built-in
target architecture features that can improve code performance but
must be specifically accessed by the application developer. One
example is the unique addressing modes available on the C3x and C40
processors. Tartan lets users access these important hardware
features such as circular addressing and bit-reversed addressing
through an Ada interface called Package INTRINSICS. There is also a
group of functions in Package INTRINSICS that allows the user access
to logical instructions on the DSPs. Use of Package INTRINSICS
generates very efficient assembly code due to the fact that the
expertise is built directly into the code generation technology of an
Tartan Ada has been chosen for an increasing number (up to three
digits now) of DSP projects. Performance results on these projects
verify the real-time performance claims made above. The following are
brief descriptions of several instances where Ada has exceeded
performance specifications or met stringent requirements more
satisfactorily than C or assembly language. Other advantages of the
Tartan Ada system are also described by these Tartan customers.
Ada Exceeds Performance Specifications
Tartan's Ada C30 compiler, runtime system and AdaScope debugger are
key components of Alliant Techsystems Aladdin Processor--a
multi-processor C30 and C31 DSP configuration. The Aladdin program
required performance of 1 gigaflop of floating-point throughput. This
throughput spec was exceeded with a performance of 2 gigaflops of
32-bit floating-point throughput plus 1 gigaflop of 16-bit fixed-point
throughput in the same package. The delayed branch optimizations and
Tartan's math routines were cited as the reason for this performance.
In addition, the runtime system and AdaScope were particularly important
for the Alliant project. Because the runtime is very compact, written in
Ada, and customizable, Alliant was able to extend it for their multi-
processor needs and rebuild the runtime kernel and their extensions
together to avoid memory conflicts.
Ada Beats C
Two documented cases of customers who have found that Tartan Ada
outperforms C compilers have been brought to Tartan's attention.
1. The Army's Wide Area Mine (WAM) project on the C30 includes target
identification and processing, signal processing of acoustic signals,
and control functions. The Ada implementation provided sufficient
execution speed for mission-critical portions of the code that must
execute in less than 500 microseconds. For some functions for which C
code had also been written, comparisons indicated that the Ada code
was faster than the C code.
The Ada code was also able to meet stringent memory constraints of two
types. One was the requirement that application code be small enough
to leave 50% reserve capacity in memory.
The other was the ability to make optimal use of a mix of memory that
included types with differing wait states. When the user specified a
wait state value for each module, the compiler produced the fastest
possible code for that memory, and the linker properly assigned it to
the correct memory type. This capability allowed the application to
accomplish three memory fetches when using the DSP delayed branch in
zero wait state portion of the memory mix rather than the single
memory fetch that can be accomplished in the three wait state memory.
2. Ada outperformed C on a complex system of multiple 'C40 processors
for Itek Optical Systems, a division of Litton Industries. What was
important to Itek was latency--the delay between receipt of incoming
data and output of its result. A required reserve capacity of 57% in
the system permitted a latency of less than half of the maximum
capacity of the configuration--that is, it permitted a processing time
for any algorithm of only 43% of the time allowed by the data input
For one of the benchmarks used by Itek, C code provided a 64% reserve,
but Ada did even better with a 65% reserve. For a second benchmark,
however, C code failed to execute fast enough, providing only a 54.5%
reserve. Tartan Ada provided a 63% reserve for that benchmark again
due to code optimization and Tartan's fast math functions.
Ada Rivals Assembly
We know that Ada rivals assembly in some situations. We have one
outstanding instance of Ada doing better than assembly on a TI DSP.
It's described in P.K. Lawlis and T.W. Elam, "Ada Outperforms
Assembly: A Case Study." Proceedings of TRI-Ada, 1992.
The paper abstract reads "With the intent of getting an Ada waiver, a
defense contractor wrote a portion of its software in Ada to prove
that Ada could not produce real-time code. The expectation was that
the resultant machine code would be too large and too slow to be
effective for a communications application. However, the opposite was
verified. With only minor source code variations, one version of the
compiled code was much smaller while executing at approximately the
same speed, and a second version was approximately the same size but
much faster than the corresponding assembly code."
Later in the paper, to explain these results, the authors write "A
skilled, experienced assembly language programmer may know many of the
heuristics incorporated into a mature compiler, but not all of them.
A group of assembly language programmers could possibly (though not
likely) even know all that are implemented in a mature compiler
product. However, a compiler can try a large number of optimizing
techniques in a short period of time. Most of these techniques
interact, so optimization is iterated until there is no further
change. By comparison, a human must spend much time on even one
optimization technique. Hence, there is a practical limit to the
amount of optimizing that can be done by hand."
Tartan believes that Ada has significant unrealized potential for
application development for DSP processors in both the military and
commercial product sectors.
John Stare (email@example.com)
Digital Signal Processors
Embedded Systems Programming, December 1993, "Using Ada with Embedded
DSPs," by Erich Pfeiffer and Jason Disch.
DSP Applications, April 1993, "Optimizing Ada Compilers for DSP Avionics
Applications," by Timothy Birus and David Syiek.