add "as_sig" function to PartitionPoints to get the mask as a straight sequence
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 30 Jan 2020 13:48:58 +0000 (13:48 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 30 Jan 2020 13:50:09 +0000 (13:50 +0000)
src/ieee754/part_mul_add/partpoints.py

index fbdeb9f4bd53f80f259d9ac88f5c460b2f828dfb..043988fbc93c67f6c78208688fc932d2119baae9 100644 (file)
@@ -105,6 +105,11 @@ class PartitionPoints(dict):
                 bits.append(True)
         return Cat(*bits)
 
+    def as_sig(self):
+        """Create a straight concatenation of `self` signals
+        """
+        return Cat(self.values())
+
     def get_max_partition_count(self, width):
         """Get the maximum number of partitions.