From: lkcl Date: Sat, 15 Apr 2023 14:44:20 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls009_v1~73 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=329d1754345bfa17d831d155077d1e9808d03364;p=libreriscv.git --- diff --git a/openpower/sv/rfc/ls009.mdwn b/openpower/sv/rfc/ls009.mdwn index 6caeb419f..47427a919 100644 --- a/openpower/sv/rfc/ls009.mdwn +++ b/openpower/sv/rfc/ls009.mdwn @@ -1566,14 +1566,21 @@ Add the following to Book I, 1.6.2 | SVM2 | I | # | 3.0B | svshape2 | REMAP shape instruction (2) | | SVI | I | # | 3.0B | svindex | REMAP General-purpose Indexing | -## REMAP 2D/3D Matrix pseudocode +## REMAP pseudocode Written in python3 the following stand-alone executable source code is the Canonical -Specification for Matrix (2D/3D) REMAP. Vectors of "loopends" are returned when Rc=1 -in Vectors of CR Fields on `sv.svstep.`, or a single CR Field CR0 on -`svstep.` in Vertical-First Mode. The `SVSTATE.srcstep` or `SVSTATE.dststep` sequential -offset is put through this algorithm to determine the actual Element Offset. -Hardware implementations are achievable with simple counter-and-compare logic. +Specification for each REMAP. Vectors of "loopends" are returned when Rc=1 +in Vectors of CR Fields on `sv.svstep.`, or in Vertical-First Mode +a single CR Field (CR0) on `svstep.`. The `SVSTATE.srcstep` or `SVSTATE.dststep` sequential +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 + +The following stand-alone executable source code is the Canonical +Specification for Matrix (2D/3D) REMAP. +Hardware implementations are achievable with simple cascading counter-and-compares. ``` # python "yield" can be iterated. use this to make it clear how @@ -1670,8 +1677,8 @@ if __name__ == '__main__': ## REMAP Parallel Reduction pseudocode The python3 program below is stand-alone executable and is the Canonical Specification -for Parallel Reduction REMAP. Alternative implementations producing different ordering -is prohibited. The Algorithm below is not limited to RADIX2 sizes, and Predicate +for Parallel Reduction REMAP. +The Algorithm below is not limited to RADIX2 sizes, and Predicate sources, unlike in Matrix REMAP, apply to the Element Indices **after** REMAP has been applied, not before. MV operations are not required: the algorithm tracks positions of elements that would normally be moved and when applying