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-Tag: working~337 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c05c189ece92718ea9803c1864a0c17b14043c41;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)