Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Commands

Reference for all tapa CLI subcommands. For task-oriented guides, see Build and Run and the other How-To pages. The general invocation form is:

tapa [global options] <subcommand> [subcommand options]

Note

tapa compile is a shortcut that runs tapa analyze, tapa synth, and tapa pack in sequence in a single command. When using the individual subcommands, pass --work-dir as a global flag before the subcommand name: tapa --work-dir DIR <subcommand>.

Global Options

These options must appear before the subcommand name.

FlagDescription
--work-dir DIR / -w DIRWorking directory for intermediate artifacts (default: ./work.out/).
--verbose / -vIncrease logging verbosity. Repeatable (e.g., -vv).
--quiet / -qDecrease logging verbosity.
--remote-host user@host[:port]Remote Linux host where vendor tools run.
--remote-key-file PATHSSH private key file for authenticating to the remote host.
--remote-xilinx-settings PATHPath to settings64.sh on the remote host.
--remote-ssh-control-dir DIRLocal directory for SSH multiplex control sockets.
--remote-ssh-control-persist DURATIONHow long the SSH master socket stays alive (default: 30m).
--remote-disable-ssh-muxDisable SSH connection multiplexing.

tapa compile

Run the full compilation pipeline (analyze → synth → pack) in a single command.

Required flags

FlagDescription
--top FUNCTION / -t FUNCTIONTop-level task function name.
-f FILEKernel source file.
-o OUTPUT.xoOutput XO file path.

Optional flags

FlagDescription
--part-num PARTTarget FPGA part number (e.g., xcu250-figd2104-2L-e).
--platform PLATFORMVitis platform string. Alternative to --part-num.
--clock-period NSTarget clock period in nanoseconds.
--target {xilinx-vitis,xilinx-hls,xilinx-aie}Output target (default: xilinx-vitis). xilinx-aie is experimental.
-j NNumber of parallel HLS jobs.
--custom-rtl PATHCustom RTL file or directory to include in the XO.

Example

tapa compile \
  --top VecAdd \
  --part-num xcu250-figd2104-2L-e \
  --clock-period 3.33 \
  -f vadd.cpp \
  -o vadd.xo

tapa analyze

Parse C++ source and extract the task graph to a JSON file in the work directory. This stage always runs locally and does not require vendor tools.

Required flags

FlagDescription
--top FUNCTION / -t FUNCTIONTop-level task function name.
-f FILEKernel source file.

Optional flags

FlagDescription
--target {xilinx-vitis,xilinx-hls,xilinx-aie}Output target (default: xilinx-vitis). Controls the synthesis flow. xilinx-aie is experimental.

Example

tapa --work-dir work.out analyze --top VecAdd -f vadd.cpp

tapa synth

Run Vitis HLS on each task to produce per-task Verilog RTL. Reads the task graph produced by tapa analyze from the work directory. Can run on a remote host via --remote-host.

Required flags

FlagDescription
--part-num PARTTarget FPGA part number. Required if --platform is not set.
--platform PLATFORMVitis platform string. Required if --part-num is not set.

Optional flags

FlagDescription
--clock-period NSTarget clock period in nanoseconds. Can be derived from --platform if not set explicitly.
-j NNumber of parallel HLS jobs (default: number of physical CPU cores).
--enable-synth-utilRun post-HLS RTL synthesis to produce per-task resource utilization estimates.
--nonpipeline-fifos JSONJSON specification of FIFOs for which pipeline registers should be suppressed.
--gen-ab-graphGenerate ab_graph.json for AutoBridge/RapidStream floorplanning.
--gen-graphirGenerate graphir.json for RapidStream.
--floorplan-config PATHPath to the floorplan configuration file. Used with --gen-ab-graph or --gen-graphir.
--device-config PATHPath to the device configuration file. Used with --gen-graphir.
--floorplan-path PATHPath to an existing floorplan file to apply during synthesis. Requires --flatten-hierarchy.

Example

tapa --work-dir work.out synth \
  --part-num xcu250-figd2104-2L-e \
  --clock-period 3.33 \
  -j 4

tapa pack

Package per-task RTL from the work directory into a single output artifact. For the default xilinx-vitis target this produces an XO file; for other targets a ZIP file is produced. Reads RTL produced by tapa synth.

Optional flags

FlagDescription
-o OUTPUTOutput file path (default: work.xo for the Vitis target, work.zip for other targets).
--custom-rtl PATHCustom RTL file or directory to include in the XO.

Example

tapa --work-dir work.out pack -o vadd.xo

tapa g++

Compile TAPA host and kernel C++ for software simulation. This is a wrapper around g++ that automatically sets the required TAPA include paths and link flags. All arguments after -- are forwarded directly to g++.

Example

tapa g++ -- vadd.cpp vadd-host.cpp -o vadd

See Software Simulation for how to run the resulting executable.


tapa version

Print the installed TAPA version.

tapa version