hls4ml.writer package

Submodules

hls4ml.writer.vivado_accelerator_writer module

class hls4ml.writer.vivado_accelerator_writer.VivadoAcceleratorWriter

Bases: hls4ml.writer.vivado_writer.VivadoWriter

modify_build_script(model)

Modify the build_prj.tcl and build_lib.sh scripts to add the extra wrapper files and set the top function

write_axi_wrapper(model)

Write a top level HLS C++ file to wrap the hls4ml project with AXI interfaces :param model: The HLSModel to write the wrapper for

write_board_script(model)

Write the tcl scripts to create a Vivado IPI project for the VivadoAccelerator

write_driver(model)
write_hls(model)

Write the HLS project. Calls the VivadoBackend writer, and extra steps for VivadoAccelerator/AXI interface

write_new_tar(model)
write_wrapper_test(model)

hls4ml.writer.vivado_writer module

class hls4ml.writer.vivado_writer.VivadoWriter

Bases: hls4ml.writer.writers.Writer

print_array_to_cpp(var, odir, write_txt_file=True)
type_definition_cpp(model, atype)
variable_definition_cpp(model, var, name_suffix='', as_reference=False)
write_bridge(model)
write_build_script(model)
write_defines(model)
write_hls(model)
write_nnet_utils(model)
write_parameters(model)
write_project_cpp(model)
write_project_dir(model)
write_project_header(model)
write_tar(model)
write_test_bench(model)
write_weights(model)
write_yml(model)

hls4ml.writer.writers module

class hls4ml.writer.writers.Writer

Bases: object

write_hls(model)
hls4ml.writer.writers.get_writer(name)
hls4ml.writer.writers.register_writer(name, writer_cls)

Module contents