pynq.pl_server.xrt_device Module

The pynq.pl_server.xrt_device module extends the device class to work with Xilinx Run Time (XRT) x86 enabled devices.

class pynq.pl_server.xrt_device.ExecBo(bo, ptr, device, length)[source]

Bases: object

Execution Buffer Object

Wraps an execution buffer used by XRT to schedule the execution of accelerators.

as_packet(ptype)[source]

Get a packet representation of the buffer object

Parameters:

ptype (ctypes struct) – The type to cast the buffer to

class pynq.pl_server.xrt_device.XrtDevice(index, tag='xrt{}')[source]

Bases: Device

allocate_bo(size, idx, cacheable)[source]
buffer_read(bo, bo_offset, buf, buf_offset=0, count=-1)[source]
buffer_write(bo, bo_offset, buf, buf_offset=0, count=-1)[source]
property clocks

Runtime clocks. This dictionary provides the actual clock frequencies that the hardware is running at. Frequencies are expressed in Mega Hertz.

close()[source]

Deprecated

property default_memory
property device_info
download(bitstream, parser=None)[source]
flush(bo, offset, ptr, size)[source]
gen_cache(bitstream, parser=None)[source]
get_device_address(bo)[source]
get_memory(desc)[source]
get_memory_by_idx(idx)[source]
get_memory_by_name(name)[source]
invalidate(bo, offset, ptr, size)[source]
map_bo(bo)[source]
property name
property sensors
set_event_loop(loop)[source]
class pynq.pl_server.xrt_device.XrtMemory(device, desc)[source]

Bases: object

Class representing a memory bank in a card

Memory banks can be both external DDR banks and internal buffers. XrtMemory instances for the same bank are interchangeable and can be compared and used as dictionary keys.

allocate(shape, dtype, **kwargs)[source]

Create a new buffer in the memory bank

Parameters:
  • shape (tuple(int)) – Shape of the array

  • dtype (np.dtype) – Data type of the array

property mem_used
property num_buffers
class pynq.pl_server.xrt_device.XrtStream(device, desc)[source]

Bases: object

XRT Streaming Connection

Encapsulates the IP connected to a stream. Note that the _ip attributes will only be populated if the corresponding device driver has been instantiated.

source

Source of the streaming connection as ip_name.port

Type:

str

sink

Sink of the streaming connection as ip_name.port

Type:

str

monitors

Monitor connections of the stream as a list of ip_name.port

Type:

[str]

source_ip

Source IP driver instance for the stream

Type:

pynq.overlay.DefaultIP

sink_ip

Sink IP driver instance for the stream

Type:

pynq.overlay.DefaultIP

monitor_ips

list of driver instances for IP monitoring the stream

Type:

[pynq.overlay.DefaultIP]

class pynq.pl_server.xrt_device.XrtUUID(val)[source]

Bases: object

class pynq.pl_server.xrt_device.xclDeviceUsage[source]

Bases: Structure

c2h

Structure/Union member

ddrBOAllocated

Structure/Union member

ddrMemUsed

Structure/Union member

dma_channel_cnt

Structure/Union member

h2c

Structure/Union member

memSize

Structure/Union member

mm_channel_cnt

Structure/Union member

totalContents

Structure/Union member

xclbinId

Structure/Union member