User Profile
KianHinT_altera
Joined 3 years ago
User Widgets
Contributions
Re: AI Suite - Is layout transformation useful in more scenarios?
Hi Mads Apologies in delay in getting back, took me sometime to go through the layout transformation section as well. “Current input and filter go into the same feature for the PE this cycle” Mostly correct for inference. In a PE cycle, the engine combines activations (input features) with filter weights. Layout transform only prepares the input; filters come from the compiled graph, not from the layout-transform step. Is it possible to process more channels, so it goes up the timeline of input and also folds that into the current input? Folding does let the PE see more channels in one go. Those extra channels are nearby pixels in space (height/width, and sometimes depth as well), based on the first convolution’s stride. They are packed into the channel axis of the current tensor and not as later samples along an input stream or time axis. So it is not “look ahead in time and merge that into now.” It is “reshape the spatial neighborhood into channels so this PE cycle is fuller.” https://docs.altera.com/r/docs/863373/2025.3/fpga-ai-suite-handbook/folding-input "Is this only useful when doing image stuff or can it also be utilized when doing simple linear stuff?" Short answer is both image stuff and linear stuff can use layout transform but folder is mainly more useful for images / first-convolution jobs. Some further details: Layout transform (reordering and packing the input into the format the PE array expects, including type conversion to FP16 when needed) is useful whenever the input is not already in that format. That applies to image tensors and to simpler linear/FC feature vectors. Folding is different. It packs spatial neighbors (height/width, based on the first convolution’s stride) into the channel dimension so a shallow first layer (for example RGB) uses the PE array more efficiently. A simple linear layer is typically just a feature vector with little or no spatial H×W structure, so folding usually provides little benefit. In short for simple linear networks: use layout transform if you need the correct input packing/format. Do not expect folding to be the main performance lever the way it is for shallow first-layer convolutions on images https://docs.altera.com/r/docs/863373/2025.3/fpga-ai-suite-handbook/folding-input https://docs.altera.com/r/docs/863373/2025.3/fpga-ai-suite-handbook/transforming-input-data-layout "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 parameter is --folding which must be set manually. When should I set the folding parameter? when can I utilize this to improve my design?" I assumed the --folding you mentioned is the --folding-option (0-3) where 0 - no folding (useful for debug, often lower first-layer efficiency) 1 - folding by host runtime or the IP layout-transform module 2 - host folding, plus extra folding in the IP convolution engine 3 - all folding in the IP convolution engine (default) Use or keep folding option (default 3, or 1 if you want the layout-transform path involved) when: the first layer is a convolution input channels are shallow (for example 1, or RGB = 3) architecture CVEC is large first-convolution stride > 1×1 This is the case where folding usually improves the first-layer PE utilization and can help with throughput. Turn folding off or use lightweight layout transform when: you are debugging the network is mostly linear / FC (little or no spatial H×W to fold) first-convolution stride is 1×1 (folding often adds little) the full layout transform costs too much ALM/DSP area reference link where i get the info, perhaps more details in the link (actually same document just different section) https://docs.altera.com/r/docs/863373/2025.3/fpga-ai-suite-handbook/compilation-options-dla-compiler-command-options https://docs.altera.com/r/docs/863373/2025.3/fpga-ai-suite-handbook/folding-input https://docs.altera.com/r/docs/863373/2025.3/fpga-ai-suite-handbook/generating-an-optimized-architecture https://docs.altera.com/r/docs/863373/2025.3/fpga-ai-suite-handbook/architecture-optimizer-options-dla-compiler-command-options https://docs.altera.com/r/docs/863373/2025.3/fpga-ai-suite-handbook/lightweight-layout-transform Thanks Regards Kian1View1like0CommentsRe: LTC Connector DE10-Standard FPGA
Hi I'm really sorry for the long delay in my reply on this thread. You're still seeing the i2c device 0x53 which is the G-sensor as it is connected on I2C1 line (in the previous comment). On the connection diagram, you wont be able to toggle P14 as the R319 is marked as DNI (do not install) means it is not connected at all thus it is always low at pin14 of the 2x7 header. Instead you should probe this R306 resistor that connects to the pin 1 of TS3A5018, this is where your i2c2 switch and try your switching app When you mentioned you run your app and could see pin 7 of the 2x7 header toggling, this might be due to the HPS_LTC_GPIO now set to 1 (from your app) and toggles all NC -> NO , in this case if you look at the pin 4 (MOSI_SDA that is connected to pin 7 of the jumper) , you're most likely seeing the switching/toggling effect when you set HPS_LTC_GPIO = 1. Is your i2c external device connected to pin 9 and 11 of the 2x7 header? Thanks Regards Kian0Views0likes0CommentsRe: AXI violation on H2F interface of S10
Hi Chris, Based on your setup, I agree that probably that does not apply to your case. I'm wondering whether this is due to the width mismatch where you have the H2F AXI4 128bit while EMIF AvalonMM at 512bit. Most probably you will have the width adapter in Platform designer to handle the width needed (narrow to wide data pack , 4x 128 = 512bits) So happy path when every data in 128bit is aligned and packed into 512bit send to AvMM. The not so happy path is when issues starts occurs, these are some suspected areas 1. The 128bit to 512 bit width and burst adaptation logic can be stressed by unaligned addresses, narrow transfer size, sparse bytes that can flood the memory with many small transactions. Things to confirm: Retest with 64-byte-aligned, full-width transfers (and/or with DMA). If that stabilizes the bus while raw user-space texture copies don't, then we could confirm that adaptation + traffic shape path is the weak link here that causes the issue you're seeing. 2. Memory controller or interconnect backpressure where external memory interface or the soft interconnect is not accepting writes fast enough causing backpressure on the queue and eventually stops accepting new write address transaction. Things to confirm : At hang, are the Avalon wait-request and write-data ready stuck in a backpressure state? Does lowering write rate delay or remove the hang? Try capture the HPS-to-FPGA write-address, write-data, and write-response channels on the HPS-to-FPGA fabric clock, plus the Avalon write and wait-request signals on the memory side. 3. Similar to 2, is there any chance that write addresses/data are accepted faster than the write responses coming back eventually hitting the write limit and stops accepting new write all together. Things to confirm : Count accepted write addresses vs completed write responses at hang. Try setting maximum pending writes = 1 and see what's the behavior, is it stable or instantly stall? Thanks Regards Kian1View0likes0Comments- 19Views0likes0Comments
Re: [Test only]Cyclone V emmc speed
1. Limitations with eMMC v4.5 HS-200 Your eMMC v4.5 chip supports the HS200 standard (which utilizes a 200 MHz clock to achieve up to 200 MB/s), but the Cyclone V controller physically cannot operate at those speeds due to three hard limitations: Maximum Clock Speed: The controller's interface output clock (SDMMC_CLK_OUT) caps out at 50 MHz in high-speed mode (a minimum clock period of 20 ns). Single Data Rate (SDR) Only: The SD/MMC controller only supports SDR mode. It lacks hardware support for Dual Data Rate (DDR) transfers, meaning it can only transfer data on one edge of the clock cycle. Controller Standard: The HPS SD/MMC controller is based on the Synopsys DesignWare Mobile Storage Host, which was designed before the HS200 mode existed. It does not have the hardware circuitry to support JEDEC eMMC v4.5 or v5.0 high-speed modes. Because of these factors, your eMMC v4.5 chip is automatically falling back to legacy backward-compatibility modes to communicate with the Cyclone V. The speeds you are currently getting (45 MB/s Read, 25 MB/s Write) mean your system is actually optimally tuned — you are successfully hitting the practical ceiling of the silicon's capabilities. 2. Supported eMMC Specs and Maximum Throughput Supported Specification: The Cyclone V SoC officially supports up to eMMC version 4.41. Newer eMMC chips (like your v4.5 or v5.0 modules) are widely used and supported, but they will operate strictly within 4.41 constraints. Bus Width: The controller supports 1-bit, 4-bit, and 8-bit data widths. Theoretical Maximum Throughput: 50 MB/s. This is calculated using the absolute maximums of the controller: a 50 MHz clock speed multiplied by 1 byte per clock cycle (using an 8-bit bus in SDR mode). Practical Maximum Throughput: Factoring in normal protocol overhead and filesystem operations (like ext4), real-world read speeds typically max out right around 40 to 45 MB/s. Write speeds are inherently slower due to the flash memory's page erase cycles and wear-leveling algorithms, making 20 to 25 MB/s the expected maximum.16Views0likes1Comment