from typing import TYPE_CHECKING from peakrdl.plugins.exporter import ExporterSubcommandPlugin from .exporter import PythonRegmapExporter if TYPE_CHECKING: import argparse from systemrdl.node import AddrmapNode class Exporter(ExporterSubcommandPlugin): short_desc = "Generate a Python regmap definition of an address space" cfg_schema = { } def do_export(self, top_node: 'AddrmapNode', options: 'argparse.Namespace') -> None: x = PythonRegmapExporter() x.export( top_node, path=options.output )