[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
Sat Oct 9 07:23:56 BST 2021


--- Comment #53 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #51)

> I think copying the existing PartitionedSignal and naming the copy
> ElwidthSimdSignal is better than having it be a subclass...subclassing will
> make a bunch of messy unnecessary interactions.

it's surprisingly small (and regular), needing only 3 functions/properties


1) the thing to switch on (line 90)
2) the list of values to create cases from
3) (as an optimisation) a mask identifying padding-only lanes,
   stopping partial computations in padding lanes from taking

note 1 and 2 are *not* PartitionedSignal.__Switch__ they are
actual (scalar) Module m.Switch m.Case.

lines 90-92 in repl.py would become something like:

   with m.Switch(self.something.get_selector()):
       for pbit in self.something.get_allowed_cases():   

that is *literally* the extent of the modifications required
to allow PartitionedSignal submodules/subfunctions to adapt.

> Also, naming it Simd is waay
> shorter than Partitioned.

yeah i'll do a (big) rename in the morning. SimdSignal?

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list