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>