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

Hardcoded barrier CSR address #59

Open
colluca opened this issue Oct 25, 2023 · 0 comments
Open

Hardcoded barrier CSR address #59

colluca opened this issue Oct 25, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@colluca
Copy link
Collaborator

colluca commented Oct 25, 2023

Do not hardcode barrier CSR address, but get it from riscv-opcodes encoding.h.

/// Synchronize cores in a cluster with a hardware barrier
inline void snrt_cluster_hw_barrier() {
asm volatile("csrr x0, 0x7C2" ::: "memory");
}

@colluca colluca added the enhancement New feature or request label Oct 25, 2023
@colluca colluca self-assigned this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant