[Oberon] Fixup documentation; was: Documentation;

peter at easthope.ca peter at easthope.ca
Thu Dec 17 16:10:49 CET 2020

From:	Joerg <joerg.straube at iaeth.ch>
Date:	Thu, 17 Dec 2020 08:58:07 +0100
> The CPU does this as follows: it copies over the 16 bit „im“ to 
> the lower 16 bits of the internal register and fills the upper 16 bits 
> with the v-value found in the instruction.
> This CPU behaviour is coded in Verilog (RISC5.v) as follows:
> assign C1 = q ? {{16{v}}, imm} : C0;


> In the risk architecture you find the following hint: 
> „If v = 1, the link address PC+1 is deposited in register R15.  ...

Encoded in Verilog.(?)

> As I tried to explain in the previous mail, what Andreas mentioned is 
> what the compiler generates. But this is NOT a valid RISC5 instruction 
> at all.  The loader extracts the important information out of this „
> virtual instruction“ ...

OK, thanks.  The distinction of terms, "instruction" vs. "virtual 
instruction" is significant for a novice.  (I had thought of 
"instruction precursor".)  In any case, hunting for the virtual 
instruction in the original documents is a pointless distraction.  The 
virtual instruction should never be referred to as "instruction".

> The used 32 bit coding is an agreement between the conpiler and the 
> loader. Not RISC5.


From:	Andreas Pirklbauer <andreas_pirklbauer at yahoo.com>
Date:	Thu, 17 Dec 2020 11:59:27 +0100
> ... such “instructions” generated at compile time are not 
> actually “real” RISC5 instruction, i.e. they never hit the RISC5 
> processor at execution time.

"Instruction precursor" is the best term I've imagined.

> All this is explained in section 6.3. on p.81 of the book Project Oberon
> at https://people.inf.ethz.ch/wirth/ProjectOberon/PO.System.pdf


>     max mno = 63
>     max pno = 255
>     max disp = 2^14-1 = 16K-1 words
> i.e. this compile-time instruction would not only allow importing
> up to 63 (instead of just 15) modules and exporting up to 255
> procedures, but would also increase the maximum displacement
> between two BL instructions in the fixup chain to 2^14-1 = 16K
> words (instead of 2^12 = 8K words). 

Essential in any plan for a significant expansion of the RISC 5 based 

> See [1] and [2] for some additional variations of this scheme.


> Documentation helps and is essential!

If the wikibook is even a small help to people studying the official 
documents I'll be happy.  Me becoming an expert at this stage of life 
is unrealistic.

Thanks for the help.

                              ... L.

Tel: +1 604 670 0140            Bcc: peter at easthope. ca

More information about the Oberon mailing list