add WIP code for handling Slice and Cat in a unified way, supporting assignment
authorJacob Lifshay <programmerjake@gmail.com>
Sat, 16 Oct 2021 01:12:49 +0000 (18:12 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Sat, 16 Oct 2021 01:12:49 +0000 (18:12 -0700)
src/ieee754/part/partsig.py

index b899397f7feffb5a945f7f3a046a76a51e0d6a44..369d96e57356e001c72ef6fd63d25f121a648091 100644 (file)
@@ -151,6 +151,7 @@ class SimdSignal(UserValue):
         return PRepl(self.m, self, count, self.ptype)
 
     def __Cat__(self, *args, src_loc_at=0):
+        # TODO: need SwizzledSimdValue-aware Cat
         args = [self] + list(args)
         for sig in args:
             assert isinstance(sig, SimdSignal), \
@@ -169,6 +170,10 @@ class SimdSignal(UserValue):
         # print ("partsig ass", self, val)
         return PAssign(self.m, self, val, self.ptype)
 
+    def __Slice__(self, start, stop, *, src_loc_at=0):
+        # TODO: add __Slice__ redirection to nmigen
+        raise NotImplementedError("TODO: need SwizzledSimdValue-aware Slice")
+
     # TODO, http://bugs.libre-riscv.org/show_bug.cgi?id=458
     # def __Switch__(self, cases, *, src_loc=None, src_loc_at=0,
     #                               case_src_locs={}):