From: lkcl Date: Sat, 15 Apr 2023 15:13:00 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls009_v1~72 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9372559bbb750ac460d8cd143ed84f17acd76697;p=libreriscv.git --- diff --git a/openpower/sv/rfc/ls009.mdwn b/openpower/sv/rfc/ls009.mdwn index 47427a919..64fe2aefb 100644 --- a/openpower/sv/rfc/ls009.mdwn +++ b/openpower/sv/rfc/ls009.mdwn @@ -1576,7 +1576,7 @@ offset is put through each algorithm to determine the actual Element Offset. Alternative implementations producing different ordering is prohibited as software will be critically relying on these Deterministic Schedules. -## REMAP 2D/3D Matrix pseudocode +### REMAP 2D/3D Matrix The following stand-alone executable source code is the Canonical Specification for Matrix (2D/3D) REMAP. @@ -1674,7 +1674,7 @@ if __name__ == '__main__': demo() ``` -## REMAP Parallel Reduction pseudocode +### REMAP Parallel Reduction pseudocode The python3 program below is stand-alone executable and is the Canonical Specification for Parallel Reduction REMAP. @@ -1765,7 +1765,7 @@ if __name__ == '__main__': demo() ``` -## REMAP FFT pseudocode +### REMAP FFT pseudocode The FFT REMAP is RADIX2 only. @@ -1937,24 +1937,20 @@ if __name__ == '__main__': demo() ``` -## DCT REMAP pseudocode +### DCT REMAP -The DCT REMAP is RADIX2 only. Convolutions may be applied as usual +DCT REMAP is RADIX2 only. Convolutions may be applied as usual to create non-RADIX2 DCT. Combined with appropriate Twin-butterfly -instructions the algorithm below, written in python3, becomes part -of an in-place in-registers Vectorised DCT. +instructions the algorithm below (written in python3), becomes part +of an in-place in-registers Vectorised DCT. The algorithms work +by loading data such that as the nested loops progress the result +is sorted into correct sequential order. ``` # DCT "REMAP" scheduler to create an in-place iterative DCT. # -# Original fastdctlee.py by Nayuki: -# Copyright (c) 2020 Project Nayuki. (MIT License) -# https://www.nayuki.io/page/fast-discrete-cosine-transform-algorithms -from copy import deepcopy -import math - -# bits of the integer 'val'. +# bits of the integer 'val' of width 'width' are reversed def reverse_bits(val, width): result = 0 for _ in range(width): @@ -1963,7 +1959,7 @@ def reverse_bits(val, width): return result -# iterative version of [recursively-applied] half-rev. +# iterative version of [recursively-applied] half-reversing # turns out this is Gray-Encoding. def halfrev2(vec, pre_rev=True): res = []