From 546bdfb20a8d0aae582334cc7bd1c656d91f5e9e Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 12 Dec 2018 10:52:32 +0000 Subject: [PATCH] genlib.cdc.MultiReg: self.regs should be a private field. --- nmigen/genlib/cdc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nmigen/genlib/cdc.py b/nmigen/genlib/cdc.py index c7d77e7..122dcbc 100644 --- a/nmigen/genlib/cdc.py +++ b/nmigen/genlib/cdc.py @@ -10,13 +10,13 @@ class MultiReg(Module): self.o = o self.odomain = odomain - self.regs = [Signal(self.i.bits_sign(), name="cdc{}".format(i), - reset=reset, reset_less=True)#, attrs=("no_retiming",)) - for i in range(n)] + self._regs = [Signal(self.i.bits_sign(), name="cdc{}".format(i), + reset=reset, reset_less=True)#, attrs=("no_retiming",)) + for i in range(n)] def get_fragment(self, platform): f = Module() - for i, o in zip((self.i, *self.regs), self.regs): + for i, o in zip((self.i, *self._regs), self._regs): f.sync[self.odomain] += o.eq(i) - f.comb += self.o.eq(self.regs[-1]) + f.comb += self.o.eq(self._regs[-1]) return f.lower(platform) -- 2.30.2