Re: [OT] Byte-wise boolean optimisation
- From: Thomas Pircher <tehpeh@xxxxxxx>
- Date: Mon, 28 May 2007 23:13:32 +0100
Jim Granville wrote:
Thomas Pircher wrote:
Basically I have 8 truth-functions f7(.) ... f0(.) representing the bits
7..0 of the result byte, and I would like to find an optimised function
f(.) which gives the same result as the single-bit-functions together and
uses 8-bit parallel boolean operators.
I'm unclear - do you want a one byte answer, from an 8 byte variable
set, and you want to use common byte-wide operators, to get to the answer?
Hi Jim,
fortunately my case is slightly simpler. I have one input byte and one
output byte and a given algorithm to transform the former into the latter,
but I want to simplify the algorithm to use just logic operators (instead
of loops).
To be more precise, I'm working on a source code generator for CRC checks
(http://sourceforge.net/projects/pycrc) and I would like to overcome the
shortcomings of the bit-by-bit algorithms and the table-driven
implementation: I don't want to loop over 8 input bits to update the CRC
for one byte and I don't want to keep table in ROM as the table-driven
implementation requires.
Sounds a fairly big ask, as you will need 'leave alone' operations many
times.
With commonly used Polys (which happen to not contain too many ones) it does
not look so bad. But for other Polys, I get terribly long expressions.
You could easily feed the eqns into any CPLD/FPGA tool flow,
and inspect the output eqns for each bit, which will of course be
optimised, but using bit operators. Then, you could work backwards, to
see if any can be merged into multi-bit operations.
This will lead to the following approach: Quine-McCluskey (and Petrick's
algorithm) for all 8 output bits and then finding some common patterns in
the resulting sums of products, based on heuristics (e.g. the 'sum of
product' for one bit is often similar to the sum of products of an adjacent
bit, just shifted by one).
Ok, I admit it, I was asking for the silver bullet, but I see I have to go
down the hard way. :-)
Any suggestions are more than welcome!
Cheers,
Thomas
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: Byte-wise boolean optimisation
- From: jetmarc
- Re: Byte-wise boolean optimisation
- References:
- [OT] Byte-wise boolean optimisation
- From: Thomas Pircher
- Re: [OT] Byte-wise boolean optimisation
- From: Jim Granville
- [OT] Byte-wise boolean optimisation
- Prev by Date: Ethernet daisy chaining
- Next by Date: Re: Really confused by my debugger.
- Previous by thread: Re: [OT] Byte-wise boolean optimisation
- Next by thread: Re: Byte-wise boolean optimisation
- Index(es):
Relevant Pages
|