Skip to content

Fix CSR query issue to enable new CSR protocal #200

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

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/acl_kernel_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,14 @@ int acl_kernel_if_post_pll_config_init(acl_kernel_if *kern) {
// Register addresses are pushed back since previous versions
// doesn't have the start register
kern->cra_address_offset = 0;
} else {
// In case an old CSR version is queried before we program our new aocx,
// make sure the offset is set correctly when we query the correct CSR
// aocx from the newly compile aocx. Old CSR versions may be queried since
// users may trigger context creation whenever they try to query device
// info, which would lead to reading the CSR before programming the actual
// aocx and it would read from the default aocx provided by the BSP.
kern->cra_address_offset = 8;
}
} else {
kern->csr_version = 0;
Expand Down