From 4c9018ea171474ef07cb1df9c69713770232c1b7 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 10 Apr 2013 23:42:14 +0200 Subject: [PATCH] fhdl/visit: add TransformModule --- migen/fhdl/visit.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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()) -- 2.30.2