Here is the list of PL kernel specific APIs and their usage in
integrating the traffic generators. With the Python API you can create the traffic
generator code to generate data to pass into or collect data from PL kernels. Use
the following API to instantiate objects to send and receive data. You can provide
any datatype vector/list to send_data
or receive_data
.
- Instantiating Classes to Send or Receive Data
-
The APIs are found in the following library path:
You need to set${XILINX_VIVADO}/data/emulation/python/xtlm_ipc_v2/
PYTHONPATH
to point to this library.export PYTHONPATH=${XILINX_VIVADO}/data/emulation/python/xtlm_ipc_v2/
hls_input_stream(name, datatype) hls_output_stream(name, datatype)
- send_data()
-
send_data(data, tlast) creates a non-blocking call to send data
Parameters:
- data: list of specified datatype for the object
- tlast: boolean value, can be true or false
- receive_data()
-
receive_data() creates a blocking call to receive data
RETURNS a list of specified datatype
Note: The datatype must be specified during object instantiation - receive_data_with_size()
-
receive_data_with_size(data_size) creates a blocking call to receive a specified amount of data
RETURNS a list of specified datatype
Parameters:
- data_size: integer value indicating the amount of data in bytes to receive
Note: Data size must be specified in
bytes.
- receive_data_on_tlast()
-
receive_data_on_tlast() creates a blocking call returning data after receiving tlast packet
RETURNS list of specified data type
Note: The data type must be specified during
object instantiation.