@@ -21,8 +21,8 @@ def simulation_test(dut, process):
21
21
22
22
class _DummyPins :
23
23
def __init__ (self ):
24
- self .rx = Signal (StructLayout ({"i" : 1 }), reset = {"i" : 1 })
25
- self .tx = Signal (StructLayout ({"o" : 1 }), reset = {"o" : 1 })
24
+ self .rx = Signal (StructLayout ({"i" : 1 }), init = {"i" : 1 })
25
+ self .tx = Signal (StructLayout ({"o" : 1 }), init = {"o" : 1 })
26
26
27
27
28
28
class AsyncSerialRXSignatureTestCase (TestCase ):
@@ -33,12 +33,12 @@ def test_simple(self):
33
33
self .assertEqual (sig .data_bits , 7 )
34
34
self .assertEqual (sig .parity , Parity .EVEN )
35
35
self .assertEqual (sig .members , Signature ({
36
- "divisor" : In (unsigned (8 ), reset = 10 ),
36
+ "divisor" : In (unsigned (8 ), init = 10 ),
37
37
"data" : Out (unsigned (7 )),
38
38
"err" : Out (StructLayout ({"overflow" : 1 , "frame" : 1 , "parity" : 1 })),
39
39
"rdy" : Out (unsigned (1 )),
40
40
"ack" : In (unsigned (1 )),
41
- "i" : In (unsigned (1 ), reset = 1 ),
41
+ "i" : In (unsigned (1 ), init = 1 ),
42
42
}).members )
43
43
44
44
def test_defaults (self ):
@@ -67,15 +67,15 @@ def test_eq(self):
67
67
def test_repr (self ):
68
68
sig = AsyncSerialRX .Signature (divisor = 10 , divisor_bits = 8 , data_bits = 7 , parity = "even" )
69
69
self .assertEqual (repr (sig ), "AsyncSerialRX.Signature(SignatureMembers({"
70
- "'divisor': In(unsigned(8), reset =10), "
70
+ "'divisor': In(unsigned(8), init =10), "
71
71
"'data': Out(unsigned(7)), "
72
72
"'err': Out(StructLayout({"
73
73
"'overflow': 1, "
74
74
"'frame': 1, "
75
75
"'parity': 1})), "
76
76
"'rdy': Out(unsigned(1)), "
77
77
"'ack': In(unsigned(1)), "
78
- "'i': In(unsigned(1), reset =1)}))" )
78
+ "'i': In(unsigned(1), init =1)}))" )
79
79
80
80
def test_wrong_divisor (self ):
81
81
with self .assertRaisesRegex (TypeError ,
@@ -242,11 +242,11 @@ def test_simple(self):
242
242
self .assertEqual (sig .data_bits , 7 )
243
243
self .assertEqual (sig .parity , Parity .EVEN )
244
244
self .assertEqual (sig .members , Signature ({
245
- "divisor" : In (unsigned (8 ), reset = 10 ),
245
+ "divisor" : In (unsigned (8 ), init = 10 ),
246
246
"data" : In (unsigned (7 )),
247
247
"rdy" : Out (unsigned (1 )),
248
248
"ack" : In (unsigned (1 )),
249
- "o" : Out (unsigned (1 ), reset = 1 ),
249
+ "o" : Out (unsigned (1 ), init = 1 ),
250
250
}).members )
251
251
252
252
def test_defaults (self ):
@@ -275,11 +275,11 @@ def test_eq(self):
275
275
def test_repr (self ):
276
276
sig = AsyncSerialTX .Signature (divisor = 10 , divisor_bits = 8 , data_bits = 7 , parity = "even" )
277
277
self .assertEqual (repr (sig ), "AsyncSerialTX.Signature(SignatureMembers({"
278
- "'divisor': In(unsigned(8), reset =10), "
278
+ "'divisor': In(unsigned(8), init =10), "
279
279
"'data': In(unsigned(7)), "
280
280
"'rdy': Out(unsigned(1)), "
281
281
"'ack': In(unsigned(1)), "
282
- "'o': Out(unsigned(1), reset =1)}))" )
282
+ "'o': Out(unsigned(1), init =1)}))" )
283
283
284
284
def test_wrong_divisor (self ):
285
285
with self .assertRaisesRegex (TypeError ,
@@ -420,7 +420,7 @@ def test_simple(self):
420
420
self .assertEqual (sig .data_bits , 7 )
421
421
self .assertEqual (sig .parity , Parity .EVEN )
422
422
self .assertEqual (sig .members , Signature ({
423
- "divisor" : In (unsigned (8 ), reset = 10 ),
423
+ "divisor" : In (unsigned (8 ), init = 10 ),
424
424
"rx" : Out (AsyncSerialRX .Signature (divisor = 10 , divisor_bits = 8 , data_bits = 7 , parity = "even" )),
425
425
"tx" : Out (AsyncSerialTX .Signature (divisor = 10 , divisor_bits = 8 , data_bits = 7 , parity = "even" )),
426
426
}).members )
@@ -451,23 +451,23 @@ def test_eq(self):
451
451
def test_repr (self ):
452
452
sig = AsyncSerial .Signature (divisor = 10 , divisor_bits = 8 , data_bits = 7 , parity = "even" )
453
453
self .assertEqual (repr (sig ), "AsyncSerial.Signature(SignatureMembers({"
454
- "'divisor': In(unsigned(8), reset =10), "
454
+ "'divisor': In(unsigned(8), init =10), "
455
455
"'rx': Out(AsyncSerialRX.Signature(SignatureMembers({"
456
- "'divisor': In(unsigned(8), reset =10), "
456
+ "'divisor': In(unsigned(8), init =10), "
457
457
"'data': Out(unsigned(7)), "
458
458
"'err': Out(StructLayout({"
459
459
"'overflow': 1, "
460
460
"'frame': 1, "
461
461
"'parity': 1})), "
462
462
"'rdy': Out(unsigned(1)), "
463
463
"'ack': In(unsigned(1)), "
464
- "'i': In(unsigned(1), reset =1)}))), "
464
+ "'i': In(unsigned(1), init =1)}))), "
465
465
"'tx': Out(AsyncSerialTX.Signature(SignatureMembers({"
466
- "'divisor': In(unsigned(8), reset =10), "
466
+ "'divisor': In(unsigned(8), init =10), "
467
467
"'data': In(unsigned(7)), "
468
468
"'rdy': Out(unsigned(1)), "
469
469
"'ack': In(unsigned(1)), "
470
- "'o': Out(unsigned(1), reset =1)})))}))" )
470
+ "'o': Out(unsigned(1), init =1)})))}))" )
471
471
472
472
def test_wrong_divisor (self ):
473
473
with self .assertRaisesRegex (TypeError ,
0 commit comments