File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ from . import base
2+ from . import io
3+ from . import memory
4+
5+
6+ __all__ = ['io' ,'memory' ,'base' ]
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ test-docs.cmd = "true"
5757lint.composite = [" ./tools/license_check.sh" , " ruff check" ]
5858# docs.cmd = "sphinx-build docs/ docs/_build/ -W --keep-going"
5959doc.cmd = " true"
60+ export-ips.cmd = " ./tools/export_ips.py"
6061
6162[dependency-groups ]
6263dev = [
Original file line number Diff line number Diff line change 1+ import inspect
2+ import json
3+ import sys
4+
5+ from amaranth import Elaboratable
6+ from amaranth .lib import wiring
7+
8+ import amaranth_orchard
9+
10+ def children (mod ):
11+ stack = [(attr , getattr (mod , attr )) for attr in dir (mod ) if not attr .startswith ("_" )]
12+ done = []
13+ while stack :
14+ i = stack .pop ()
15+ e ,o = i
16+ if inspect .isclass (o ) and o .__module__ .startswith ('chipflow_digital_ip' ) and issubclass (o , wiring .Component ):
17+ yield o
18+ if inspect .ismodule (o ):
19+ if e in done :
20+ continue
21+ done .append (e )
22+ stack .extend ([(attr , getattr (o , attr )) for attr in dir (o ) if not attr .startswith ("_" )])
23+
24+ gen = children (amaranth_orchard )
25+ output = {}
26+ for cls in gen :
27+ output [f"{ cls .__module__ } .{ cls .__qualname__ } " ]= cls .__doc__
28+
29+ json .dump (output , sys .stdout , indent = 2 )
You can’t perform that action at this time.
0 commit comments