sim: fix using 0-width Switch.
This commit is contained in:
parent
8033ddf05e
commit
0ecd06a7e5
2 changed files with 13 additions and 1 deletions
|
|
@ -1064,6 +1064,18 @@ class SimulatorIntegrationTestCase(FHDLTestCase):
|
|||
m.d.comb += a.eq(op)
|
||||
Simulator(m)
|
||||
|
||||
def test_switch_zero(self):
|
||||
m = Module()
|
||||
a = Signal(0)
|
||||
o = Signal()
|
||||
with m.Switch(a):
|
||||
with m.Case(""):
|
||||
m.d.comb += o.eq(1)
|
||||
with self.assertSimulation(m) as sim:
|
||||
def process():
|
||||
self.assertEqual((yield o), 1)
|
||||
sim.add_testbench(process)
|
||||
|
||||
|
||||
class SimulatorRegressionTestCase(FHDLTestCase):
|
||||
def test_bug_325(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue