I have a project running on PYNQ v2.6. I just have ported the program to the newer PYNQ. (I have seen some differences between axi slave calling through overlay function, which is solved and not relevant to this, I hope). Now, the main problem I am having is the repeated allocation of a buffer. It shows an error for allocation.
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-13-5412c6fea447> in <module>
    233                        
    234                         
--> 235             frame = allocate(shape=(int(height/3), int(width/5), 3), dtype=np.uint8, cacheable=True)
    236            
    237             
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/buffer.py in allocate(shape, dtype, target, **kwargs)
    170     if target is None:
    171         target = Device.active_device
--> 172     return target.allocate(shape, dtype, **kwargs)
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/device.py in allocate(self, shape, dtype, **kwargs)
    290 
    291         """
--> 292         return self.default_memory.allocate(shape, dtype, **kwargs)
    293 
    294     def reset(self, parser=None, timestamp=None, bitfile_name=None):
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/xrt_device.py in allocate(self, shape, dtype, **kwargs)
    167 
    168         """
--> 169         buf = _xrt_allocate(shape, dtype, self.device, self.idx, **kwargs)
    170         buf.memory = self
    171         return buf
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/xrt_device.py in _xrt_allocate(shape, dtype, device, memidx, cacheable, pointer, cache)
    122         bo, buf, device_address = pointer
    123     else:
--> 124         bo = device.allocate_bo(size, memidx, cacheable)
    125         buf = device.map_bo(bo)
    126         device_address = device.get_device_address(bo)
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/xrt_device.py in allocate_bo(self, size, idx, cacheable)
    412                             xrt.xclBOKind.XCL_BO_DEVICE_RAM, idx)
    413         if bo >= 0x80000000:
--> 414             raise RuntimeError("Allocate failed: " + str(bo))
    415         return bo
    416 
RuntimeError: Allocate failed: 4294967295
What’s needs to be changed in order to make it work? I just want to remind that, this program has so far no problem running on v2.6.
Edit: There might be a need for these following information:
** First time it always works, from the second time it shows the error.
** In my project, I have used two vdma and DisplayPort output.
** surprisingly, custom i2c IP started working in v2.7 which is controlled by custom axi slave, was not working in v2.6.
** All custom axi slave had to redefine e.g.: controller = overlay.pipeline_top_0.axi_s to controller = overlay.pipeline_top_0
** The project is a video pipeline that supports 60FPS. But the FPS is greatly reducing (~8) if I use the allocate function in the while loop. But If I keep outside the loop it is providing 60FPS, but I can’t achieve my goal to refresh the buffer this way (meant overlays are scrambled)
Thanks