Hi. I managged to run both Linaro and ArchLinux on the Zybo board, with HDMI output (but i'm gonna remove it after). But I'm having some troubles to comunicate with my custom hardware.
I'm used to programming in Hardware, and I made several real time high performance applications like face recognition and real time video processing on pure verilog (Nexys 3, Nexys 4, Atlys boards), but I'm kind of new to cross-compiling, linux kernels, and drivers. I have a few master AXI modules that directly communicates with the DDR3 memory using the HP ports (no DMA, VDMA or similiars), and I just reserve a fraction of the DDR3 memory to work with them. Now in Linux, all the address are virtual, so I must write a driver, or find a way to allocate physicall contiguous memory in software. -My IP usually work this way (e.g this is a sobel filter): It receives the base address where the image to process is located (usually is XRGB888 format), the resolution of the image, several arguments like threshold, and it outputs directly the result on the VGA port or HDMI port or a touchscreen that I have (all of them are custom IP) or it write the output on the DDR3 memory. If the flow requires SW interventions, It triggers a interrupt.
Now that I'm using Linux, I have 3 options:
Use DMA: I kind of know how to use DMA on baremetal on the software side, but I have no idea how to make a custom IP that comunicates with the DMA modules. I have a decent understanding how master and slave AXI full interfaces works tough.
Write a custom driver that works the way my IP needs.
Hack with things like dma-mapping, contiguous memory allocations, memory maps, etc.
Make a "don't touch" region of ram for Linux, so the HW can work with it.
With simple AXI peripherals that are mapped to a fixed address (0x4XXXXXXX) and doesnt communicate with the DDR3, I use mmap and to access the registers, and it work well, but I can't use interrupts. With peripherals that use the DDR3, the configuration parts is done the same way that the regular AXI peripherals, but the RAM buffer, needs to be reserved so Linux doesn't write to it, or it only do it on my command. Also I need the physicall address of that reserverd ram region to pass it to the peripheral.
I'd like some highlights on how to make a custom DMA module (hardware side please), but any of the 4 options works.
PS: Also, some of these modules that work with RAM doesn't even have an slave axi interface, so they won't appear on the automatic generated device tree.
Question
Alejandro Wolf
Hi.
I managged to run both Linaro and ArchLinux on the Zybo board, with HDMI output (but i'm gonna remove it after). But I'm having some troubles to comunicate with my custom hardware.
I'm used to programming in Hardware, and I made several real time high performance applications like face recognition and real time video processing on pure verilog (Nexys 3, Nexys 4, Atlys boards), but I'm kind of new to cross-compiling, linux kernels, and drivers. I have a few master AXI modules that directly communicates with the DDR3 memory using the HP ports (no DMA, VDMA or similiars), and I just reserve a fraction of the DDR3 memory to work with them. Now in Linux, all the address are virtual, so I must write a driver, or find a way to allocate physicall contiguous memory in software.
-My IP usually work this way (e.g this is a sobel filter): It receives the base address where the image to process is located (usually is XRGB888 format), the resolution of the image, several arguments like threshold, and it outputs directly the result on the VGA port or HDMI port or a touchscreen that I have (all of them are custom IP) or it write the output on the DDR3 memory. If the flow requires SW interventions, It triggers a interrupt.
Now that I'm using Linux, I have 3 options:
With simple AXI peripherals that are mapped to a fixed address (0x4XXXXXXX) and doesnt communicate with the DDR3, I use mmap and to access the registers, and it work well, but I can't use interrupts. With peripherals that use the DDR3, the configuration parts is done the same way that the regular AXI peripherals, but the RAM buffer, needs to be reserved so Linux doesn't write to it, or it only do it on my command. Also I need the physicall address of that reserverd ram region to pass it to the peripheral.
I'd like some highlights on how to make a custom DMA module (hardware side please), but any of the 4 options works.
PS: Also, some of these modules that work with RAM doesn't even have an slave axi interface, so they won't appear on the automatic generated device tree.
Any information would be usefull.
Best regards.
Alejandro Wolf.
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.