Skip to content

Commit 385bd9c

Browse files
ericxu233pcolberg
authored andcommitted
Fix CSR query issue to enable new CSR protocol
1 parent 71ae4bb commit 385bd9c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/acl_kernel_if.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,14 @@ int acl_kernel_if_post_pll_config_init(acl_kernel_if *kern) {
10611061
// Register addresses are pushed back since previous versions
10621062
// doesn't have the start register
10631063
kern->cra_address_offset = 0;
1064+
} else {
1065+
// In case an old CSR version is queried before we program our new aocx,
1066+
// make sure the offset is set correctly when we query the correct CSR
1067+
// aocx from the newly compile aocx. Old CSR versions may be queried since
1068+
// users may trigger context creation whenever they try to query device
1069+
// info, which would lead to reading the CSR before programming the actual
1070+
// aocx and it would read from the default aocx provided by the BSP.
1071+
kern->cra_address_offset = 8;
10641072
}
10651073
} else {
10661074
ACL_KERNEL_IF_DEBUG_MSG(kern,

0 commit comments

Comments
 (0)