[Libre-soc-dev] my current plan regarding simdsignal

Luke Kenneth Casson Leighton lkcl at lkcl.net
Fri Oct 22 15:10:11 BST 2021


https://bugs.libre-soc.org/show_bug.cgi?id=734

rrright.  ok.  i like SimdScope.  it fitted very closely with the model i
had in my head for something-that-should-look-like-it, if you know
what i mean.

happy with either name SimdMode or SimdScope.

i've put in some "tie-in" patches and TODOs.  also important to update
to libresoc-partsig branch

the key is here:

class SimdSignal(UserValue):
    def __init__(self, mask, *args, src_loc_at=0, **kwargs):
        if False: # isinstance(mask, SimdMode):
            self.ptype = ElwidPartType(self)
            # parse the args, get elwid from SimdMode,
            # get module as well, call self.set_module(mask.module)
            self.partpoints = ptype.make_layout_get_stuff(mask, *args, **kwargs)

which by passing the SimdScope *as* the mask parameter gives
all the information needed to flip over to ElwidPartType() mode,
which in turn tells the submodules to behave in Elwid mode.

this is alllmost all the pieces in place.

some very important contextual variables were missing from SimdScope:
the most absolutely crucial one was a module instance!  i explain in
the bugreport.

also, a "default fixed width" is not appropriate, but i agree that elwid
and the vec_el_counts should definitely be passed in.

looking again at layout():

  37 def layout(elwid,                         # comes from SimdScope
constructor
                        vec_el_counts,          # comes from SimdScope
constructor
                        lane_shapes=None,  # comes from SimdShape (via
SimdShape.Signal)
                        fixed_width=None):  # comes from SimdShape
(via SimdShape.Signal)

fixed_width (which was the default_fixed_width parameter) should *NOT*
come from SimdScope's constructor: it should come from the (newly-added)
SimdShape.Signal() function

i'll add these as docstrings / notes

l.



More information about the Libre-soc-dev mailing list