# read-done,wr-proceed latch
m.d.comb += rok_l.s.eq(self.issue_i) # set up when issue starts
- m.d.comb += rok_l.r.eq(self.alu.p.ready_o) # off when ALU acknowledges
+ m.d.comb += rok_l.r.eq(self.alu.n.valid_o) # off when ALU acknowledges
# wr-done, back-to-start latch
m.d.comb += rst_l.s.eq(all_rd) # set when read-phase is fully done
# ALU says "valid".
m.submodules.alu_l = alu_l = SRLatch(False, name="alu")
m.d.comb += self.alu.n.ready_i.eq(alu_l.qn)
- m.d.sync += alu_l.r.eq(self.alu.n.valid_o) # valid for one extra
+ m.d.sync += alu_l.r.eq(self.alu.n.valid_o & alu_l.q)
m.d.comb += alu_l.s.eq(all_rd_pulse)
# output the data from the latch on go_write