[Libre-soc-dev] MP3 DCT36

Luke Kenneth Casson Leighton lkcl at lkcl.net
Sat Jun 19 13:56:31 BST 2021


On Fri, Jun 18, 2021 at 4:39 PM Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> for (i = 17; i >= 3; i -= 2)
>         in[i] += in[i-2];
>
> drat.  *another* candidate for REMAP, with "inverse" (countdown) mode,
> XDIM set to 17, YDIM set to 2, then the VL forloop it will generate 17
> 15 13 11 ... 3
>
> i would suggest using mask 0b0101010101 with mapreduce to overlap the
> sums, but there's no reverse gear (count backwards)... unless we add
> one? there is potentially one bit spare.  we lose the CR Mode in the
> process.
>

done.

the above can be done with:

     li r30, 0b1010101010101
     setvli 14 # ok 13 but who's counting
     sv.add/mrr/m=r30 r4.v, r4.v, r2.v

* the predicate mask skips every other add
* the offset (difference) between the adds is 2 (r4, r2)
* "mrr" means "map reduce in reverse"

works great
https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=8b2367d65a8dfaa57684d942fa6fafb44d3d4225

l.


More information about the Libre-soc-dev mailing list