From: whitequark Date: Wed, 12 Dec 2018 10:52:32 +0000 (+0000) Subject: genlib.cdc.MultiReg: self.regs should be a private field. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=546bdfb20a8d0aae582334cc7bd1c656d91f5e9e;p=nmigen.git genlib.cdc.MultiReg: self.regs should be a private field. --- 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)