from migen.fhdl.tools import insert_reset, rename_clock_domain
-__all__ = ["DecorateModule",
- "InsertCE", "InsertReset", "RenameClockDomains",
- "CEInserter", "ResetInserter", "ClockDomainsRenamer",
+__all__ = ["CEInserter", "ResetInserter", "ClockDomainsRenamer",
"ModuleTransformer"]
for ce, cdn in to_insert:
f.sync[cdn] = [If(ce, *f.sync[cdn])]
-InsertCE = CEInserter.adhoc
-
class ResetInserter(ControlInserter):
control_name = "reset"
for reset, cdn in to_insert:
f.sync[cdn] = insert_reset(reset, f.sync[cdn])
-InsertReset = ResetInserter.adhoc
-
class ClockDomainsRenamer(ModuleTransformer):
def __init__(self, cd_remapping):
def transform_fragment(self, i, f):
for old, new in self.cd_remapping.items():
rename_clock_domain(f, old, new)
-
-RenameClockDomains = ClockDomainsRenamer.adhoc