L1 Test

All L1 primitives’ implementations have been tested against implementations in python. That is, a python based testing environment has been developed to generate random test inputs for each primitive, compute the golden reference, and finally compare the golden reference with the csim and cosim outputs of the primitive to verify the correctness of the implementation. To run the testing process of L1 primitives, please follow the steps below.

1. Set up Python environment

Please follow the instructions described in Python environment setup guide to install anaconda3 and setup xf_hpc environment. All testing should be run under xf_hpc environment. Please deactivate xf_hpc environment after testing.

2. Set up Vitis_hls environment

Please navigate to directory L1/tests, and change the setting of environment variable TA_PATH to point to the installation path of your Vitis 2021.1, and run following command to set up Vivado_hls environment.

export XILINX_VITIS=${TA_PATH}/Vitis/2021.1
source ${XILINX_VITIS}/settings64.sh

3. Test L1 primitives

To launch the testing process, please navigate to the directory L1/tests/hw/. There are three functions under testing in this direcotry. For each function, there are several test cases with various configurations under ./tests/ directory. For each test case, please use following commands to check the Makefile usage

make help

Makefile usage example:

make run CSIM=1 CSYNTH=1 COSIM=1 DEVICE=<FPGA platform> PLATFORM_REPO_PATHS=<path to platform directories>

Command to run the selected tasks for specified device. Valid tasks are ‘CSIM’, ‘CSYNTH’, ‘COSIM’, ‘VIVADO_SYN’, ‘VIVADO_IMPL’.

‘PLATFORM_REPO_PATHS’ variable is used to specify the paths in which the platform files will be searched for.

‘DEVICE’ is case-insensitive and support awk regex. For example:

make run DEVICE='u280.*xdma' COSIM=1

It can also be an absolute path to a platform file.