Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #61321

Re: Bit Swizzling

Path csiph.com!goblin3!goblin.stu.neva.ru!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From Chris <xxx.syseng.yyy@gfsys.co.uk>
Newsgroups comp.arch, comp.compilers
Subject Re: Bit Swizzling
Date Sun, 06 Sep 2020 17:48:58 +0100
Organization Aioe.org NNTP Server
Lines 28
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <20-09-019@comp.compilers> (permalink)
References <riumcj$3j9$1@dont-email.me> <rivvah$1neg$2@gioia.aioe.org> <20-09-014@comp.compilers> <20-09-016@comp.compilers>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 8bit
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="79013"; mail-complaints-to="abuse@iecc.com"
Keywords optimize, hardware, comment
Posted-Date 06 Sep 2020 13:20:15 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.arch:61321 comp.compilers:2590

Cross-posted to 2 groups.

Show key headers only | View raw


On 09/05/20 19:50, John Levine wrote:
> In article<rivvah$1neg$2@gioia.aioe.org>,
>>> -----
>>> Are there any algorithms which take a known-at-compile-time sequence
>>> of bitwise operations on an 8-bit to 64-bit quantity, and optimize
>>> them down to their minimal set of operations?
>
>> Why not just use a lookup table ?. Minimum ops and fast...
>
> Assuming you're looking for something you can implement in logic
> rather than by table lookup, it sounds like a set of Karnaugh maps.

Unless this is just an intellectual exercise for the fun of it, an
engineer would choose the minimal design at lowest cost to
satisfy the requirements. Table methods don't have to be in
software as a single eprom or gate array could do it in hardware.
8 inputs to address lines, then 8 bits of output, scale as required,
so why make life more difficult than necessary ?.

Old project here, where a programmer spent nearly 5 pages of 6800
asm to translate an input connect pin layout to that required for
the internal functions. Code was impenetrable, so substituted a
256 byte lookup table. Less space that the code and easily
modified for new requirements...

Chris
[I think the question is whether there is a way to mechanically
generate a version of the opaque assembler. -John]

Back to comp.arch | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Bit Swizzling "Rick C. Hodgin" <rick.c.hodgin@nospicedham.gmail.com> - 2020-09-04 20:33 -0400
  Re: Bit Swizzling MitchAlsup <MitchAlsup@aol.com> - 2020-09-04 18:26 -0700
    Re: Bit Swizzling MitchAlsup <MitchAlsup@aol.com> - 2020-09-04 18:27 -0700
  Re: Bit Swizzling Joshua Landau <joshua.landau.ws@gmail.com> - 2020-09-04 20:32 -0700
    Re: Bit Swizzling "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2020-09-05 09:16 -0400
  Re: Bit Swizzling Bart <bc@nospicedham.freeuk.com> - 2020-09-05 12:33 +0100
  Re: Bit Swizzling Chris <xxx.syseng.yyy@gfsys.co.uk> - 2020-09-05 13:12 +0100
    Re: Bit Swizzling "John Levine" <johnl@taugh.com> - 2020-09-05 18:50 +0000
      Re: Bit Swizzling "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2020-09-06 11:01 -0400
      Re: Bit Swizzling Chris <xxx.syseng.yyy@gfsys.co.uk> - 2020-09-06 17:48 +0100
  Re: Bit Swizzling olcott <NoOne@nospicedham.NoWhere.com> - 2020-09-08 11:25 -0500
    Re: Bit Swizzling olcott <NoOne@nospicedham.NoWhere.com> - 2020-09-08 11:50 -0500

csiph-web