[Oberon] FPGA Oberon again

Chris Burrows chris at cfbsoftware.com
Wed Feb 12 11:57:18 CET 2014


> -----Original Message-----
> From: Jan Verhoeven [mailto:jan at verhoeven272.nl]
> Sent: Wednesday, 12 February 2014 5:10 AM
> To: greim at schleibinger.com; ETH Oberon and related systems
> Subject: Re: [Oberon] FPGA Oberon again
> 
> I get the impression that the toolchain is part of the commercial system
that
> was mentioned here last weekend. And giving away the toolchain for free
would
> not be cheered to by potential buyers of the A2 controller.

The two projects have different targets and are developed by different
teams. I am not aware of any commercial relationship association between
them. 

100% of the source code of the Xilinx FPGA ProjectOberon system and the book
with all the documentation on how it works and the bootstrapping process can
be downloaded from Wirth's website. The only bit you have to do yourself is
implement the compiler / linker / loader as a cross compiler on your
preferred Oberon system. Even some of that can be done using the Oberon0
compiler which is extensively documented in the Compiler Construction book
(full source code and book also can be downloaded from Wirth's website). 

ETH Oberon is by far the easiest way to implement the cross compiler - I am
current using the ETH Oberon Plug-in for Windows. I only mentioned BlackBox
and Component Pascal as I get the impression that most active Oberon
developers outside of ETH use one of those systems.  

> 
> > Porting ORP.Mod to BlackBox requires for example to adapt all the
> > Texts.Mod and Files.Mod interfaces.
> 
> I tried it a few years back for Linux. I was porting to the Mocka
> Modula-2 compiler. It's too much work for one person.
> 

What you were attempting to do is something completely different. 'Porting'
is a misleading term for what is required for this project. All you really
need to do is provide 'wrappers' around the host's Files / Texts modules so
that have the same interface as the ETH equivalents. I have implemented
wrapper versions of Texts.Mod and Files.Mod hosted on BlackBox and Component
Pascal and it took less than a day's work for each at most. The source of
the BlackBox Texts wrappers is included with my Pascal to Oberon translator
(P2O) on the Component Pascal Collection website:

  http://www.zinnamturm.eu/

Each wrapper procedure contains a few statements each. The total statement
count is less than 30! 

Additionally you only have to provide wrappers for the procedures that the
FPGA Oberon compiler actually uses. For Files these are:

  Files.Length(F)
  Files.Old(S.s);
  Files.Read(R, ch); 
  Files.ReadByte(R, b);
  Files.ReadInt(R, i); 
  Files.ReadLInt(R, l); 
  Files.ReadNum(R, n); 
  Files.ReadString(R, s);
  Files.Register(F)
  Files.Set(R, F, 0);
  Files.Write(R, ch);
  Files.WriteByte(R, b);
  Files.WriteInt(R, i);
  Files.WriteNum(R, n)
  Files.WriteString(R, s);


For example using BlackBox, Files.ReadInt is:

  PROCEDURE ReadInt*(VAR r: Rider; OUT i: INTEGER);
  BEGIN 
    i := r.r.ReadInt32()
  END ReadInt;

Where:  

  Rider* = POINTER TO RECORD
    r: Stores.Reader;
    ...
    ...

Similarly for GPCP, Files.ReadInt is:

  PROCEDURE ReadInt*(VAR r: Reader; OUT x: INTEGER);
  BEGIN 
    x := r.r.ReadInt32()
  END ReadInt;

Where:

  Rider* = POINTER TO RECORD 
    r: IO.BinaryReader;
    ...
    ...


Regards,
Chris Burrows
CFB Software
Astrobe V5.0: Oberon for ARM Cortex-M3
http://www.astrobe.com





More information about the Oberon mailing list