From ea258fad7163e2f0b876acc919eac695a66948ef Mon Sep 17 00:00:00 2001 From: Wanda Date: Thu, 11 Jan 2024 05:38:26 +0100 Subject: [PATCH] Change uses of `Case()` to `Default()` in preparation for RFC 39. --- amaranth/lib/coding.py | 2 +- tests/test_sim.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/amaranth/lib/coding.py b/amaranth/lib/coding.py index 8813f70..bacedbd 100644 --- a/amaranth/lib/coding.py +++ b/amaranth/lib/coding.py @@ -41,7 +41,7 @@ class Encoder(Elaboratable): for j in range(self.width): with m.Case(1 << j): m.d.comb += self.o.eq(j) - with m.Case(): + with m.Default(): m.d.comb += self.n.eq(1) return m diff --git a/tests/test_sim.py b/tests/test_sim.py index 6f561a4..e80c2ef 100644 --- a/tests/test_sim.py +++ b/tests/test_sim.py @@ -509,7 +509,7 @@ class SimulatorIntegrationTestCase(FHDLTestCase): self.m.d.sync += self.o.eq(self.a + self.b) with self.m.Case(1): self.m.d.sync += self.o.eq(self.a - self.b) - with self.m.Case(): + with self.m.Default(): self.m.d.sync += self.o.eq(0) self.m.domains += self.sync