Skip to content

Commit fcd5422

Browse files
committed
hardware.assembly: use --no-promote-globals on iCE40.
See #1203. This is a temporary solution in lieu of something better
1 parent 737ae99 commit fcd5422

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

software/glasgow/hardware/assembly.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from amaranth import *
99
from amaranth.hdl import ShapeCastable
1010
from amaranth.lib import wiring, io
11+
from amaranth.vendor import SiliconBluePlatform
1112
from amaranth.build import ResourceError
1213

1314
from ..support import logging
@@ -718,6 +719,13 @@ def artifact(self):
718719
except ResourceError:
719720
pass
720721

722+
match self._platform:
723+
case SiliconBluePlatform():
724+
# https://github.com/GlasgowEmbedded/glasgow/issues/1203
725+
nextpnr_opts = "--placer heap --no-promote-globals"
726+
case _:
727+
nextpnr_opts = "--placer heap"
728+
721729
build_plan = self._platform.prepare(m,
722730
# always emit complete build log to stdout; whether it's displayed is controlled by
723731
# the usual logging options, e.g. `-vv` or `-v -F build`
@@ -728,7 +736,7 @@ def artifact(self):
728736
# latest yosys and nextpnr versions default to this configuration, but we support some
729737
# older ones in case yowasp isn't available and this keeps the configuration consistent
730738
synth_opts="-abc9",
731-
nextpnr_opts="--placer heap",
739+
nextpnr_opts=nextpnr_opts,
732740
)
733741
toolchain = find_toolchain(tools=self._platform.required_tools)
734742
assert toolchain is not None

software/pdm.min.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
groups = ["default", "builtin-toolchain", "http", "numpy"]
66
strategy = ["direct_minimal_versions"]
77
lock_version = "4.5.0"
8-
content_hash = "sha256:dad3ecd0a3113f0339dee319e5d78b6104b5b7f45c737d0e335399ff2c00d123"
8+
content_hash = "sha256:ad5af09833520279930b18a10d39185388918a14d49eb8ccb8e8dad781454300"
99

1010
[[metadata.targets]]
1111
requires_python = "~=3.13"

software/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ builtin-toolchain = [
7070
# the lowest that has features transitively required by Glasgow.
7171
"yowasp-runtime>=1.42",
7272
# Most versions of Yosys and nextpnr work; the minimum versions listed here are known good.
73-
"yowasp-yosys>=0.31.0.13,!=0.54.*,!=0.55.*,!=0.56.*,!=0.64.*,!=0.67.*",
73+
"yowasp-yosys>=0.31.0.13,!=0.54.*,!=0.55.*,!=0.56.*,!=0.64.*",
7474
"yowasp-nextpnr-ice40>=0.1",
7575
"yowasp-nextpnr-ecp5>=0.1",
7676
]

0 commit comments

Comments
 (0)