Skip to content
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

target/riscv: Ensure other TAPs are in BYPASS for batch DR scan #1090

Closed

Conversation

rbradford
Copy link

In configurations with multiple TAPs and targets it is necessary to ensure that the TAPs other than the one chosen for the batch are in BYPASS. This can be done by doing an IR scan which will ensure that all other than the active TAP are in BYPASS.

Make the select_dmi function non-static and use it from the batch code to avoid duplication.

This resolves an assertion when running with a configuration with multiple TAPs:

src/jtag/drivers/driver.c:156: interface_jtag_add_dr_scan: Assertion `active == tap' failed.

In configurations with multiple TAPs and targets it is necessary to
ensure that the TAPs other than the one chosen for the batch are in
BYPASS. This can be done by doing an IR scan which will ensure that all
other than the active TAP are in BYPASS.

Make the select_dmi function non-static and use it from the batch code
to avoid duplication.

This resolves an assertion when running with a configuration with
multiple TAPs:

src/jtag/drivers/driver.c:156: interface_jtag_add_dr_scan: Assertion `active == tap' failed.

Signed-off-by: Rob Bradford <[email protected]>
@JanMatCodasip
Copy link
Collaborator

JanMatCodasip commented Jun 14, 2024

@rbradford Hi Rob, thank you for the patch. It looks like your pull request is a slightly different fix for the issue already being addressed by #1089. Is that correct?

If so, can you please check if #1089 addresses your issue?

@en-sc
Copy link
Collaborator

en-sc commented Jun 14, 2024

@rbradford, thank you for the patch! I'm sorry for introducing the bug in #1073.
If you don't mind, I would like to use #1089.
The reason is, riscv_batch_run_from() is called repeatedly by batch_run_timeout(). That will result in unnecessary extra IR scans (unless the code of dtmcontrol_scan() is adjusted).

select_dmi(target);

@rbradford
Copy link
Author

Thank you both! I was able to test the patch from #1089 and it resolved the issue for me! 👍

@rbradford rbradford closed this Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants