Skip to content

Commit 80375fd

Browse files
committed
Fix CSR query issue to enable new CSR protocal
1 parent ffc62b6 commit 80375fd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/acl_kernel_if.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,15 @@ int acl_kernel_if_post_pll_config_init(acl_kernel_if *kern) {
10521052
// Register addresses are pushed back since previous versions
10531053
// doesn't have the start register
10541054
kern->cra_address_offset = 0;
1055+
} else {
1056+
// else statement in case an old CSR version is queried before we program
1057+
// our new aocx, it makes sure that the offset is set correctly when we
1058+
// qeury the correct CSR aocx from the newly compile aocx. Old CSR
1059+
// versions may be queried since users may trigger context creation
1060+
// whenever they try to query device info which would lead to reading the
1061+
// CSR before programming the actual aocx and it would read from the
1062+
// defualt aocx provided by the BSP
1063+
kern->cra_address_offset = 8;
10551064
}
10561065
} else {
10571066
kern->csr_version = 0;

0 commit comments

Comments
 (0)