From e03ddc4293c417e8967d50c9bd33a4da95513380 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 30 May 2020 19:39:11 +0100 Subject: [PATCH] allow MultiCompUnit outputs to be Records, to capture Data.ok --- src/soc/experiment/compalu_multi.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/soc/experiment/compalu_multi.py b/src/soc/experiment/compalu_multi.py index a8374f75..9518a3f0 100644 --- a/src/soc/experiment/compalu_multi.py +++ b/src/soc/experiment/compalu_multi.py @@ -233,8 +233,12 @@ class MultiCompUnit(RegSpecALUAPI, Elaboratable): drl = [] for i in range(self.n_dst): name = "data_r%d" % i - data_r = Signal(self.cu._get_dstwid(i), name=name, reset_less=True) - latchregister(m, self.get_out(i), data_r, alu_pulsem, name + "_l") + lro = self.get_out(i) + if isinstance(lro, Record): + data_r = Record.like(lro, name=name) + else: + data_r = Signal.like(lro, name=name, reset_less=True) + latchregister(m, lro, data_r, alu_pulsem, name + "_l") drl.append(data_r) # pass the operation to the ALU -- 2.30.2