pynq.bitstream Module

The pynq.pl module facilitates the bitstream class to be used on the Programmable Logic (PL). The Bitstream class manages downloading of bitstreams onto the PL. It converts the bit files into bin files and leverages the FPGA manager framework to download them onto the PL. It handles full bitstreams and partial bitstreams. It also manages the device tree segment associated with each full or partial bitstream.

class pynq.bitstream.Bitstream(bitfile_name, dtbo=None, partial=False, device=None)[source]

Bases: object

This class instantiates the meta class for PL bitstream (full/partial).

bitfile_name

The absolute path or name of the bit file as a string.

Type:str
dtbo

The absolute path of the dtbo file as a string.

Type:str
partial

Flag to indicate whether or not the bitstream is partial.

Type:bool
bit_data

Dictionary storing information about the bitstream.

Type:dict
binfile_name

The absolute path or name of the bin file as a string.

Type:str
firmware_path

The absolute path of the bin file in the firmware folder.

Type:str
timestamp

Timestamp when loading the bitstream. Format: year, month, day, hour, minute, second, microsecond

Type:str
download(parser=None)[source]

Download the bitstream onto PL and update PL information.

If device tree blob has been specified during initialization, this method will also insert the corresponding device tree blob into the system. This is same for both full bitstream and partial bitstream.

Note

For partial bitstream, this method does not guarantee isolation between static and dynamic regions.

Returns:
Return type:None
insert_dtbo(dtbo=None)[source]

Insert dtbo file into the system.

A simple wrapper of the corresponding method in the PL class. If dtbo is None, self.dtbo will be used to insert the dtbo file. In most cases, users should just ignore the parameter dtbo.

Parameters:dtbo (str) – The relative or absolute path to the device tree segment.
remove_dtbo()[source]

Remove dtbo file from the system.

A simple wrapper of the corresponding method in the PL class. This is very useful for partial bitstream downloading, where loading the new device tree blob will overwrites the existing device tree blob in the same partial region.