hls4ml.backends.vivado package

Subpackages

Submodules

hls4ml.backends.vivado.vivado_backend module

class hls4ml.backends.vivado.vivado_backend.VivadoBackend

Bases: FPGABackend

build(model, reset=False, csim=True, synth=True, cosim=False, validation=False, export=False, vsynth=False, fifo_opt=False)
create_initial_config(part='xcvu13p-flga2577-2-e', clock_period=5, clock_uncertainty='12.5%', io_type='io_parallel', namespace=None, write_weights_txt=True, write_tar=False, **_)

Create initial configuration of the Vivado backend.

Parameters:
  • part (str, optional) – The FPGA part to be used. Defaults to ‘xcvu13p-flga2577-2-e’.

  • clock_period (int, optional) – The clock period. Defaults to 5.

  • clock_uncertainty (str, optional) – The clock uncertainty. Defaults to 12.5%.

  • io_type (str, optional) – Type of implementation used. One of ‘io_parallel’ or ‘io_stream’. Defaults to ‘io_parallel’.

  • namespace (str, optional) – If defined, place all generated code within a namespace. Defaults to None.

  • write_weights_txt (bool, optional) – If True, writes weights to .txt files which speeds up compilation. Defaults to True.

  • write_tar (bool, optional) – If True, compresses the output directory into a .tar.gz file. Defaults to False.

Returns:

initial configuration.

Return type:

dict

get_default_flow()

The name of the default flow of the backend.

Default flow is used as the conversion target if the target flow has not been specified.

get_writer_flow()
init_base_layer(layer)
init_conv1d(layer)
init_conv2d(layer)
init_dense(layer)
init_depconv1d(layer)
init_depconv2d(layer)
init_embed(layer)
init_garnet(layer)
init_garnet_stack(layer)
init_gru(layer)
init_lstm(layer)
init_pooling1d(layer)
init_pooling2d(layer)
init_sepconv1d(layer)
init_sepconv2d(layer)
init_softmax(layer)

hls4ml.backends.vivado.vivado_types module

class hls4ml.backends.vivado.vivado_types.VivadoArrayVariableConverter(type_converter)

Bases: ArrayVariableConverter

class hls4ml.backends.vivado.vivado_types.VivadoArrayVariableDefinition

Bases: VariableDefinition

definition_cpp(name_suffix='', as_reference=False)
class hls4ml.backends.vivado.vivado_types.VivadoInplaceArrayVariableConverter(type_converter)

Bases: ArrayVariableConverter

class hls4ml.backends.vivado.vivado_types.VivadoInplaceArrayVariableDefinition

Bases: VariableDefinition

definition_cpp()
class hls4ml.backends.vivado.vivado_types.VivadoInplaceStreamVariableConverter(type_converter)

Bases: InplaceStreamVariableConverter

class hls4ml.backends.vivado.vivado_types.VivadoInplaceStreamVariableDefinition

Bases: VariableDefinition

definition_cpp()
class hls4ml.backends.vivado.vivado_types.VivadoStreamVariableConverter(type_converter)

Bases: StreamVariableConverter

class hls4ml.backends.vivado.vivado_types.VivadoStreamVariableDefinition

Bases: VariableDefinition

definition_cpp(name_suffix='', as_reference=False)

Module contents