From 03c8dbbde360556f671d22ca73cb54b596753ee6 Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Wed, 17 Dec 2025 20:01:10 +0000 Subject: [PATCH] Fix docstring formatting for Sphinx compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- chipflow/config/models.py | 7 +++++++ chipflow/platform/io/iosignature.py | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/chipflow/config/models.py b/chipflow/config/models.py index 7d3e546d..dea7333e 100644 --- a/chipflow/config/models.py +++ b/chipflow/config/models.py @@ -56,16 +56,23 @@ class SiliconConfig(BaseModel): # This is still kept around to allow forcing pad locations. class SimulationConfig(BaseModel): + """Configuration for simulation settings.""" num_steps: int = 3000000 + class CompilerConfig(BaseModel): + """Configuration for compiler toolchain.""" cpu: str abi: str + class SoftwareConfig(BaseModel): + """Configuration for software build settings.""" riscv: CompilerConfig = CompilerConfig(cpu="baseline_rv32-a-c-d", abi="ilp32") + class TestConfig(BaseModel): + """Configuration for test settings.""" event_reference: Path class ChipFlowConfig(BaseModel): diff --git a/chipflow/platform/io/iosignature.py b/chipflow/platform/io/iosignature.py index cba6f6be..a676a8e2 100644 --- a/chipflow/platform/io/iosignature.py +++ b/chipflow/platform/io/iosignature.py @@ -66,12 +66,18 @@ class IOModelOptions(TypedDict): clock_domain: The name of the I/O's clock domain (see ``amaranth.hdl.ClockDomain``). NB there is only one of these, so IO with multiple clocks must be split up. - buffer_in: Should the IO pad have an input buffer? - buffer_out: Should the IO pad have an output buffer? - sky130_drive_mode: Drive mode for output buffer on sky130. - trip_point: Trip Point configuration for input buffer. - init: The value for the initial values of the port. - init_oe: The value for the initial values of the output enable(s) of the port. + buffer_in: Should the IO pad have an input buffer? Defaults to True for + ports with input direction. + buffer_out: Should the IO pad have an output buffer? Defaults to True for + ports with output direction. + sky130_drive_mode: Drive mode for output buffer on sky130. See + :class:`Sky130DriveMode` for available options. + trip_point: Trip Point configuration for input buffer. See + :class:`IOTripPoint` for available options. + init: The value for the initial values of the port. Can be an integer or + boolean. + init_oe: The value for the initial values of the output enable(s) of the + port. Can be an integer or boolean. """ invert: NotRequired[bool|Tuple[bool, ...]]