Featured Content
Forum Widgets
Recent Discussions
DE10-Agilex: aocl diagnose fails with PCIe-to-fabric read error (0xffffffff)
## 1. Problem description We are experiencing an issue with our **Terasic DE10-Agilex board** when running the Intel FPGA SDK for OpenCL diagnostic. We have been following the **DE10-Agilex (revC) OpenCL BSP User Manual**, available on the [Terasic DE10-Agilex website](https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=142&No=1252&PartNo=4). After installing the required software, configuring the board, and setting up the PCIe driver, we execute: ```bash aocl diagnose ``` The OpenCL ICD check passes, but the board diagnostic fails with the following error: ```text Vendor: Terasic MMD INFO : [aclde10_agilex0] PCIe-to-fabric read test failed, read 0xffffffff after 1 attempts Failed Board name not available. DIAGNOSTIC_FAILED ``` **This is the issue we are trying to resolve. We have not been able to get `aocl diagnose` to pass.** Importantly, Linux successfully detects the FPGA through PCIe, and the corresponding kernel driver is loaded and bound to the device. The FPGA appears in `lspci` as: ```text 01:00.0 Processing accelerators [1200]: Altera Corporation Device [1172:35b4] (rev 01) Kernel driver in use: aclpci_de10_agilex Kernel modules: aclpci_de10_agilex_drv ``` The associated device node is also present: ```text /dev/aclde10_agilex0 ``` The PCIe memory BARs are allocated and enabled, and bus mastering is enabled. Therefore, the FPGA is recognized by the operating system, but the Terasic MMD fails when attempting to communicate with the FPGA fabric. ## 2. Hardware and software environment Our setup consists of: - **FPGA board:** Terasic DE10-Agilex - **Processor:** AMD Ryzen 9 7900X3D 12-Core Processor - **Motherboard:** MSI MPG B850 EDGE TI WIFI (MS-7E62) - **Operating system:** Ubuntu Linux - **Linux kernel:** `5.15.0-139-generic` - **FPGA software:** Intel Quartus Prime Pro 21.2 - **OpenCL software:** Intel FPGA SDK for OpenCL 21.2 - **OpenCL BSP:** Terasic `de10_agilex` - **Board configuration:** `B2E2_8GBx4` **Connection:** PCIe, with JTAG access through Quartus Programmer ## 3. Troubleshooting performed ### 3.1. PCIe detection and link verification We verified that the FPGA was detected through PCIe using: ```bash lspci -nn sudo lspci -vv -s 01:00.0 ``` The FPGA reported: ```text LnkCap: Speed 8GT/s, Width x16 LnkSta: Speed 2.5GT/s, Width x16 ``` The upstream PCIe port advertised a maximum speed of 2.5 GT/s, which could explain the negotiated Gen1 speed. The driver also reported an unsuccessful attempt to retrain the PCIe link to a higher generation. Despite the FPGA being detected and the driver being bound, `aocl diagnose` continued to fail with the PCIe-to-fabric read error. ### 3.2. Motherboard, PCIe connection, and BIOS configuration To investigate possible hardware compatibility or PCIe initialization problems, we performed several tests: - Removed and reinstalled the DE10-Agilex board multiple times. - Checked and reconnected the PCIe connection. - Replaced the original motherboard with the MSI MPG B850 EDGE TI WIFI (MS-7E62), selected for compatibility with the board's PCIe requirements. - Reviewed and modified the motherboard BIOS settings to meet the required PCIe configuration. - Repeated the PCIe detection and OpenCL diagnostic tests. These hardware and BIOS adjustments did not produce a successful `aocl diagnose` result. ### 3.3. Kernel driver verification We checked the DE10-Agilex kernel driver using: ```bash modinfo aclpci_de10_agilex_drv ``` The installed module was: ```text aclpci_de10_agilex_drv.ko ``` The module's kernel version information matched the running Linux kernel. We also verified that the driver was bound to the FPGA PCIe device and that the corresponding device node existed. Therefore, the original diagnostic failure occurred despite the kernel driver being installed and active. ### 3.4. OpenCL runtime and MMD configuration We inspected the OpenCL runtime configuration. The OpenCL ICD was configured to load: ```text libalteracl.so ``` The Terasic board configuration pointed to: ```text libterasic_agilex_mmd.so ``` The OpenCL ICD check passed during `aocl diagnose`. We also identified an older Cyclone V board configuration and disabled it to eliminate possible interference with the Terasic DE10-Agilex MMD. However, the diagnostic continued to report: ```text PCIe-to-fabric read test failed, read 0xffffffff after 1 attempts ``` ### 3.5. FPGA programming through JTAG We verified that the FPGA was accessible through JTAG using Quartus Programmer. The FPGA was detected with JTAG ID: ```text C341A0DD ``` We used the precompiled bring-up files provided with the Terasic DE10-Agilex BSP, including: ```text top.sof vector_add.aocx host ``` We successfully programmed the FPGA through JTAG using the supplied `top.sof`. However, the computer was rebooted immediately afterward, so we did not verify whether `aocl diagnose` passed while that JTAG-programmed image was still active. We would appreciate clarification on whether the programming and initialization procedure described in the manual is sufficient to ensure correct PCIe-to-fabric communication. ### 3.6. Precompiled OpenCL example We also attempted to run the precompiled vector-add example provided with the Terasic BSP. The example failed with: ```text CL_DEVICE_NOT_AVAILABLE ``` Additionally, `aocl list-devices` did not return a usable FPGA device. This is consistent with the failure reported by `aocl diagnose`, where the OpenCL runtime cannot successfully access the FPGA through the Terasic MMD. ## 4. Summary The main observations are: - Linux successfully enumerated the DE10-Agilex FPGA as PCIe device `1172:35b4`. - The `aclpci_de10_agilex` kernel driver was loaded and bound to the device. - The FPGA device node existed. - PCIe BARs were allocated and enabled. - The OpenCL ICD check passed. - The FPGA was accessible and programmable through JTAG. - We reseated the board multiple times, replaced the original motherboard, and adjusted BIOS settings for PCIe compatibility. - We verified the kernel driver and OpenCL runtime configuration. - The precompiled OpenCL vector-add example failed with `CL_DEVICE_NOT_AVAILABLE`. **Despite these checks and troubleshooting steps, `aocl diagnose` failed with:** ```text MMD INFO : [aclde10_agilex0] PCIe-to-fabric read test failed, read 0xffffffff after 1 attempts ``` We suspect that the issue may involve communication between the PCIe endpoint and the FPGA fabric, but we have not identified its root cause. ## 5. Questions for the Terasic / Intel Agilex community **1. PCIe-to-fabric read failure** What could cause the Terasic MMD to return `0xffffffff` during the PCIe-to-fabric read test when Linux successfully detects the FPGA, enables its PCIe memory resources, and binds the appropriate kernel driver? **2. FPGA configuration** Could this error indicate that the FPGA configuration does not contain the expected PCIe-to-fabric interface or that the interface has not been initialized correctly? Is there a specific FPGA configuration or initialization sequence required for `aocl diagnose` to pass? **3. Diagnostic procedures** Are there recommended tests, registers, driver logs, or debugging procedures to determine why the PCIe-to-fabric read fails? **4. Official bring-up procedure** We have followed the **DE10-Agilex (revC) OpenCL BSP User Manual** available on Terasic's website. Are there additional steps required to establish communication between the host and the FPGA fabric beyond the procedures described in this manual? **5. Software compatibility** Are there known issues involving Intel FPGA SDK for OpenCL 21.2, the Terasic DE10-Agilex BSP, or the PCIe kernel driver that could cause this diagnostic failure? Any guidance or recommended troubleshooting procedures would be greatly appreciated. Our objective is to successfully complete `aocl diagnose` and establish reliable OpenCL communication with the DE10-Agilex FPGA.34Views0likes1CommentDoes anyone actually use the FPGA AI Suite?
Hello Altera Community My question today is: does anyone actually use the ai suite, and is able to profit from it? I am thinking of vibe coding a micro service with the docker image, such that one can try the compiler and have the output presented nicely. That way they dont have to read the entire manual to try it out. However it does not make sense for me to make it, if nobody will use it. I only know 3 people who have used it, myself, fpga zealot, and one guy on linkedin. Thanks in advance.Solved221Views0likes5CommentsIntroducing the Altera Community AI Responder — Beta
Altera is introducing the AI Responder, an assistant built into the Altera Community to help provide faster, context-aware guidance for Altera product questions. It uses relevant public Altera documentation and Knowledge Database content, with coverage continuing to expand. The AI Responder may provide source references and can hand off complex or out-of-scope questions to an Altera subject-matter expert. As a beta feature, responses may contain errors or omissions, so please review the sources and verify technical guidance against official Altera documentation before implementation. If the response does not fully address your question, add more context and tag ai_responder to continue the discussion. We welcome your feedback as we improve the Community experience.54Views0likes1CommentAI Suite - How to interpret these graphs in Model Analyzer GUI
Hello Altera Community What can I learn from these subgraphs? I'm not sure how to connect it to the dla layer device file. The compiler told me: [ INFO ] The input graph is split into 9 subgraph(s), FPGA:3 CPU:6. (unsupported_layer_chains.dot) There are 9 nodes with "Transpose does not precede an FC layer." and 2 nodes with "Interpolation input not in NCDHW layout" (hetero_subgraphs_TensorFlow_Frontend_IR_3.dot) Why is there a node for device subgraph? Thanks in advance.Solved256Views0likes3CommentsAI Suite - Custom model in the FPGA building process
Hello Altera Community. My question is: Where in the FPGA building process do I incorporate my costum neural network into the design? This is my current understanding of the FPGA building process: The IP block is generated with the dla create ip script, which takes arch file as input. The IP block is placed in platform designer, and then is connected to memory and signals. After compiling, the data is send to the design using runtime, (JTAG being the slowest) Where does the NN Model I made with PyTorch gets incorporated into all this?Solved194Views0likes1CommentAI Suite - Spatial IP outputs wrong value
Hello Altera Community When looking at my Spatial IP in Signal Tap, I can see that it outputs a wrong value. Please help me identify where this mistakes happen. Below is the Signal Tap result of my test: 3D903C90 - 3D9C3D87 -BD983E38 However from my golden_output_sink_port_0.txt I'm expecting this value: 3D12BC8D - 3DA43E1E - 3DABBE18 Below is the Singal Tap of my input I'm inserting the values I got from input_vlogkw.txt from the DLA_COMPILER. Here is a list of warnings I got from Quartus, but they are from proteced sv files that I can't acess: Warning(16761): VHDL warning at spatial_first.vhd(146): actual for formal port "reset_reset" is neither a static name nor a globally static expression Warning(13469): Verilog HDL assignment warning at dot_core_controller.sv(381): truncated value with size 6 to match size of target (5) Warning(16788): Net "out[0][31]" does not have a driver at dsp_sum_of_2n_bf16xbf16.sv(118) Warning(13469): Verilog HDL assignment warning at dot_core_controller.sv(381): truncated value with size 6 to match size of target (5) Warning(21620): Design Assistant Results: 1 of 1 High severity rules issued violations in snapshot 'partitioned'. Please refer to DRC report 'C:/Users/mads/Desktop/test/quartus/output_files/spatial_first.drc.partitioned.rpt' for more information Warning(25315): Some pins are missing drive strength (current strength), termination and/or slew rate assignments. Refer to the I/O Assignment Warnings report for details. Warning(332158): Clock uncertainty characteristics of the A5EB013BB23BE4SR1 device are preliminary Warning(18291): Timing characteristics of device A5EB013BB23BE4SR1 are preliminary Warning(332060): Node: altera_reserved_tck was determined to be a clock but was found without an associated clock assignment. Warning(332158): Clock uncertainty characteristics of the A5EB013BB23BE4SR1 device are preliminary Warning(21620): Design Assistant Results: 3 of 34 High severity rules issued violations in snapshot 'final'. Please refer to DRC report 'C:/Users/mads/Desktop/test/quartus/output_files/spatial_first.tq.drc.signoff.rpt' for more information Attached is Netlist viewer of my Spatial IP.Solved237Views0likes5CommentsAI Suite - Is layout transformation useful in more scenarios?
Hello Altera Community Layout transformation is difficult to wrap your head around. I understand that it is useful when the input is an image with R,B,G channels, and the operation is convolution for feature extraction. I understand it this way: The current input and filter is put into the same feature for the PE to process this cycle. But it is possible to process more channels, so it goes up the timeline of input and also folds that into the current input? Is this only useful when doing image stuff or can it also be utilized when doing simple linear stuff? In the compiler it is possible to optimize for area and resources, it is not possible to optimize for throughput which is the most important. For transformation the only paramter is --folding which must be set manually. When should I set the folding parameter? when can I utilize this to improve my design? Thanks in advanceSolved137Views0likes1CommentAgilex 7 I-Series "aocl diagnose acl0" error following OFS
Hello, I've been working through the Open FPGA Stack (OFS) guides to set up my Agilex 7 I-Series development kit for use with oneAPI. I've worked through prior SystemVerilog issues encountered by switching the generated FPGA Interface Manager (FIM) from a 1x16 PCIe configuration to a 2x8 configuration (although 1x16 would be more preferred). I am now on the final step of wrapping the FIM into a BSP and validating it for use with oneAPI by running the "aocl diagnose acl0" command. I should note that performing just "aocl diagnose" works fine. When I add "acl0" and execute, however, I find that all attempts to communicate between the host and FPGA via DMA fail (although we do see a single VTP L2 4KB hit). The exact output from the diagnose command is in the text file attached. I have tried using both a minimal FIM generated via command provided in the OFS guides, as well as pre-builts from the Github page. Why might this error be occurring, and how can I fix it? Any help is greatly appreciated, thank you! James1.5KViews1like43CommentsAI Suite - core_hw.tcl error
Hello Altera Community. Can someone explain what the purpose of the core_hw.tcl file is? It gives me an error about some static_files.tcl file. core_hw.tcl is a file that appears at the top of an ip repo after using the dla_create_ip command. Error: C:\Users\mads\Desktop\testHANDMATH\ip_handmath\altera_ai_ip\core_hw.tcl: couldn't read file "C:/Users/mads/Desktop/testHANDMATH/ip_handmath/altera_ai_ip/static_files.tcl": no such file or directory Personally I fix this by pointing my search path at the verilog folder, instead of the top of the IP folder. ip_repo is my folder generated by dla_create_ip c:/users/mads/desktop/test/ip_repo/altera_ai_ip/verilog\**\*Solved146Views0likes2CommentsHow does the FPGA AI Suite utilize Agilex 5 DSP Blocks?
Hello Altera Community. I have a module called "dot_bf16" that uses the bf16 floating point format to calculate dot product and I am wondering if it uses the Agilex5 AI optimized DSP blocks to do this. I can't myself see how the DSP blocks are configured because they are all encrypted. 1. Agilex™ 5 Variable Precision DSP Blocks Overview • Variable Precision DSP Blocks User Guide Agilex™ 5 FPGAs and SoCs • Altera Documentation and Resources Center This document states that there are 3 operational modes for tensor mode: 1. Tensor float point mode 2. Tensor fixed point mode 3. Tensor accumulation mode Does the FPGA AI Suite utilize any of these? I also noticed the module uses a FSM and controller.Solved156Views0likes1Comment