How to write and read image using ACP port, Jupyter

Hi Cathal,

I have been following your advice and I have changed it to HP port. I thought that just the ACP port could communicate PL and PS without the DMA, after reading the tutorial. I would like to try without DMA first, and later with DMA and streaming. Below I have pasted the code from Jupyter

import pynq
import pynq.lib.dma
import numpy as np

from PIL import Image
from IPython.display import display
from pynq import Overlay
from pynq import DefaultIP
from pynq import DefaultHierarchy
from pynq import Xlnk
from pynq import MMIO
base = Overlay("/home/xilinx/pynq/overlays/tuto_conv/top.bit")
image_path = "/home/xilinx/jupyter_notebooks/TUTORIALS/Tuto_conv/test.jpg"
original_image = Image.open(image_path)
original_image.load()
input_array = np.array(original_image)
input_image = Image.fromarray(input_array)
display(input_image)
xlnk=Xlnk()
in_buffer = xlnk.cma_array(shape=(360,640,3), dtype=np.uint8, cacheable=1)
out_buffer = xlnk.cma_array(shape=(360,640,3), dtype=np.uint8, cacheable=1)
hex(in_buffer.physical_address)
hex(out_buffer.physical_address)
in_buffer[0:360*640*3] = input_array
buf_image = Image.fromarray(in_buffer)
display(buf_image)
IP_BASE_ADDRESS = 0x43C00000
ADDRESS_RANGE = 0x10000
mmio = MMIO(IP_BASE_ADDRESS, ADDRESS_RANGE)

# 0x10 : Data signal of image_in      bit 31~0 - image_in[31:0] (Read/Write)
mmio.write(0x10,0x18100000)
# 0x18 : Data signal of image_out     bit 31~0 - image_out[31:0] (Read/Write)
mmio.write(0x18,0x18200000)
buf_image_out = Image.fromarray(out_buffer)
display(buf_image_out)

As I expected the output image is black. Could you tell me if this is the right way?

THank you so much