Skip to content

Commit 03c8dbb

Browse files
robtaylorclaude
andcommitted
Fix docstring formatting for Sphinx compatibility
- Make all attribute descriptions in IOModelOptions use consistent multi-line formatting to avoid RST definition list parsing issues - Add docstrings to config model classes that were missing them, preventing inherited pydantic BaseModel docstrings (which use Markdown syntax) from being displayed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6746230 commit 03c8dbb

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

chipflow/config/models.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,23 @@ class SiliconConfig(BaseModel):
5656
# This is still kept around to allow forcing pad locations.
5757

5858
class SimulationConfig(BaseModel):
59+
"""Configuration for simulation settings."""
5960
num_steps: int = 3000000
6061

62+
6163
class CompilerConfig(BaseModel):
64+
"""Configuration for compiler toolchain."""
6265
cpu: str
6366
abi: str
6467

68+
6569
class SoftwareConfig(BaseModel):
70+
"""Configuration for software build settings."""
6671
riscv: CompilerConfig = CompilerConfig(cpu="baseline_rv32-a-c-d", abi="ilp32")
6772

73+
6874
class TestConfig(BaseModel):
75+
"""Configuration for test settings."""
6976
event_reference: Path
7077

7178
class ChipFlowConfig(BaseModel):

chipflow/platform/io/iosignature.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,18 @@ class IOModelOptions(TypedDict):
6666
clock_domain: The name of the I/O's clock domain (see
6767
``amaranth.hdl.ClockDomain``). NB there is only one of these, so IO
6868
with multiple clocks must be split up.
69-
buffer_in: Should the IO pad have an input buffer?
70-
buffer_out: Should the IO pad have an output buffer?
71-
sky130_drive_mode: Drive mode for output buffer on sky130.
72-
trip_point: Trip Point configuration for input buffer.
73-
init: The value for the initial values of the port.
74-
init_oe: The value for the initial values of the output enable(s) of the port.
69+
buffer_in: Should the IO pad have an input buffer? Defaults to True for
70+
ports with input direction.
71+
buffer_out: Should the IO pad have an output buffer? Defaults to True for
72+
ports with output direction.
73+
sky130_drive_mode: Drive mode for output buffer on sky130. See
74+
:class:`Sky130DriveMode` for available options.
75+
trip_point: Trip Point configuration for input buffer. See
76+
:class:`IOTripPoint` for available options.
77+
init: The value for the initial values of the port. Can be an integer or
78+
boolean.
79+
init_oe: The value for the initial values of the output enable(s) of the
80+
port. Can be an integer or boolean.
7581
"""
7682

7783
invert: NotRequired[bool|Tuple[bool, ...]]

0 commit comments

Comments
 (0)