hls4ml.writer package

Submodules

hls4ml.writer.quartus_writer module

class hls4ml.writer.quartus_writer.QuartusWriter

Bases: Writer

get_max_reuse_factor(model)
next_pow2(x)
print_array_to_cpp(var, layer, odir)
write_activation_tables(model)
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_testbench_parallel(model)
write_testbench_stream(model)
write_weights(model)
write_yml(model)

hls4ml.writer.vivado_accelerator_writer module

class hls4ml.writer.vivado_accelerator_writer.VivadoAcceleratorWriter

Bases: 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 ModelGraph to write the wrapper for

write_board_script(model)

Write the tcl scripts and kernel sources 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: Writer

print_array_to_cpp(var, odir, write_txt_file=True)
write_bridge(model)
write_build_script(model)
write_defines(model)
write_generated_code(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