<Pynq 2.6, ZCU104, Vivado 2020.1>
I am trying to use memory mapped interface of axi video mixer to transfer the overlay picture. How to write the image data through hp0 port.
Could this code work?
My first actual try was setting the address register value through axi lite interface and transferring the image. It is not working. That’s why I wanted to try previously stated code.
logo = allocate(shape=(64, 64, 3), dtype=np.uint8, cacheable=True)
logo[:]= cv2.imread('flip.png')
vmixer.write(0x240,logo.physical_address)
But it doesn’t have any impact, the image is not transferring (not showing on overlay)
My current project has 8 overlays and the project is working fine with 8 vdma which output streams go to the video mixer. But I don’t want to add so much code and vdmas for the project. That’s why I wanted to switch to memory-mapped interface. If there is any other way it could be done, it would be helpful to know.
No, this is the only way it can be done. You need to pass the pointer to memory and then start the IP.
What value are you getting for logo.physical_address?
I would also suggest you try to reproduce Cathal’s tutorial. Your IP seems to be more complex as it has streams as well. Once you have establish that this methodology works in your board, you can start debugging your IP.
Other things to consider, is 0x240 the address of the pointer? How does your register_map look like?
It is not my ip. This video mixer IP from xilinx. At register 0x240 is memory-mapped address for layer 1 overlay according to the product guide.
That might work for hls IP, but i needed it for this IP. The process he applied i already have it in the project. To put the address, and change data according in the buffer later on. If there is other changes i would have tried.
What value are you getting for logo.physical_address?
It shows an address and I can read the image as well from that address. (5FC84000). It is different every run.
I am using it for quite a long time now, but have not used the memory-mapped interface. Yes, I enabled the overlay that’s why the overlay is seen in the picture. I am using this IP, for multiple layers for other projects and the settings are okay, I am quite sure about it. There is not much complexity in the register value for this IP. For memory mapped there is only two registers are responsible, where i am using the first one only as i am using RGB image.