-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add test for Mailbox JTAG accesses with clock gating #197
Add test for Mailbox JTAG accesses with clock gating #197
Conversation
Internal-tag: [#47908]
After recent merges to caliptra-rtl, forcing security_state.debug_locked state doesn't seem to affect cptra_in_debug_scan_mode in clock gate module which results in all clocks being enabled. @bharatpillilli @upadhyayulakiran can you confirm that the behaviour described above is expected? However, before these changes, when testing at 8bb19ac I was able to test JTAG accesses while clocks were gated and there was one issue with mailbox read pointer. The FYI @tmichalak @mkurc-ant |
@robertszczepanski, thank you for testing this. For the first scenario, cptra_in_debug_scan_mode will only be captured upon exiting reset. So, if security_state.debug_locked was 1 at that time, we won't see a toggle on cptra_in_debug_scan_mode. That said, expected behavior is clks should be enabled if debug mode is unlocked. If debug mode is locked, clks will be enabled based on other activities. Are you unlocking debug mode after reset in your test? Could you try doing it before the reset? For the second case, could you share your waves? Clks should be awake for as long as dmi_reg_en is active. Is dmi_reg_en 1 only for 1 clk in your test? I would like to confirm the behavior in the waves so I can also update my local test |
@upadhyayulakiran we are building Caliptra with Regarding |
Can we schedule a quick call and closer this off since we want to mark 1p0 soon |
@robertszczepanski @bharatpillilli Please let me know if I'm missing something |
@upadhyayulakiran this is exactly what we see and what is in the waveforms, i.e. when debug_mode.locked = 0 all clocks are there and we can read the mailbox, if debug_mode.locked = 1 the clocks are gated, but we cannot access via JTAG. If cptra_in_debug_scan_mode will only be captured upon exiting reset (and we build caliptra with security_state.debug_locked=0) then re-enabling the clock gating is not possible. Therefore we don't see an option to have both clock gating and JTAG access. If the described behavior is intended then the test confirms it. |
@tmichalak, @robertszczepanski I think we're on the same page now. You can close the original issue (#162) and merge your PR. Thanks! |
@upadhyayulakiran thanks, however we need a review in order to get this merged. @bharatpillilli should we open this PR targeting a different branch or is |
Tomasz, please retarget this PR towards |
@calebofearth |
Good thought. #238 |
I retargeted the PR to |
Related to #162.
This PR adds a test for JTAG accesses while clock gating is enabled and the core is halted.