Writing Traffic Generators in C++ - 2023.2 English - UG1393

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2023-12-13
Version
2023.2 English

Introduction

You can include an external traffic generator process while simulating your application to dynamically generate data traffic on the I/O, or to capture output data from the emulation process. The AMD provided C++ library can be used to create the traffic generator code as described in the following sections.

The C++ library having the API is divided into API for sending/receiving data in the form of byte array. The user data before sending needs to be converted into byte array and the data is received in the form of byte array which can be further converted to user data type using conversion APIs. There are also advanced API for packet level granularity if you need more control over transactions. For seamless interaction of traffic generators with simulation process, the API gives you control over sending or receiving the data without much worrying about managing packet level details like TLAST, this is auto managed by the sim_IPC infrastructure.

For C++, the APIs are available at:

$XILINX_VIVADO/data/emulation/cpp/inc/xtlm_ipc/axis/

You can build the executable with the following include path:

-I $XILINX_VIVADO/data/emulation/cpp/inc/xtlm_ipc/axis/

and linked against library as:

-L $XILINX_VIVADO/data/emulation/cpp/lib/

And use -lxtlm_ipc with a gcc compiler.

The C++ API are categorized as follows:

A full system-level example is available in the External_IO_CPP tutorial on GitHub.