@@ -428,12 +428,18 @@ async def test_image_activated(dut):
428
428
tb = await initialize (dut )
429
429
430
430
image_activated = dut .xi3c_wrapper .recovery_image_activated_o
431
+ payload_available = dut .xi3c_wrapper .recovery_payload_available_o
431
432
432
433
# Check if image_activated is deasserted
433
434
assert not bool (
434
435
image_activated .value
435
436
), "Upon initialization image_activated should be deasserted"
436
437
438
+ # Check if payload_available is deasserted
439
+ assert not bool (
440
+ payload_available .value
441
+ ), "Upon initialization payload_availablei should be deasserted"
442
+
437
443
# Write 0xF to byte 2 of RECOVERY_CTRL
438
444
await tb .write_csr_field (
439
445
tb .reg_map .I3C_EC .SOCMGMTIF .REC_INTF_REG_W1C_ACCESS .base_addr ,
@@ -447,6 +453,14 @@ async def test_image_activated(dut):
447
453
image_activated .value
448
454
), "Upon writing 0xF to RECOVERY_CTRL byte 2 image_activated should be asserted"
449
455
456
+ # payload_available is asserted one clk cycle after image activation
457
+ await RisingEdge (tb .clk )
458
+ # Check if payload_available is asserted
459
+ assert bool (
460
+ payload_available .value
461
+ ), "Upon writing 0xF to RECOVERY_CTRL byte 2 payload_available should be asserted"
462
+
463
+
450
464
# Write 0xFF to byte 2 of RECOVERY_CTRL from the HCI side
451
465
await tb .write_csr_field (
452
466
tb .reg_map .I3C_EC .SECFWRECOVERYIF .RECOVERY_CTRL .base_addr ,
0 commit comments