sort out go_ld_i and go_st_i
[soc.git] / src / experiment / alu_hier.py
index 9c753005f70b10d6c56ac2f8cdb2e35926276cae..9659059c79edd74cb79bde61a36149b3361c6d26 100644 (file)
@@ -102,11 +102,11 @@ class ALU(Elaboratable):
                     m.d.sync += self.counter.eq(5)
                 with m.Elif(self.op == 3): # SHIFT to take 7
                     m.d.sync += self.counter.eq(7)
-                with m.Elif(self.op == 1): # SUB to take 2
-                    m.d.sync += self.counter.eq(2)
-                with m.Else(): # ADD to take 1, straight away
+                with m.Elif(self.op == 1): # SUB to take 1, straight away
                     m.d.sync += self.counter.eq(1)
                     m.d.comb += go_now.eq(1)
+                with m.Else(): # ADD to take 2
+                    m.d.sync += self.counter.eq(2)
         with m.Else():
             # input says no longer valid, so drop ready as well.
             # a "proper" ALU would have had to sync in the opcode and a/b ops