mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
fhdl/visit: add TransformModule
This commit is contained in:
parent
746acdacd1
commit
4c9018ea17
1 changed files with 8 additions and 0 deletions
|
@ -197,3 +197,11 @@ class NodeTransformer:
|
||||||
|
|
||||||
def visit_unknown(self, node):
|
def visit_unknown(self, node):
|
||||||
return 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())
|
||||||
|
|
Loading…
Reference in a new issue