pynq.devicetree Module¶

The pynq.devicetree module enables users to insert or remove a device tree segment. This can happen when users load a full/partial bitstream.

class pynq.devicetree.DeviceTreeSegment(dtbo_path)[source]

Bases: object

This class instantiates the device tree segment object.

dtbo_name

The base name of the dtbo file as a string.

Type: str
dtbo_path

The absolute path to the dtbo file as a string.

Type: str
insert()[source]

Insert the dtbo file into the device tree.

The method will raise an exception if the insertion has failed.

is_dtbo_applied()[source]

Show if the device tree segment has been applied.

Returns: True if the device tree status shows applied. bool
remove()[source]

Remove the dtbo file from the device tree.

pynq.devicetree.get_dtbo_base_name(dtbo_path)[source]

This method returns the base name of the dtbo file.

For example, the input “/home/xilinx/pynq/overlays/name1/name2.dtbo” will lead to the result “name2”.

Parameters: dtbo_path (str) – The absolute path of the dtbo file. The base name of the dtbo file. str
pynq.devicetree.get_dtbo_path(bitfile_name)[source]

This method returns the path of the dtbo file.

For example, the input “/home/xilinx/pynq/overlays/base/base.bit” will lead to the result “/home/xilinx/pynq/overlays/base/base.dtbo”.

Parameters: bitfile_name (str) – The absolute path of the bit file. The absolute path of the dtbo file. str