[Oberon] Creating ROM code from Oberon for RISC5

Paul Reed paulreed at paddedcell.com
Thu Jan 15 16:46:35 CET 2015


Hi Dave,

> we're using a different Flash for memory storage. Therefore, I want to
> create different boot load code in the FPGA.
...
> When I compile using "MODULE*" I get an object file with the special
> start up code that the compiler adds.     Project Oberon Chapter 14
> talks about the process of creating the boot loader and the steps, but
> I'm having trouble finding some of the modules referenced and would like
> more details on how it was done.

This has been discussed on the list before - each implementation will have
lots of tedious specifics which are not of general interest, and the
cross-tools are individual not only to the implementation but also the
host set-up.

(A simple example of this, is that we originally had elaborate scripts
which used the Xilinx utility data2mem to patch an existing bitfile with
the RISC opcodes, to save re-synthesising the processor when trying
different ROM code.  I chose not to provide and document these for Windows
and Linux, but instead used the MUCH simpler PROM.v $readmemh command -
which, incidentally, uses almost-but-not-quite the same format as
data2mem.  I really, really, don't regret that decision.)


> How is an Oberon RISC object file (.rsc) compiled with "MODULE*"
> converted to a Verilog ".mem" file for loading into the FPGA?

The opcodes are output as hex ASCII, rather than binary, that's all.  This
can be done easily either by reading the instructions out of the object
file after a .rsc file is created, or by outputting the text as the
compiler generates them (or after it has finished with no errors).

I have discussed various alternative general bootstrapping methods on the
list before; you haven't really provided enough detailed information about
what you are doing for me to make any more specific suggestions.  Others
on the list may be able to help with descriptions of the tools they have
developed.

One thing which makes it all a lot easier (especially for those who don't
have a Spartan-3 board) is that a cross-compiler is not even necessary
anymore, since Peter de Wachter kindly and generously provided his
excellent portable RISC emulator.

I hope that helps but feel free to ask again if you get stuck!

Cheers,
Paul





More information about the Oberon mailing list