Skip to content

Commit 5e0a7cd

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

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

chipflow_lib/steps/__init__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,30 @@
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+
"SBY": "yowasp-sby",
24+
"YOSYS-WITNESS": "yowasp-yosys-witness",
25+
}
26+
27+
os.environ |= _amaranth_settings
28+
729
class StepBase(ABC):
830
def __init__(self, config={}):
931
...

chipflow_lib/steps/board.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class BoardStep(StepBase):
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)