Xilinx Toolbox

A collection of functions specifically designed to operate on Xilinx FPGA netlists.

xilinx_toolbox.parse_xdc_file(nl: hal_py.Netlist, xdc_file: os.PathLike) → bool

Parse an .xdc file and extract the position LOC and BEL data of each gate. Translates the coordinates extracted from the .xdc file into integer values.

Parameters
  • nl (hal_py.Netlist) – The netlist to operate on.

  • xdc_file (path) – The path to the .xdc file.

Returns

True on success, False otherwise.

Return type

bool

xilinx_toolbox.split_luts(*args, **kwargs)

Overloaded function.

  1. split_luts(gates: List[hal_py.Gate], create_module: bool = False) -> int

    Split a list of LUT6_2 gates into separate LUT gates.

    Calls split_lut() for each gate in gates. Gates that cannot be split are skipped with a warning; processing always continues with the remaining gates.

    param list[hal_py.Gate] gates

    The LUT6_2 gates to split.

    param bool create_module

    If True, each split gate’s replacements are placed into a new module named after the original gate. If False (default), replacements inherit the parent module of the original gate.

    returns

    The number of successfully split gates.

    rtype

    int

  2. split_luts(nl: hal_py.Netlist, gates: List[hal_py.Gate] = [], create_module: bool = False) -> Optional[int]

    Split the LUT6_2 gates of the netlist, or of the given gates, into separate LUT gates.

    Finds all gates of type LUT6_2 within gates (or within the netlist if gates is empty) and calls split_luts() on them.

    param hal_py.Netlist nl

    The netlist to operate on.

    param list[hal_py.Gate] gates

    The gates to consider. Defaults to an empty list, in which case all gates of the netlist are considered.

    param bool create_module

    If True, each split gate’s replacements are placed into a new module named after the original gate. If False (default), replacements inherit the parent module of the original gate.

    returns

    The number of successfully split LUT6_2 gates on success, None otherwise.

    rtype

    int or None

xilinx_toolbox.split_shift_registers(*args, **kwargs)

Overloaded function.

  1. split_shift_registers(gates: List[hal_py.Gate], create_module: bool = False) -> Optional[int]

    Split a list of shift register primitives into equivalent FDCE flip-flop chains.

    Supported gate types: SRL16, SRL16E, SRLC16E, SRLC32E.

    Calls split_shift_register() for each gate in gates. Gates that cannot be split (e.g. because an address pin is not driven by a constant net) are skipped with a warning; processing always continues with the remaining gates.

    param list[hal_py.Gate] gates

    The shift register gates to split.

    param bool create_module

    If True, each split gate’s replacements are placed into a new module named after the original gate. If False (default), replacements inherit the parent module of the original gate.

    returns

    The number of successfully split gates.

    rtype

    int

  2. split_shift_registers(nl: hal_py.Netlist, gates: List[hal_py.Gate] = [], create_module: bool = False) -> Optional[int]

    Split the shift register primitives of the netlist, or of the given gates, into equivalent FDCE flip-flop chains.

    Supported gate types: SRL16, SRL16E, SRLC16E, SRLC32E.

    Finds all gates of one of the supported types within gates (or within the netlist if gates is empty) and calls split_shift_registers() on them.

    param hal_py.Netlist nl

    The netlist to operate on.

    param list[hal_py.Gate] gates

    The gates to consider. Defaults to an empty list, in which case all gates of the netlist are considered.

    param bool create_module

    If True, each split gate’s replacements are placed into a new module named after the original gate. If False (default), replacements inherit the parent module of the original gate.

    returns

    The number of successfully split shift register gates.

    rtype

    int

class xilinx_toolbox.XilinxToolboxPlugin

This class provides an interface to integrate the Xilinx toolbox as a plugin within the HAL framework.

property dependencies

A set of plugin names that this plugin depends on.

Type

set[str]

property description

The description of the plugin.

Type

str

get_dependencies(self: xilinx_toolbox.XilinxToolboxPlugin) → Set[str]

Get a set of plugin names that this plugin depends on.

Returns

A set of plugin names that this plugin depends on.

Return type

set[str]

get_description(self: xilinx_toolbox.XilinxToolboxPlugin) → str

Get the description of the plugin.

Returns

The description of the plugin.

Return type

str

get_name(self: xilinx_toolbox.XilinxToolboxPlugin) → str

Get the name of the plugin.

Returns

The name of the plugin.

Return type

str

get_version(self: xilinx_toolbox.XilinxToolboxPlugin) → str

Get the version of the plugin.

Returns

The version of the plugin.

Return type

str

property name

The name of the plugin.

Type

str

property version

The version of the plugin.

Type

str