From cd5bce6ab706a6d40e0fd0795b00a5d5372e30e6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 15 Aug 2020 00:03:49 +0100 Subject: [PATCH] remove latchregister, use sync to capture compunit results --- src/soc/experiment/compalu_multi.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/soc/experiment/compalu_multi.py b/src/soc/experiment/compalu_multi.py index fe1b93c0..c4dcfd15 100644 --- a/src/soc/experiment/compalu_multi.py +++ b/src/soc/experiment/compalu_multi.py @@ -270,11 +270,14 @@ class MultiCompUnit(RegSpecALUAPI, Elaboratable): # bye-bye abstract interface design.. fname = find_ok(data_r.fields) if fname: - ok = data_r[fname] + ok = getattr(lro, fname) else: data_r = Signal.like(lro, name=name, reset_less=True) wrok.append(ok & self.busy_o) - latchregister(m, lro, data_r, alu_pulsem, name + "_l") + with m.If(alu_pulse): + m.d.sync += data_r.eq(lro) + with m.Elif(self.issue_i): + m.d.sync += data_r.eq(0) drl.append(data_r) # ok, above we collated anything with an "ok" on the output side -- 2.30.2