Skip to content

Commit 4cb2c3f

Browse files
committed
wip: board configuration
1 parent 9a21033 commit 4cb2c3f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

chipflow_lib/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import sys
88
import tomli
99
from pathlib import Path
10+
1011
from pydantic import ValidationError
1112

1213
__version__ = importlib.metadata.version("chipflow_lib")
@@ -64,3 +65,5 @@ def _parse_config_file(config_file):
6465

6566
error_str = "\n".join(error_messages)
6667
raise ChipFlowError(f"Validation error in chipflow.toml:\n{error_str}")
68+
69+

chipflow_lib/config_models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ def validate_pad_dicts(cls, v, info: ValidationInfo):
5858
return v
5959

6060

61+
class BoardType(BaseModel):
62+
"""Configuration for silicon in chipflow.toml."""
63+
board_name: Literal["ULX3S"]
64+
board_type: Literal["85F"]
65+
66+
67+
6168
class StepsConfig(BaseModel):
6269
"""Configuration for steps in chipflow.toml."""
6370
silicon: str
@@ -69,6 +76,7 @@ class ChipFlowConfig(BaseModel):
6976
top: Dict[str, Any] = {}
7077
steps: StepsConfig
7178
silicon: SiliconConfig
79+
board: BoardConfig
7280
clocks: Optional[Dict[str, str]] = None
7381
resets: Optional[Dict[str, str]] = None
7482

0 commit comments

Comments
 (0)