Your First Run
Run your first TAPA software simulation without FPGA hardware.
When to use this
Use this guide when you are learning TAPA for the first time, or when you want to quickly verify a design's correctness without synthesizing RTL or running on physical hardware.
What you need
- TAPA installed — see Installation
g++7.5.0 or newer (check withg++ --version)- The vadd example files:
vadd.cpp,vadd.h, andvadd-host.cpp. Place all three in one directory and run the commands below there.
Commands
Compile the kernel and host code together using the tapa g++ wrapper, then
run the resulting binary with no arguments to trigger software simulation:
tapa g++ -- vadd.cpp vadd-host.cpp -o vadd
./vadd
tapa g++ is a wrapper around the GNU C++ compiler that automatically
includes the necessary TAPA headers and libraries. It prints the underlying
g++ command it invokes for reference.
Pass both the kernel file (vadd.cpp) and the host file (vadd-host.cpp) in
the same command so the compiler builds the complete software-simulation
program. The kernel also includes vadd.h, which must be in the same
directory.
Expected output
WARNING: Logging before InitGoogleLogging() is written to STDERR
I... task.h:...] running software simulation with TAPA library
kernel time: 0.0032 s
PASS!
Timestamps, source line numbers, and the kernel time vary per run — only the
running software simulation line and PASS! matter. The leading WARNING:
line comes from glog and is harmless.
What this proves
The PASS! line confirms the vector addition produced correct results. The
running software simulation line shows that TAPA executed the kernel on the
CPU using its coroutine-based software simulator — no FPGA or Xilinx tools
were involved.
If something goes wrong
If the build fails, the binary hangs, or the output shows FAIL!, see
Your First Debug Cycle.