[Oberon] ORX.WriteFile

Joerg joerg.straube at iaeth.ch
Thu Oct 17 11:35:20 CEST 2019


Interesting approach to take the decode output instead of the .rsc file directly 😊
But as I said, there are loads of ways to build your FPGA Oberon.

Jörg

-----Original Message-----
From: Oberon <oberon-bounces at lists.inf.ethz.ch> On Behalf Of Tomas Kral
Sent: Thursday, October 17, 2019 10:50 AM
To: oberon at lists.inf.ethz.ch
Subject: Re: [Oberon] ORX.WriteFile

Hi All,

> You can build your FPGA Oberon system on any system

Linux wise...

I wish to catch up with the post, as I was away from Oberon scene for quite some time.

As part the exercise of boot loading, I coded this shell script, it takes the output of ORTool.Decode [object.rsc], and makes PROM.mem output of it.

#!/bin/sh
# ORX.WriteFile
# (c)tcat 18.10.2017
# USAGE: orx [decode] > [prom.mem]

# echo -n > prom.mem
i=0; while read hex; do
  hex=$( echo $hex | sed s'/[ ]*[0-9]*[ \t]*\([0-9A-F]*\).*/\1/' )
  echo $hex # >> prom.mem
  i=$((i+1))
done < $1

j=$i; while [ $j -lt 512 ]; do
  echo 00000000 # >> prom.mem
  j=$((j+1))
done

# eof

E.G. it just outputs this,

E7000000
40000000
A0D00008
80D00008
5100FFC4
A0100000
400003E8
A0D00000
400003E8
A0D00004
...
00000000
00000000

0-padding to 512 entries


>From this rsc decode input

   0 E7000000	B       0
   1 40000000	MOV R0 R0       0
   2 A0D00008	STW  R0 SB       8
   3 80D00008	LDW R0 SB       8
   4 5100FFC4	MOV R1 R0     -60
   5 A0100000	STW  R0 R1       0
   6 400003E8	MOV R0 R0    1000
   7 A0D00000	STW  R0 SB       0
   8 400003E8	MOV R0 R0    1000
   9 A0D00004	STW  R0 SB       4
  10 80D00004	LDW R0 SB       4
  11 40090001	SUB R0 R0       1
  12 A0D00004	STW  R0 SB       4
  13 80D00004	LDW R0 SB       4
  14 40090000	SUB R0 R0       0
  15 E9FFFFFA	BNE       -6
  16 80D00000	LDW R0 SB       0
  17 40090001	SUB R0 R0       1
  18 A0D00000	STW  R0 SB       0
  19 80D00000	LDW R0 SB       0
  20 40090000	SUB R0 R0       0
  21 E9FFFFF2	BNE      -14
  22 80D00008	LDW R0 SB       8
  23 40080001	ADD R0 R0       1
  24 A0D00008	STW  R0 SB       8
  25 E7FFFFE9	B     -23
  26 40000000	MOV R0 R0       0
  27 C7000000	B R0

Later I put some of the build commands to exiting ORTool.Mod, naming commands differently to PO2013.

MODULE ORTool;  (*NW 18.2.2013*)
...
(*2017 TK added*)
  PROCEDURE Boot*; (*create boot file from object file*)
  PROCEDURE Prom*; (*create PROM mem file from object file*)
  PROCEDURE StoreBoot*; (*store SD boot area to Boot.bin file*)
  PROCEDURE Limits*; (*SD boot Limits*)
  PROCEDURE InitBoot*; (*init SD boot area with Modules.bin file*)

I use Andreas' ORL.Link tool to create inner core => `Modules.bin'

This also allows for booting over serial with user standalone boot files.

E.G.
$ cp Boot[.bin] [serial device=[/dev/ttyUSB1,/dev/ttyS1, etc]]

--
Tomas Kral <thomas.kral at email.cz>
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list