Bug 871 - implement pack/unpack mode in ISACaller
Summary: implement pack/unpack mode in ISACaller
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Specification (show other bugs)
Version: unspecified
Hardware: Other Linux
: High enhancement
Assignee: Luke Kenneth Casson Leighton
URL: https://libre-soc.org/openpower/sv/sv...
Depends on:
Blocks: 872
  Show dependency treegraph
 
Reported: 2022-06-27 12:16 BST by Luke Kenneth Casson Leighton
Modified: 2022-10-12 23:36 BST (History)
2 users (show)

See Also:
NLnet milestone: NLNet.2019.10.042.Vulkan
total budget (EUR) for completion of task and all subtasks: 4000
budget (EUR) for this task, excluding subtasks' budget: 4000
parent task for budget allocation: 254
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:
lkcl={amount=4000, submitted=2022-09-27, paid=2022-10-11}


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2022-06-27 12:16:00 BST
similar to vpack vunpack except generalised, these eventually got added
via a "Management" instruction - using svstep - to set the pack/unpack
reordering in SVSTATE.

end result is an automatic "transpose" of the walking-order of vec2/3/4
as a 2D array, one transpose on source registers and one transpose on
destination: both are *independent*.
Comment 1 Luke Kenneth Casson Leighton 2022-07-21 16:05:36 BST
https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=c42523e2cb7b0f95fe7a2da58689ebea3a4a2f85

subvl now confirmed functional including with predicate masks
Comment 2 Luke Kenneth Casson Leighton 2022-07-30 17:53:13 BST
https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=91d0f643c324f7fa2ea5a427f842067655b261e4

beginning the process, converting LDST-with-immediate instructions
lwz, stz etc. from EXTRA3 to EXTRA2-with-pack/unpack room

this has meant some unit tests changed, they can no longer use
regs 0 1 2 3 4 ... they have to be 0 2 4 6 8 ...
Comment 3 Luke Kenneth Casson Leighton 2022-07-30 19:02:31 BST
feedback request
https://lists.libre-soc.org/pipermail/libre-soc-dev/2022-July/005132.html
Comment 4 Luke Kenneth Casson Leighton 2022-09-08 03:12:48 BST
you're not going to believe this, but pack/unpack as a mode
doesn't work.  it has to be in SVSTATE (like the vertical-first
bit).

and this is because of vertical-first.

setting the swapping of the two outer-inner loops
makes absolutely no sense in vertical-first mode
if pack/unpack is set as a *mode* on individual
instructions.

it is fine on horizontal-first but not vertical-first.

dang.
Comment 5 Luke Kenneth Casson Leighton 2022-09-08 03:14:00 BST
that in turn means it has to go into setvl, and there's not
enough bits left.  which means it has to go into sv.setvl.
which means defining a new RM Mode page.

haaaaaaa...
Comment 6 Luke Kenneth Casson Leighton 2022-09-12 22:37:12 BST
commit 04d0ba9a29869a06becd424de6184fc95dfc643d (HEAD -> master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Mon Sep 12 22:36:29 2022 +0100

    add hack overloaded meaning of destwid to be pack/unpack.
    only supposed to be used on sv.setvl
Comment 7 Luke Kenneth Casson Leighton 2022-09-14 12:11:50 BST
(In reply to Luke Kenneth Casson Leighton from comment #5)
> that in turn means it has to go into setvl, and there's not
> enough bits left.  which means it has to go into sv.setvl.
> which means defining a new RM Mode page.
> 
> haaaaaaa...

the epic saga continues.

sv.setvl is not practical.  it is a 64-bit encoding embedded into
a Vector Loop encoding and that is prohibited.  we need an *EXT001*
encoding **not** an sv.xxx encoding.

in the meantime (sigh) i will add an "svmgmt" instruction which
temporarily focusses on a pack/unpack argument.

potentially it could be a 10-bit XO because there are fewer bits in
SVSTATE left.
Comment 8 Luke Kenneth Casson Leighton 2022-09-14 13:12:16 BST
i have a much simpler idea, as this is 2 bits, to borrow from svstep "SVi" argument.  yes we do need to rename that field.
Comment 9 Dmitry Selyutin 2022-09-25 16:04:48 BST
What's needed here from binutils or pysvp64asm or pysvp64dis?
Comment 10 Luke Kenneth Casson Leighton 2022-09-25 16:17:06 BST
(In reply to Dmitry Selyutin from comment #9)
> What's needed here from binutils or pysvp64asm or pysvp64dis?

hilariously, nothing - it has all moved (after many attempts)
to setting 2 bits of SVSTATE from svstep (see comment #8)
Comment 11 Dmitry Selyutin 2022-09-25 16:18:33 BST
Ehm, so what's the fate of this budget-wise? :-)
Comment 12 Luke Kenneth Casson Leighton 2022-09-25 18:59:01 BST
(In reply to Dmitry Selyutin from comment #11)
> Ehm, so what's the fate of this budget-wise? :-)

well there's been a hell of a lot done underneath...