From: darek on
Hi All,
some time ago I have discovered very interesting CPU architecture
developed at Bristol University (some of you still remember
transputers) (http://www.xmos.com/).
The CPU has 4 cores connected via an internal bus and every core can
run up to 8 real-time threads per core
(http://www.xmos.com/technology/silicon-technology). An internal clock
@100MHz gives time resolution of 10ns.

More about the architecture can be found here: http://www.xmos.com/support/documentation
..

Well, I could not resist and I got this evaluation board (https://
www.xmos.com/products/development-kits/xc-2-ethernet-kit).

The company provides the whole set of development tools (https://
www.xmos.com/technology/design-tools) at no cost, and the tool chain
is GNU based (there is also an extended C compiler that supports
allocation of tasks at the core level).
I am willing to dedicate some of my free time to try to port Ada
compiler to this platform.
Some thing, however, are not quite clear to my. For example:
1. How to distribute tasks between cores ? It is responsibility of
the Ada run-time or the programmer shall do it explicitly (each core
up to 8 real-time threads) via pragmas (I think, extending the
language definition is not a good idea)?
2. Is it possible to create from publicly available source GNAT code
a system that does not require any OS support (a bare metal solution)?
3. Last but not least. Is this enterprise worth any efforts (nice
hobby project but then ...) ?

I hope, that there would be some wise advices around ....

Cheers,
Darek

P.S. Imagine an Ada program running on this device:
https://www.xmos.com/products/development-kits/xmp-64





From: Ludovic Brenta on
darek <darek.maksim...(a)gmail.com> wrote on comp.lang.ada:
>   1. How to distribute  tasks between cores ? It is responsibility of
> the Ada run-time or the programmer shall do it explicitly (each core
> up to 8 real-time threads) via pragmas (I think, extending the
> language definition is not a good idea)?

I'd think the easiest, as a first step would be to mimic the extended
C they provide and then, maybe, provide for dynamic thread allocation
from within the kernel (see below).

>  2. Is it possible to create from publicly available source GNAT code
> a system that does not require any OS support (a bare metal solution)?

Yes, it is possible. However I think tasking support requires a kernel
such as the OpenRavenscar kernel[1].

[1] http://polaris.dit.upm.es/~ork/

> 3. Last but not least. Is this enterprise worth  any efforts (nice
> hobby project but then ...) ?

I guess that's for you to decide. The experience you gain doing such a
nice hobby project will be very valuable anyway.

--
Ludovic Brenta.
From: Lucretia on
http://www.a-eon.com
From: Colin Paul Gloster on
On Thu, 11 Feb 2010, Ludovic Brenta wrote:

|------------------------------------------------------------------------|
|"darek <darek.maksim...(a)gmail.com> wrote on comp.lang.ada: |
|>   1. How to distribute  tasks between cores ? It is responsibility of |
|> the Ada run-time or the programmer shall do it explicitly (each core |
|> up to 8 real-time threads) via pragmas (I think, extending the |
|> language definition is not a good idea)?" |
|------------------------------------------------------------------------|

If you can accomplish a compiler which will automatically take up all
of the cores, then congratulations. However, it is not unreasonable
for the end users to be required to determine this scheduling. For
example, I often need to run many programs and I have many cores for
them. It often does not matter whether I run them all at onece, one
per core, or one after the other, taking up many cores each time. It
is trivial to efficiently put each on one core each.

|------------------------------------------------------------------------|
|"I'd think the easiest, as a first step would be to mimic the extended |
|C they provide and then, maybe, provide for dynamic thread allocation |
|from within the kernel (see below). |
| |
|>  2. Is it possible to create from publicly available source GNAT code |
|> a system that does not require any OS support (a bare metal solution)?|
| |
|Yes, it is possible. However I think tasking support requires a kernel |
|such as the OpenRavenscar kernel[1]. |
| |
|[1] http://polaris.dit.upm.es/~ork/ |
| |
|[..]" |
|------------------------------------------------------------------------|

Beware of ORK. It had a bug in it which had been fixed in GNAT seven
years earlier. Not to mention the excessive overhead of ORK (as
opposed to RAVENSCAR) for a virtually null program taking up nearly
half of the memory you have (per core or overall, it was not clear
from the product brief what the memory was being quoted for).
From: Colin Paul Gloster on
On Fri, 12 Feb 2010, Lucretia wrote:

|----------------------|
|"http://www.a-eon.com"|
|----------------------|

Luke,

I found simply an uninformative webpage. Please elaborate.

Thanks,
Colin Paul Gloster