-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chip-test] alert_handler_reverse_ping_in_deep_sleep #14663
[chip-test] alert_handler_reverse_ping_in_deep_sleep #14663
Conversation
294c14d
to
8518316
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I just left a few minor comments.
sw/device/tests/alert_handler_reverse_ping_in_deep_sleep_test.c
Outdated
Show resolved
Hide resolved
sw/device/tests/alert_handler_reverse_ping_in_deep_sleep_test.c
Outdated
Show resolved
Hide resolved
sw/device/tests/alert_handler_reverse_ping_in_deep_sleep_test.c
Outdated
Show resolved
Hide resolved
sw/device/tests/alert_handler_reverse_ping_in_deep_sleep_test.c
Outdated
Show resolved
Hide resolved
sw/device/tests/alert_handler_reverse_ping_in_deep_sleep_test.c
Outdated
Show resolved
Hide resolved
8518316
to
9639385
Compare
9639385
to
9ff9827
Compare
9ff9827
to
4a6d497
Compare
Hi @cindychip, I updated the test to enable and check all local alerts. I also added a flag to the ISR to fail the test if there are any alert interrupts detected. PTAL. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Miguel. great test!
I am running in DV and trying to dump waves to see if it is what we expect.
sw/device/tests/alert_handler_reverse_ping_in_deep_sleep_test.c
Outdated
Show resolved
Hide resolved
4a6d497
to
3020974
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks Miguel
sw/device/tests/alert_handler_reverse_ping_in_deep_sleep_test.c
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo @cindychip's comments.
- Ensure reset status is low power exit. A `kDifRstmgrResetInfoEscalation` signals that | ||
there was a local escalation and should result in test failure. | ||
- Disable AON timer. | ||
- Check there are no flagged local alerts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM!
@@ -778,15 +778,33 @@ | |||
uvm_test_seq: chip_sw_alert_handler_escalation_vseq | |||
sw_images: ["//sw/device/tests/sim_dv:alert_handler_escalation_test:1"] | |||
en_run_modes: ["sw_test_mode_test_rom"] | |||
// Disable scoreboard to avoid incorrect alert prediction from the alert_monitor. Due to the | |||
// cross-domain alert senders and receivers, the monitor from the chip level did not support | |||
// processing alerts accurately from both ends. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that we track in an issue to fix later (if not, should it be?)?
@moidx here is the run result in dv: Maybe we can set the
|
hey all, From what I can see, the most likely way a failure will trigger is a combination of two things:
The first event will cause the pwrmgr escalation receiver to think that it should keep counting even though the alert handler has gone offline. The test case we have here I feel like is not very likely to ever flag an error (though it is still good to have) because most of the "time" in the test I think is used in pre-sleep, and it's not very likely things will go out of sync there. The only way I can think of to test this is to hit the alert handler / pwrmgr combintation repeatedly with different kinds of sleep over and over with real software / or introduce artificial delays on the software, but all of this is going to take way too long in simulation. We could run it in FPGA, but this would be something that should be run for hours. I think at a minimum I should probably add some assertions to ensure the escalation receiver and alert_handler cannot get out of sync, but beyond that I don't really know how to make this better.... any thoughts? |
i think what i'm trying to say is that the purpose of these tests is probably to look for places where alert handler and pwrmgr get out of sync. But in this test, there's really only one moment where that could happen. And even if things DID get out of sync, it would require software to behave in an expected way to actually manifest an error. So I wonder if it makes more sense to codify what we think are the properties into cross module assertions, and then just try to stimulate it as much as possible. |
Hi @tjaychen, for the long running test you are describing, we could simulate different |
Thanks Tim and Miguel for the suggestions. I think Tim's concern is totally valid, because 1). To address We could have some long FPGA test to re-iterate this sequence, or wait for longer time after wake up, just to catch if any modules are out-of-sync. @tjaychen please feel free to let me know if I missed any points from our discussion. |
@tjaychen just to clarify, the out of sync scenario you mention should not be possible if everything is implemented correctly, right? i.e., the vectors you describe would only help to bias the test so that the involved mechanisms are used in a way that a bug (if there was one) would manifest more readily? |
yeah. But I worry I'm being too specific on just clk/rst, so if you can think of any other areas we should target..we should probably think about that too. |
Check that escalation receivers located inside always-on blocks do not auto-escalate due to the reverse ping feature while the system is in deep sleep. Signed-off-by: Miguel Osorio <[email protected]>
3020974
to
ff7d6a0
Compare
Check that escalation receivers located inside always-on blocks do not
auto-escalate due to the reverse ping feature while the system is in deep
sleep.
Signed-off-by: Miguel Osorio [email protected]