Reply by Vladimir Vassilevsky●February 24, 20102010-02-24
Grant Griffin wrote:
> A friend asked me today how to transpose an array of bits on the
> Blackfin. Bascially, the requirement is to turn columns of bits into
> rows, as follows:
>
> Word 1: a1 b1 c1 d1 ...
> Word 2: a2 b2 c2 d2 ...
> ...
>
> becomes:
>
> Word 1: a1 a2 a3 a4 ...
> Word 2: b1 b2 b3 b4 ...
> ...
>
> Each input word contains 12 useful bits within a 16-bit word, with 4
> bits unused. The output words can be 8, 16, or 32 bits - whatever is
> most efficient.
>
> The straight-forward method of doing this might be too slow for the
> application. Does anybody know a fast way to do this, possibly using
> special Blackfin assembly constructs?
The BITMUX instruction processes 2 bits and 2 words at a time.
Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
Reply by Grant Griffin●February 23, 20102010-02-23
A friend asked me today how to transpose an array of bits on the
Blackfin. Bascially, the requirement is to turn columns of bits into
rows, as follows:
Word 1: a1 b1 c1 d1 ...
Word 2: a2 b2 c2 d2 ...
...
becomes:
Word 1: a1 a2 a3 a4 ...
Word 2: b1 b2 b3 b4 ...
...
Each input word contains 12 useful bits within a 16-bit word, with 4
bits unused. The output words can be 8, 16, or 32 bits - whatever is
most efficient.
The straight-forward method of doing this might be too slow for the
application. Does anybody know a fast way to do this, possibly using
special Blackfin assembly constructs?
thanks,
Grant
p.s. I promise this isn't a homework problem. Honest it isn't.
--
_____________________________________________________________________
Grant R. Griffin
Publisher of dspGuru http://www.dspguru.com
Iowegian International Corporation http://www.iowegian.com
See http://www.iowegian.com/img/contact.gif for e-mail address