use PartitionedEqGtGe for eq function in partitioned signal
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 5 Feb 2020 17:00:55 +0000 (17:00 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 5 Feb 2020 17:00:55 +0000 (17:00 +0000)
src/ieee754/part/partsig.py

index 0b9b1336d358d66bbdcb6591f8eab334ab21db31..4930ff0afdcf0a203a5e6ed55436eeed6623b101 100644 (file)
@@ -84,9 +84,10 @@ class PartitionedSignal:
     def __eq__(self, other):
         print ("eq", self, other)
         shape = self.sig.shape()
-        pa = PartitionedEq(shape[0], self.partpoints)
+        pa = PartitionedEqGtGe(shape[0], self.partpoints)
         setattr(self.m.submodules, self.get_modname('eq'), pa)
         comb = self.m.d.comb
+        comb += pa.opcode.eq(PartitionedEqGtGe.EQ) # set opcode to EQ
         comb += pa.a.eq(self.sig)
         if isinstance(other, PartitionedSignal):
             comb += pa.b.eq(other.sig)