[Oberon] Non Oberon code in Oberon

Jörg Straube joerg.straube at iaeth.ch
Wed Jan 20 08:04:02 CET 2016


Hi all

If you ever have to go that low level that a BIT is your best friend (eg in the case you program a device driver, directly interacting with HW pins like interrupt masks or so), I would use the type SET in Oberon. 
Each element in a SET occupies one BIT by definition
Set several bits:  s := {0, 5, 7};  or s := s + {0, 5, 7};
Set one bit            INCL(s, 4);  or   s := s + {4};
Reset one bit       EXCL(s, 3);  or   s := s - {3};
Test a bit               IF 3 IN s THEN (* bit 3 in the set "s" is set *)
Test several bits IF s * {5, 7} = {} THEN (* either bit 5 or bit 7 in "s" is set *)

For fans of HW and FPGA I can understand the wish to unify Oberon and Lola (or VHDL) but this was not the aim of Project Oberon in the first place. Oberon started with the idea to design a lean high level language that is easily mappable to a CPU to make the compiler construction easy. Unfortunately, today's CPUs have at least two properties not ideally suited for easy compiler construction: the instruction set is huge and complex and the instruction set is not "regular" ( =you can not apply all operations on all registers)
In absence of such an easy, regular CPU NW designed its own Oberon-CPU. The costs to implement his CPU in eg ASIC is obviously forbiddingly high. So he implemented his Oberon-CPU (=RISC5) in FPGA.
Wojtek's idea to apply Oberon also to that level of HW design is tempting but was not the foremost idea of Oberon. Important concepts like eg "clock" is missing.

br, Jörg

Am 20.01.2016 um 00:24 schrieb <skulski at pas.rochester.edu> <skulski at pas.rochester.edu>:

>> BOOLEAN consumes one byte
> 
> In the FPGA world you would want BOOL to be one bit. Furthermore, you
> would want logic expressions to get translated to hardware (that is VHDL
> or Verilog) and then be compiled to HW modules that would act as
> coprocessors. Such a translation would be optional of course.
> 
> It is not a pipedream because Xilinx is doing just that with their High
> Level Synthesis.
> 
> I am throwing this in for an eager grad student as a worthy project. I
> think that NW once had a dream of unifying Oberon with LOLA, but it was
> too far ahead of its time.
> 
> Wojtek
> ________________________________________
> From: Oberon [oberon-bounces at lists.inf.ethz.ch] on behalf of Douglas G.
> Danforth [danforth at greenwoodfarm.com]
> Sent: Tuesday, January 19, 2016 5:48 PM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] Non Oberon code in Oberon
> 
>> On 1/19/2016 12:41 PM, Lars O wrote:
>>  Wait, there's BOOLEAN? hmm..
> Yes, but BOOLEAN consumes one byte.
> 
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2376 bytes
Desc: not available
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20160120/3b9830ea/attachment.p7s>


More information about the Oberon mailing list