when mtocrf FXM is 0, the CR has to be set to CR7
[soc.git] / src / soc / decoder / power_decoder2.py
index 8ef8959aec54e8cd6a075b40b2cf1a2316133087..edbbf8783037c4d3a97c29be805cf26b88752822 100644 (file)
@@ -586,7 +586,10 @@ class DecodeCROut(Elaboratable):
                     with m.If(move_one):
                         # must one-hot the FXM field
                         comb += ppick.i.eq(self.dec.FXM)
-                        comb += self.whole_reg.data.eq(ppick.o)
+                        with m.If(ppick.en_o):
+                            comb += self.whole_reg.data.eq(ppick.o)
+                        with m.Else():
+                            comb += self.whole_reg.data.eq(0b00000001) # CR7
                     with m.Else():
                         comb += self.whole_reg.data.eq(self.dec.FXM)
                 with m.Else():