Is it possible to run C code emulated on GA144?

This company has an interesting processor that runs at incredible speed. Is it possible to emulate C or too little memory?

+4
source share
6 answers

There is a C translator for the SEAforth40 chip (previous version of the GA144 chip)

Presentation: http://www.asu.ru/files/documents/00002990.pdf

+5
source

A first superficial look at the instruction set suggests that "colorForth" can be seen as a simple machine language. Given this, it may be possible to write a C compiler that compiles colorForth as the target instruction set.

Of course, it might be easier to write code in colorForth first.

+2
source

In appearance, if someone writes a compiler that can output machine code (33 instructions, not too complicated), you will not need to emulate C, you can just compile it.

Of course, this would be extremely limited, since it seems that each chip receives a small amount of internal memory (with 64 words, there is not much work). There is an 18-bit memory address port connected to one of the cores, so you can have 256 MB of external RAM, but you can access it only through one of the cores, and then it will need to be transferred to another.

It is possible that different kernels can be used for different functions, but this will complicate the compiler quite a bit.

+1
source

This can be done, but their interpreter must handle parallel tasks, distribute the load, etc. Most likely, it is best to go with their Forth interpreter.

+1
source

Chlorophyll has some ideas of common interest. It also seems to me like C:

We developed Chlorophyll, a synthesis and programming model compiler for GreenArrays GA144, an extremely minimalist low-power spatial architecture requiring fragmentation of the program into fragments of no more than 256 instructions and 64 data words. This processor is 100 times more energy efficient than its competitors, but at present it can only be programmed using a low-level stack language. The Chlorophyll programming model allows programmers to provide human understanding by specifying partial data partitioning and computation. The Chlorophyll compiler relies on synthesis, avoiding the need to develop classical optimization, which can be complex, given the unusual architecture. To scale the synthesis to real problems, we decompose the compilation into smaller sub-tasks of the synthesis - partitioning, and code generation. We show that synthesized programs are no more than 65% slower than highly optimized expert-written programs, and faster than programs created by a heuristic, non-synthesizing version of our compiler.

http://www.eecs.berkeley.edu/~mangpo/www/talks/1311_forthday_handout.pdf

http://www.eecs.berkeley.edu/~nishant/papers/Chlorophyll.pdf

+1
source

You will need to use external memory, but in addition, it is certainly doable according to this white paper by Greg Bailey :

It is not difficult to build a virtual machine that supports C, and there are many people and companies only in the USA for whom the compiler and library for the virtual machine will simply repeat what they did before building such a machine and completing the "port" of the C language. When it was, the GreenArray chip can run any C program that fits into external memory and satisfies any C application requirement that is achieved by the final execution speed.

- excerpt from page 4

He also discusses their implementation of the eForth virtual machine in this article.

0
source

Source: https://habr.com/ru/post/1299077/


All Articles