[Libre-soc-dev] SimdSignal scalar/vector switching and SimdShape.width

lkcl luke.leighton at gmail.com
Thu Oct 28 11:43:51 BST 2021


like this:

class SimdShape(Shape):
     def __init__(self, scope, width=None,  # this is actually widths_at_elwid
                  signed=False,
                  fixed_width=None):  # fixed overall width
+        # record the mode and scope
         self.scope = scope
         widths_at_elwid = width
+        self.mode_flag = 0
+        # when both of these are set it creates mode_flag=PRIORITY_BOTH
+        # otherwise creates a priority of either FIXED width or ELWIDs
+        if fixed_width is not None:
+            self.mode_flag |= PRIORITY_FIXED
+        if widths_at_elwid is not None:
+            self.mode_flag |= PRIORITY_ELWID
+

so, deep breath: all permutations have to be gone through on the
wiki (sigh), for all operators (which is a hell of a lot of work, hence
why keeping it to bare-minimum number of operators)

l.



More information about the Libre-soc-dev mailing list