pynq.buffer Module¶
Home of the pynq.allocate
function
-
class
pynq.buffer.
PynqBuffer
[source]¶ Bases:
numpy.ndarray
A subclass of numpy.ndarray which is allocated using physically contiguous memory for use with DMA engines and hardware accelerators. As physically contiguous memory is a limited resource it is strongly recommended to free the underlying buffer with close when the buffer is no longer needed. Alternatively a with statement can be used to automatically free the memory at the end of the scope.
This class should not be constructed directly and instead created using pynq.allocate().
-
device_address
¶ The physical address to the array
Type: int
-
coherent
¶ Whether the buffer is coherent
Type: bool
-
cacheable
¶
-
freebuffer
()[source]¶ Free the underlying memory
This will free the memory regardless of whether other objects may still be using the buffer so ensure that no other references to the array exist prior to freeing.
-
physical_address
¶
-