Skip to content

Conversation

rbramand-xilinx
Copy link
Collaborator

Problem solved by the commit

New spec changes in ELF for aie2ps/aie4 introduces ctrlpkt data as separate sections. Spec for same is captured at - https://amd.atlassian.net/wiki/spaces/AIE/pages/1099675323/Multi+uc+control+packet+design
Added changes in XRT to support these new changes in ELF.
Changes are backward compatible (tests with older ELFs will also work)

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

How problem was solved, alternative solutions (if any) and why they were rejected

Separate xrt::bo objects were created for each ctrlpkt section, and these were populated with the corresponding section data. Added logic to patch these ctrlpkt bo's address in control code.
The changes in XRT are designed to be data-driven. Both existing ELF files (with ctrlpkt data embedded in the .pad section) and proposed ELF files (with ctrlpkt data in a dedicated section) are supported.

Risks (if any) associated the changes in the commit

Low

What has been tested and how, request additional testing if necessary

Tested eff_net_ctrlpkt test case on Telluride board with existing ELF and new ELF and both work as expected.

Documentation impact (if any)

NA

Copy link
Contributor

github-actions bot commented Oct 9, 2025

clang-tidy review says "All clean, LGTM! 👍"

@larry9523
Copy link
Collaborator

what patching scheme are we using for AIE4 control packet?

@rbramand-xilinx
Copy link
Collaborator Author

what patching scheme are we using for AIE4 control packet?

May be @Himanshu-xilinx can answer this.
For XRT userspace as things are data driven if its existing patching schema it should work.

@HimanshuChoudhary-Xilinx
Copy link
Collaborator

what patching scheme are we using for AIE4 control packet?

May be @Himanshu-xilinx can answer this. For XRT userspace as things are data driven if its existing patching schema it should work.

patching schema for controlpacket

  1. Aie2ps: control_packet_57 = 7,
  2. Aie4: control_packet_57_aie4 = 9,

@rbramand-xilinx
I dont see control_packet_57_aie4 implemented in XRT https://github.com/Xilinx/XRT/blob/master/src/runtime_src/core/common/api/xrt_module.cpp#L160
implementation reference https://gitenterprise.xilinx.com/TurinAI/cert/blob/main/test/for_simnow/xrt_model/elf_loader/elf_loader.cpp#L334

@rbramand-xilinx
Copy link
Collaborator Author

what patching scheme are we using for AIE4 control packet?

May be @Himanshu-xilinx can answer this. For XRT userspace as things are data driven if its existing patching schema it should work.

patching schema for controlpacket

  1. Aie2ps: control_packet_57 = 7,
  2. Aie4: control_packet_57_aie4 = 9,

@rbramand-xilinx I dont see control_packet_57_aie4 implemented in XRT https://github.com/Xilinx/XRT/blob/master/src/runtime_src/core/common/api/xrt_module.cpp#L160 implementation reference https://gitenterprise.xilinx.com/TurinAI/cert/blob/main/test/for_simnow/xrt_model/elf_loader/elf_loader.cpp#L334

Thanks Himanshu, will add these changes in XRT

Signed-off-by: Rahul Bramandlapalli <rbramand@amd.com>
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Rahul Bramandlapalli <rbramand@amd.com>
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@rbramand-xilinx
Copy link
Collaborator Author

@larry9523 , @HimanshuChoudhary-Xilinx added ctrlpkt patching in aie4, please review

@chvamshi-xilinx chvamshi-xilinx merged commit 22efa4a into Xilinx:master Oct 16, 2025
21 checks passed
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.

5 participants