From e09f4adad1181a0930f3fc376278496d384046a3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 29 May 2020 13:50:56 +0100 Subject: [PATCH] create read-done pulse --- src/soc/experiment/compalu_multi.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/soc/experiment/compalu_multi.py b/src/soc/experiment/compalu_multi.py index e2a62f8a..4eecc073 100644 --- a/src/soc/experiment/compalu_multi.py +++ b/src/soc/experiment/compalu_multi.py @@ -275,10 +275,17 @@ class MultiCompUnit(RegSpecALUAPI, Elaboratable): brd = Repl(self.busy_o & self.shadown_i, self.n_dst) m.d.comb += self.wr.rel.eq(req_l.q & brd) + # generate read-done pulse + all_rd_dly = Signal(reset_less=True) + all_rd_pulse = Signal(reset_less=True) + m.d.sync += all_rd_dly.eq(all_rd) + m.d.comb += all_rd_pulse.eq(all_rd & ~all_rd_dly) + # on a go_read, tell the ALU we're accepting data. # NOTE: this spells TROUBLE if the ALU isn't ready! # go_read is only valid for one clock! with m.If(all_rd): # src operands ready, GO! + m.d.comb += self.alu.n.ready_i.eq(1) # tells ALU "got it" with m.If(~self.alu.p.ready_o): # no ACK yet m.d.comb += self.alu.p.valid_i.eq(1) # so indicate valid -- 2.30.2