pynq_composable.parser Module

The pynq_composable.parser module parses the metadata in the hwh files for the full bitstreams and partial bitstreams and provides the c_dict and dfx_dict dictionaries that are paramount to interact with the composable overlays.

class pynq_composable.parser.HWHComposable(hwh_file: str, switch_name: str, cache=True)[source]

Bases: object

Parse the HWH file(s) to create the composable connectivity map

c_dict

All the IP cores connected to the AXI4-Stream Switch. Key is the name of the IP; value is a dictionary mapping the producer and consumer to the switch port, whether the IP is in a dfx region and loaded

{str: {‘ci’ : list, ‘pi’ : list, ‘modtype’: str, ‘dfx’: bool, ‘loaded’: bool, ‘bitstream: str’}}

Type

dict

dfx_dict

All the DFX regions in the hierarchy. Key is the name of the dfx region value is a dictionary with DFX decoupler, PS GPIO that controls the DFX decoupler and partial bitstreams associated to the region

{str: {‘decoupler’ : str, ‘gpio’ : {‘decouple’ : int, ‘status’ : int}, ‘ip’: dict}}

Type

dict

Note

This class requires that partial bitstreams and corresponding HWH files to be next to bitstream file that was used to create the Overlay object The name convention for partial bitstreams and HWH file is

<bitstream_name>_<hierarchy>_<pr_region>_<pr_module_name>.{bit|hwh}

For instance if the main bitstream is base.bit and there are two DFX regions with the names pr_0 and pr_1 each of them with the same two reconfigurable module, function_1 and function_2 the names should be as follow

base_composable_pr_0_function_1.bit base_composable_pr_0_function_1.hwh base_composable_pr_0_function_2.bit base_composable_pr_0_function_2.hwh base_composable_pr_1_function_1.bit base_composable_pr_1_function_1.hwh base_composable_pr_1_function_2.bit base_composable_pr_1_function_2.hwh