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
.xdcfile and extract the position LOC and BEL data of each gate. Translates the coordinates extracted from the.xdcfile into integer values.- Parameters
nl (hal_py.Netlist) – The netlist to operate on.
xdc_file (path) – The path to the
.xdcfile.
- Returns
Trueon success,Falseotherwise.- Return type
- xilinx_toolbox.split_luts(*args, **kwargs)
Overloaded function.
split_luts(gates: List[hal_py.Gate], create_module: bool = False) -> int
Split a list of
LUT6_2gates into separate LUT gates.Calls
split_lut()for each gate ingates. 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_2gates to split.- param bool create_module
If
True, each split gate’s replacements are placed into a new module named after the original gate. IfFalse(default), replacements inherit the parent module of the original gate.- returns
The number of successfully split gates.
- rtype
int
split_luts(nl: hal_py.Netlist, gates: List[hal_py.Gate] = [], create_module: bool = False) -> Optional[int]
Split the
LUT6_2gates of the netlist, or of the given gates, into separate LUT gates.Finds all gates of type
LUT6_2withingates(or within the netlist ifgatesis empty) and callssplit_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. IfFalse(default), replacements inherit the parent module of the original gate.- returns
The number of successfully split
LUT6_2gates on success,Noneotherwise.- rtype
int or None
- xilinx_toolbox.split_shift_registers(*args, **kwargs)
Overloaded function.
split_shift_registers(gates: List[hal_py.Gate], create_module: bool = False) -> Optional[int]
Split a list of shift register primitives into equivalent
FDCEflip-flop chains.Supported gate types:
SRL16,SRL16E,SRLC16E,SRLC32E.Calls
split_shift_register()for each gate ingates. 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. IfFalse(default), replacements inherit the parent module of the original gate.- returns
The number of successfully split gates.
- rtype
int
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
FDCEflip-flop chains.Supported gate types:
SRL16,SRL16E,SRLC16E,SRLC32E.Finds all gates of one of the supported types within
gates(or within the netlist ifgatesis empty) and callssplit_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. IfFalse(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.
- get_dependencies(self: xilinx_toolbox.XilinxToolboxPlugin) Set[str]
Get a set of plugin names that this plugin depends on.
- get_description(self: xilinx_toolbox.XilinxToolboxPlugin) str
Get the description of the plugin.
- Returns
The description of the plugin.
- Return type
- get_name(self: xilinx_toolbox.XilinxToolboxPlugin) str
Get the name of the plugin.
- Returns
The name of the plugin.
- Return type
- get_version(self: xilinx_toolbox.XilinxToolboxPlugin) str
Get the version of the plugin.
- Returns
The version of the plugin.
- Return type