Skip to content

Commit 4b86331

Browse files
committed
Setup amaranth tools to use our yowasp build
1 parent 9a21033 commit 4b86331

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

chipflow_lib/steps/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,29 @@
22
Steps provide an extensible way to modify the `chipflow` command behavior for a given design
33
"""
44

5+
import os
56
from abc import ABC
67

8+
def _setup_amaranth_tools():
9+
_amaranth_settings = {
10+
"AMARANTH_USE_YOSYS": "system",
11+
"YOSYS": "yowasp-yosys",
12+
"SBY": "yowasp-sby",
13+
"SMTBMC": "yowasp-yosys-smtbmc",
14+
"NEXTPNR_ICE40": "yowasp-nextpnr-ice40",
15+
"ICEPACK": "yowasp-icepackr",
16+
"NEXTPNR_ECP5": "yowasp-nextpnr-ecp5",
17+
"ECPBRAM": "yowasp-ecpbram",
18+
"ECPMULTI": "yowasp-ecpmulti",
19+
"ECPPACK": "yowasp-ecppack",
20+
"ECPPLL": "yowasp-ecppll",
21+
"ECPUNPACK": "yowasp-ecpunpack",
22+
"NEXTPNR-ECP5": "yowasp-nextpnr-ecp5",
23+
"YOSYS-WITNESS": "yowasp-yosys-witness",
24+
}
25+
26+
os.environ |= _amaranth_settings
27+
728
class StepBase(ABC):
829
def __init__(self, config={}):
930
...

chipflow_lib/steps/board.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# SPDX-License-Identifier: BSD-2-Clause
2-
from . import StepBase
2+
from . import StepBase, _setup_amaranth_tools
33

44
class BoardStep(StepBase):
55
"""Build the design for a board."""
66

77
def __init__(self, config, platform):
88
self.platform = platform
9+
_setup_amaranth_tools()
910

1011
def build_cli_parser(self, parser):
1112
pass

0 commit comments

Comments
 (0)