From fccf2c94307c845a57545aedad884633d36b64c0 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 21 Jan 2015 12:01:28 +0100 Subject: [PATCH] common: clean up --- litesata/common.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/litesata/common.py b/litesata/common.py index 19e62fb1..87d77edb 100644 --- a/litesata/common.py +++ b/litesata/common.py @@ -266,16 +266,13 @@ class Timeout(Module): ### value = Signal(max=length) self.sync += value.eq(value+1) - self.comb += [ - self.reached.eq(value == length) - ] + self.comb += self.reached.eq(value == length) -# XXX use ModuleDecorator class BufferizeEndpoints(Module): - def __init__(self, decorated, *args): - self.decorated = decorated + def __init__(self, submodule, *args): + self.submodule = submodule - endpoints = get_endpoints(decorated) + endpoints = get_endpoints(submodule) sinks = {} sources = {} for name, endpoint in endpoints.items(): @@ -300,7 +297,7 @@ class BufferizeEndpoints(Module): setattr(self, name, buf.q) def __getattr__(self, name): - return getattr(self.decorated, name) + return getattr(self.submodule, name) def __dir__(self): - return dir(self.decorated) + return dir(self.submodule) -- 2.30.2