[Oberon] FPGA - Files.ReadBytes(), Files.WriteBytes()

Jörg joerg.straube at iaeth.ch
Mon Aug 20 19:39:39 CEST 2018


Tomas

If you are interested to improve ReadBytes() your code could start with something like this:

IF r.bpos MOD 4 # 0 THEN
	i := 0; WHILE i < n DO ReadBytes(r, x[i]); INC(i) END (* copy single bytes *)
ELSE 
	(* four times faster by using SYSTEM.COPY() *)
END

br
Jörg

Am 20.08.18, 14:03 schrieb "Oberon im Auftrag von Chris Burrows" <oberon-bounces at lists.inf.ethz.ch im Auftrag von chris at cfbsoftware.com>:

> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Tomas Kral
> Sent: Monday, 20 August 2018 6:47 PM
> To: Oberon at lists.inf.ethz.ch
> Subject: [Oberon] FPGA - Files.ReadBytes(), Files.WriteBytes()
> 
> Files.Mod has procedures for reading/writing a block of bytes,
> bytewise.
> 
> The comment suggests improving the code further. Any hints to improve
> the code?

   Look at the corresponding code in the 1994 version of Project Oberon. You
   can download it from:

   ftp://ftp.ethoberon.ethz.ch/Oberon/Books/ProjectOberon/

   Each function is about 25-30 lines long and at first glance looks fairly
   inscrutable. I don't know how compatible it is with Project Oberon but you
   should get some ideas about what is possible. You should also get a better
   understanding why it hasn't been 'improved' yet. 

   Regards,
   Chris Burrows

   CFB Software
   http://www.astrobe.com/RISC5



   --
   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