Skip to content

Commit 7627d20

Browse files
committed
Update for Amaranth 0.5.
1 parent 43dec27 commit 7627d20

File tree

3 files changed

+67
-75
lines changed

3 files changed

+67
-75
lines changed

Diff for: pdm.lock

+59-67
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Template for a generic FPGA project using Amaranth"
55

66
requires-python = "~=3.8"
77
dependencies = [
8-
"amaranth[builtin-yosys]~=0.4",
8+
"amaranth[builtin-yosys]~=0.5",
99
"amaranth-boards @ git+https://github.com/amaranth-lang/amaranth-boards",
1010
"yowasp-yosys",
1111
"yowasp-nextpnr-ice40",

Diff for: tests/test_blinky.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
def test_blinky_frequency():
77
blinky = Blinky(frequency=10)
88

9-
def testbench():
9+
async def testbench(ctx):
1010
for _ in range(5):
11-
assert (yield blinky.led) == 0
12-
yield
11+
assert ctx.get(blinky.led) == 0
12+
await ctx.tick()
1313
for _ in range(5):
14-
assert (yield blinky.led) == 1
15-
yield
16-
assert (yield blinky.led) == 0
14+
assert ctx.get(blinky.led) == 1
15+
await ctx.tick()
16+
assert ctx.get(blinky.led) == 0
1717

1818
sim = Simulator(blinky)
1919
sim.add_clock(period=1e-2)
20-
sim.add_sync_process(testbench)
20+
sim.add_testbench(testbench)
2121
sim.run()

0 commit comments

Comments
 (0)