From: Sebastien Bourdeauducq Date: Wed, 10 Apr 2013 21:42:14 +0000 (+0200) Subject: fhdl/visit: add TransformModule X-Git-Tag: 24jan2021_ls180~2099^2~611 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c9018ea171474ef07cb1df9c69713770232c1b7;p=litex.git fhdl/visit: add TransformModule --- diff --git a/migen/fhdl/visit.py b/migen/fhdl/visit.py index d8b4ff86..66c2fd94 100644 --- a/migen/fhdl/visit.py +++ b/migen/fhdl/visit.py @@ -197,3 +197,11 @@ class NodeTransformer: def visit_unknown(self, node): return node + +class TransformModule: + def __init__(self, transform, module): + self.transform = transform + self.module = module + + def get_fragment(self): + return self.transform(self.module.get_fragment())