From: Tucker Taft <stt@averstar.com>
Subject: Re: minimal hardware for ada (newbie)
Date: 1999/04/13
Date: 1999-04-13T00:00:00+00:00 [thread overview]
Message-ID: <3713B19B.21D6B228@averstar.com> (raw)
In-Reply-To: 370F8179.BF571FDB@icon.fi
Niklas Holsti wrote:
>
> Tucker Taft wrote:
> >
> > We have developed (and recently validated) a version of our
> > AdaMagic technology which uses optimized ANSI C as its intermediate
> > representation. One of the reasons was to allow a programming team to
> > write their source code in Ada, while relying only on the availability
> > of an ANSI C compiler for their chosen target. We also have
> > a version of the Ada run-time that at the lowest level depends
> > only on routines included in the standard ANSI C run-time.
>
> I'm working on an I8051 program to control a space-based instrument,
> and have again experienced the pain of working in C. Using
> AdaMagic-to-C would have been nice, however I think it would
> only be practical if one can make the C code use the typical
> I8051 C extensions to ANSI C, such as controlling the memory space
> for each variable. In Keil C51, for example, one of the new
> keywords 'data', 'idata', 'pdata' or 'xdata' is placed in the
> variable declaration between the type-id and the variable-id
> to determine the memory space.
>
> While one could implement one's own postprocessor to mutilate the
> C code in this way, it would be simpler and safer to make the
> necessary annotations in the Ada code, perhaps as pragmas on
> the variables or types. Does AdaMagic provide anything like this?
Not currently, though using pragma "Convention" for this might
make sense. We have looked into something like this for a digital
signal processor which has two memory spaces. Because we are
generating C source as the intermediate, it is a relatively small
effort to add this kind of thing. By constrast, if we were generating
machine code directly, it would obviously be a big deal to add support
for multiple memory spaces.
> Moreover, given the limited architecture of the I8051, it seems
> unlikely that a run-time using only ANSI C routines could perform
> within an order of magnitude of a kernel designed for the
> I8051. Any data on this? For example, how does your ANSI-C-based
> run-time handle the stack when switching tasks?
The run-time is in two layers, the upper layer is written
in Ada, and is fully portable between targets. The lower layer
is also mostly written in Ada, with a bit of assembler or
C thrown in, and multiple versions exist, depending on the underlying
kernel. The "pure C" version makes use of setjmp/longjmp for
task stack switching. Other versions use the thread primitives provided
by the underlying kernel.
> TIA
>
> Niklas Holsti
> Working at but not speaking for Space Systems Finland Ltd.
--
-Tucker Taft stt@averstar.com http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.) Burlington, MA USA
next prev parent reply other threads:[~1999-04-13 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-08 0:00 minimal hardware for ada (newbie) Michael Viotto
1999-04-09 0:00 ` Tucker Taft
1999-04-10 0:00 ` Niklas Holsti
1999-04-13 0:00 ` Tucker Taft [this message]
1999-04-09 0:00 ` Tom Moran
1999-04-09 0:00 ` Richard D Riehle
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox