Tlaloc eXecutor TX_RUN

Hi.all

The TLALOC compiler structure is a very interesting object of study. The fasmg backend is very versatile.
I produced a codi_SX.finc to study the static behaviour of the LLIR stack machine and another codi_TX.finc which assembled gives an emulator friendly simple “txexe” binary format. Then TX_RUN, an emulator written in Ada, executes the txexe with statistics extraction on instructions frequencies, reducible instructions pairs, and so on.
The aim is to study the type of hardware stack machine adapted to TLALOC. Is it a Forth type or a Burroughs type stack machine ?

3 Likes

Is it a Forth type or a Burroughs type stack machine ?

Koopman’s papers might be interesting here: https://users.ece.cmu.edu/\~koopman/pubs.html

I haven’t read his works in a while, but when I was working on stack machines more closely, it was helpful for understanding. Things like SECD machines might also be useful too. SLang, POP-11, &c all have usable approaches that could be useful for ideation underneath. Happy to chat more about it as well.

Hi lojikil !

I read Koopman years ago. I found it very interesting. But most Forth stack machines are very simple designs. This is their appeal, but compared to today’s processor performance standards they are “naïve” implementations.

With tx_run I explore single or double flux executions with stack renaming, branch predictions and so on of a LLIR hardware support specification following the codi structure.

With tests on a 7 G instructions compilation by tx_run interpreter supervised TLALOC.txexe of the biggest compiler package (expander-expressions.adb), it seems a 5 IPC level of performance with a mean of 2.5 byte per instruction is achievable.

Hi.all !

I used TX_RUN and examined the possibility of a modern stack processor designed for the Ada 83 LLIR of TLALOC.

When using commercial platforms, you are never really in control of what is executed. Even when targeting UEFI, many things execute in your back. Bare metal on modern SBC or processors is not real bare metal, sometimes hidden ancillary processors execute software you are not even aware of. I dislike this. The aim of Ada 83/TLALOC was to have a complete control over compilation with one of the best languages ever conceived.

Many people believe C is the top of execution performance, I would like to know if very high performance can be reached with full Ada 83.

So I wrote specifications, binary coding and began to test TAHX (Tlaloc Ada Hardware eXecutor). A stack oriented ISA with opcode predictible variable format executed in a stack processor with 32 instructions fetch block, 8 OoO issues, 128 rename registers, 256 inflight instructions. The instruction flow would be around 2.4 byte/instruction. Such a machine should obtain at least a factor of 10 compared to the 0,22 LLIR IPC on an Intel i7 11800H.

The biggest package expander-expressions.adb of TLALOC is compiled in 850 msec with T1 (gnat TLALOC), 5,4 sec with the TLALOC LLIR implemented in codi_x86_64 (mean 4.5 cycles per LLIR instruction). It would be interesting to show that an unoptimized TLALOC on a 2 GHz TAHX with ~2.5 IPC could compete with TLALOC gnat on an i7 Intel core.

1 Like

Hi.all !

Some news of progress on compiling Ada 83 for a real stack machine target TAHX.

People interested in the study are referred to :

The tx_run program now knows 3 output formats generated through fasmg with 3 different codi (SX, TX, HX) . The HX format is an executable format for the machine described in :

https://git.sr.ht/~vincent_morin/Ada_83_TLALOC_eXecutor/tree/main/item/LLIR_hardware_support_V3.txt

Comments are welcome on this machine which is different from Forth stack machines and conceptually closer to Burroughs 5000 e-mode (which was suited to Algol).

The whole compiler has been translated and executed successfully in this format which is very compact (TLALOC.hxexe is less than 2 Mb). The execs and the codis are on Ada_83_TLALOC: Full MIL-STD-1815 Ada 83 compiler modern implementation with fasmg backend

The statistics extracted allow for a vhdl definition of a real OoO machine which is underway in another project.

1 Like