[Oberon] FPGA - Bit reversal

Skulski, Wojciech skulski at pas.rochester.edu
Sat Sep 23 00:18:48 CEST 2017


Alex:

I stand corrected. Thank you!

Your "wst := {0..31} - wst;" still depends on BITS. My conclusion stands: BITS should be a part of the language.

W.
________________________________________
From: Oberon [oberon-bounces at lists.inf.ethz.ch] on behalf of Alexander Ilin [ajsoft at yandex.ru]
Sent: Friday, September 22, 2017 6:09 PM
To: ETH Oberon and related systems
Subject: Re: [Oberon] FPGA - Bit reversal

Hi, Wojciech!

23.09.2017, 01:04, "Skulski, Wojciech" <skulski at pas.rochester.edu>:
> PROCEDURE ReverseWord(wd: INTEGER): INTEGER;
>  VAR wst: SET; wint: INTEGER;
> BEGIN
>   wst := BITS (wd);
>   wst := - wst;
>   wint := ORD (wst)
>  RETURN wint
> END ReverseWord;
>
> This would be a possibility if BITS were part of the Oberon language. BITS is available in Component Pascal.

  We weren't trying to invert the bits (at least that's how I read your code), we were reordering them.

  Inverting the bits is rather easy in Oberon:
  wst := {0..31} - wst;

---=====---
 Александр
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwIGaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=yGeHlJkEA-NJGjV_KCN__g32lb4OoSBO_XGEoQzubuk&s=AJy-HHSlhKPK2EicrDZqdWA5JmcbWq4F3YpYbf57WkI&e=


More information about the Oberon mailing list