[Libre-soc-bugs] [Bug 713] PartitionedSignal enhancement to add partition-context-aware lengths
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Wed Oct 6 01:48:39 BST 2021
https://bugs.libre-soc.org/show_bug.cgi?id=713
--- Comment #8 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #6)
> I already wrote code to fully determine the layout needed for partitioned
> signals including padding (SimdLayout),
ok good, because this moves out of the area originally for which PS
was designed.
> All that is needed is to adapt code so SimdLayout and SimdPartMode work with
> PartitionedSignal.
excellent, that eould be great.
i am having a bit of a hard time understanding SimdLayout,
etc., can you cut the type information, all "casting", they are
extraneous lines, and add some docstrings explaining the
purpose of the main functions?
my feeling is, it should be possible to return an object
from the standard override of Value.shape() and use that.
most cases shape() is used to determine the signedness.
if that doesn't pan out it can be adapted.
a way to fit with PartitionPoints is needed: an adapter
that creates the dict that goes straight into Partition
Points yet also can be used to return the list from
which the case statements can be constrcted, will find
an example
there is too much code to do intrusive rewrites btw
ok here we go:
https://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/part_cat/cat.py;hb=HEAD#l100
that's dirt simple. the switch is on the mask (extracted from Ppoints),
it enumerates all possible values.
*without* being massively complex, we need something that *does not*
REPLACE PartitionPoints but feeds input *TO* PartitionPoints then
when enumerated instead of creating a full set of all combinations
of cases only creates those actually needed
or, adds a simple function *to* PartitionPoints which returns
the options.
bear in mind that some of the code cannot be adapted to *not*
generate full options. it doesn't work by switch/case, it's
gate-level.
these submodules all take the same mask bits hence why it is
necessary to fit with straight mask bits and keep PartitionPoints,
not try ripping things apart.
*careful* compatibility and *bare minimum* nondisruptive changes.
but first please can you take out type info and add docstrings
so i can see what is going on with SimdLane
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list