3. Generators API

3.1. OpenFPGA Task Generator

class generators.openfpga_task_gen.OpenfpgaTaskLauncher(template_file, output_dir='.', **kwargs)

Generate an OpenFPGA task file and run it with the framework.

Parameters
  • template_file (str) – File name of the OpenFPGA-based template task.

  • output_dir (str, optional) – Output path name when running the task, usually refering to the run_dir.

  • device_layout (str, optional) – Specify the FPGA device layout.

  • channel_width (str, optional) – Specify the FPGA channel width.

  • abc_command (str, optional) – Specify the default ABC executable, usually between (abc or abc9).

  • lut_max_width (str, optional) – Specify arguments of the ABC -lut options to improve the LUT mapping. Read the Yosys documentation for more details, typical formats are: <width> or <w1>:<w2>.

Variables
  • openfpga_script_dir (str) – Path location of the OpenFPGA scripts.

  • openfpga_run_task (str) – Executable of the OpenFPGA task file.

  • target_file (str) – Generated OpenFPGA task file name, saved in the output_dir directory.

configure_task(**kwargs)

Generate the OpenFPGA-based configuration task file.

run(debug=False, **kwargs)

Run the OpenFPGA simulation with the generated task file.

Parameters
  • debug (bool, optional) – Enable the debug option in the flow.

  • task_options (list, optional) – Additional task flow options.