Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

Multi-processing using the array processing language Apl.

Altera_Forum
Honored Contributor II
968 Views

I am keen to use the array processing language Apl as nodes in a multi-processing network. 

I first worked on this in the 1980s/1990s, with the Transputer, on a Helios computer. 

 

In the 80s I was hand-translating Apl to Basic and 6800 assembler, in the 90s to LabVIEW, and at the moment I am having to do it to VHDL. The aim is to make use of Tim Budd's aplc Apl to c translator, which in the 1990s I ported to SGIs and the Dec Alpha, as well as the lowly Atari TT. This has the advantage that in the 19980s/1990s I also added a minimum set of multi-tasking / multi-processor facilities (Julian Timestamp, pipe, spawn, and detailed I/O control) which I believe give it some of the capacity to form multiprocessing nodes : 

http://home.earthlink.net/~swsirlin/aplcc.html (http://home.earthlink.net/~swsirlin/aplcc.html)  

http://www.lab-tools.com/instrumentation/html/dod22.html  

A Pipe has two ends. Using APL in a multiprocess/multiprocessor environment. A proposal for a flexible but easy to use syntax. J.B. Webber. Apl Quad Quote 20, 1, 1-2, Sept 1989. http://doi.acm.org/10.1145/379199.379200 (The proposal and implementation of a software mechanism now used by IBM.)  

 

Now I have had some trouble in compiling the aplc run time library for the Altera devices, I seem to keep picking up more than one library definition for some functions. I regret to say that to get this library to compile I have had to turn off all the multi-tasking facilities, but for the moment simple code does run. I will have to dig and see what the problem is, because when I look at the library files, it all seems to be there. 

 

Anyway, for a very short test, of summing a vector : 

apl running in microapl's aplx : 

V ← ⍳ 9 ⎕ ← V 1 2 3 4 5 6 7 8 9 S ← +/V ⎕ ← S 45 

 

niosii : 

Translated to c and compiled and running on a DE1 : 

1 2 3 4 5 6 7 8 9 45 

 

Here is a simple set of matrix operations in a function "matrix": 

source in aplx: 

 

matrix 'A:' A ← ⍳ 5 A ' ' 'B:' B ← ⍳ 9 B ' ' 'C: inner product:' C ← A ∘.× B C ' ' 'T: transpose:' T ← ⍉ C T ' ' 'O: outer product (matrix multiply):' O ← C +.× T O ' ' 'S: solve matrix:' S ← C ⌹ A S  

 

niosii "media" floating point soft processor, on a terassic de1 development board : 

 

A: 1 2 3 4 5 B: 1 2 3 4 5 6 7 8 9 C: inner product: 1 2 3 4 5 6 7 8 9 2 4 6 8 10 12 14 16 18 3 6 9 12 15 18 21 24 27 4 8 12 16 20 24 28 32 36 5 10 15 20 25 30 35 40 45 T: transpose: 1 2 3 4 5 2 4 6 8 10 3 6 9 12 15 4 8 12 16 20 5 10 15 20 25 6 12 18 24 30 7 14 21 28 35 8 16 24 32 40 9 18 27 36 45 O: outer product (matrix multiply): 285 570 855 1140 1425 570 1140 1710 2280 2850 855 1710 2565 3420 4275 1140 2280 3420 4560 5700 1425 2850 4275 5700 7125 S: solve matrix: 1 2 3 4 5 6 7 8 9 

 

I am currently trying to get ./configure to work from inside Eclipse. 

Then look at communications. 

If anyone else is interested in joining such a project, please do contact me. 

Cheers, 

Beau Webber
0 Kudos
0 Replies
Reply