From 394495c07f31a1b785cc951b97e6f9c69bb07a2c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 29 May 2020 13:31:29 +0100 Subject: [PATCH] create rising pulse from ALU valid --- src/soc/experiment/compalu_multi.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/soc/experiment/compalu_multi.py b/src/soc/experiment/compalu_multi.py index f17fb6bb..4ef26bb3 100644 --- a/src/soc/experiment/compalu_multi.py +++ b/src/soc/experiment/compalu_multi.py @@ -177,6 +177,14 @@ class MultiCompUnit(RegSpecALUAPI, Elaboratable): m.d.comb += wr_any.eq(self.wr.go.bool()) m.d.comb += req_done.eq(rst_l.q & wr_any) + # create rising pulse from alu valid condition. + alu_done = Signal(reset_less=True) + alu_done_dly = Signal(reset_less=True) + alu_pulse = Signal(reset_less=True) + m.d.comb += alu_done.eq(self.alu.n.valid_o) + m.d.sync += alu_done_dly.eq(alu_done) + m.d.comb += alu_pulse.eq(alu_done & ~alu_done_dly) + # shadow/go_die reset = Signal(reset_less=True) rst_r = Signal(reset_less=True) # reset latch off -- 2.30.2