From cec7240135bd015f2c82c96ff458d854afa6bece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Nguyen?= Date: Fri, 2 Sep 2022 07:44:32 +0200 Subject: [PATCH] core: add PowerFVCore docstrings. --- power_fv/core/__init__.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/power_fv/core/__init__.py b/power_fv/core/__init__.py index 69fdfe7..1b926b0 100644 --- a/power_fv/core/__init__.py +++ b/power_fv/core/__init__.py @@ -4,16 +4,55 @@ __all__ = ["PowerFVCore"] class PowerFVCore: @classmethod def add_check_arguments(cls, parser): + """Add arguments to the :class:`PowerFVCheck` constructor. + + Parameters + ---------- + parser : :class:`argparse.ArgumentParser` + Argument parser passed from :meth:`PowerFVSession.add_check_subparser`. + """ pass @classmethod def wrapper(cls, **kwargs): + """Instantiate a wrapper of the processor. + + This method is called by the :class:`PowerFVCheck` constructor. The wrapper must have + a :class:`pfv.Interface` as its ``"pfv"`` attribute. + + Parameters + ---------- + **kwargs : + Implementation-specific arguments, defined in :meth:`PowerFVCore.add_check_arguments`. + + Return value + ------------ + An instance of :class:`amaranth.hdl.ir.Elaboratable`. + """ raise NotImplementedError @classmethod def add_build_arguments(cls, parser): + """Add arguments to :meth:`PowerFVCheck.build`. + + Parameters + ---------- + parser : :class:`argparse.ArgumentParser` + Argument parser passed from :meth:`PowerFVSession.add_build_subparser`. + """ pass @classmethod def add_files(cls, platform, wrapper, *, src_dir, **kwargs): + """Add source files to the build plan. + + Parameters + ---------- + platform : :class:`sby.SymbiYosysPlatform` + Target platform. Files can be added with :meth:`amaranth.build.plat.Platform.add_file`. + wrapper : :class:`Elaboratable` + Top-level wrapper. See :meth:`PowerFVCore.wrapper`. + **kwargs : + Implementation-specific arguments, defined in :meth:`PowerFVCore.add_build_arguments`. + """ pass