7
7
from amaranth .lib .fifo import SyncFIFO
8
8
from amaranth .lib .wiring import *
9
9
from amaranth .sim import *
10
+ from amaranth ._utils import _ignore_deprecated
10
11
11
12
from amaranth_stdio .serial import *
12
13
@@ -126,7 +127,8 @@ async def testbench(ctx):
126
127
self .assertTrue (ctx .get (getattr (dut .err , error )))
127
128
128
129
sim = Simulator (dut )
129
- sim .add_clock (1e-6 )
130
+ with _ignore_deprecated ():
131
+ sim .add_clock (1e-6 )
130
132
sim .add_testbench (testbench )
131
133
with sim .write_vcd (vcd_file = "test.vcd" ):
132
134
sim .run ()
@@ -200,7 +202,8 @@ async def testbench(ctx):
200
202
self .assertTrue (ctx .get (dut .err .overflow ))
201
203
202
204
sim = Simulator (dut )
203
- sim .add_clock (1e-6 )
205
+ with _ignore_deprecated ():
206
+ sim .add_clock (1e-6 )
204
207
sim .add_testbench (testbench )
205
208
with sim .write_vcd (vcd_file = "test.vcd" ):
206
209
sim .run ()
@@ -228,7 +231,8 @@ async def testbench(ctx):
228
231
self .assertFalse (ctx .get (fifo .r_rdy ))
229
232
230
233
sim = Simulator (m )
231
- sim .add_clock (1e-6 )
234
+ with _ignore_deprecated ():
235
+ sim .add_clock (1e-6 )
232
236
sim .add_testbench (testbench )
233
237
with sim .write_vcd (vcd_file = "test.vcd" ):
234
238
sim .run ()
@@ -329,7 +333,8 @@ async def testbench(ctx):
329
333
self .assertEqual (ctx .get (tx_o ), bit )
330
334
331
335
sim = Simulator (dut )
332
- sim .add_clock (1e-6 )
336
+ with _ignore_deprecated ():
337
+ sim .add_clock (1e-6 )
333
338
sim .add_testbench (testbench )
334
339
with sim .write_vcd (vcd_file = "test.vcd" ):
335
340
sim .run ()
@@ -411,7 +416,8 @@ async def testbench(ctx):
411
416
self .assertEqual (ctx .get (dut .o ), bit )
412
417
413
418
sim = Simulator (m )
414
- sim .add_clock (1e-6 )
419
+ with _ignore_deprecated ():
420
+ sim .add_clock (1e-6 )
415
421
sim .add_testbench (testbench )
416
422
with sim .write_vcd (vcd_file = "test.vcd" ):
417
423
sim .run ()
@@ -539,7 +545,8 @@ async def testbench(ctx):
539
545
self .assertEqual (ctx .get (dut .rx .data ), 0xAA )
540
546
541
547
sim = Simulator (m )
542
- sim .add_clock (1e-6 )
548
+ with _ignore_deprecated ():
549
+ sim .add_clock (1e-6 )
543
550
sim .add_testbench (testbench )
544
551
with sim .write_vcd (vcd_file = "test.vcd" ):
545
552
sim .run ()
@@ -564,7 +571,8 @@ async def testbench(ctx):
564
571
self .assertEqual (ctx .get (dut .rx .data ), 0xAA )
565
572
566
573
sim = Simulator (m )
567
- sim .add_clock (1e-6 )
574
+ with _ignore_deprecated ():
575
+ sim .add_clock (1e-6 )
568
576
sim .add_testbench (testbench )
569
577
with sim .write_vcd (vcd_file = "test.vcd" ):
570
578
sim .run ()
0 commit comments