Library Element Unit Test - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

Each library element category comes supplied with a test harness. It is located in the L2/tests/aie/<library_element> directory. Test harness consists of JSON, C++ files, as well as a Makefile.

JSON description of the test harness, defined in L2/tests/aie/<library_element>/description.json has been used to generate Makefile. In addition, description.json file defines parameters of of the test harness, e.g. list of supported platforms.

Each Makefile uses a set of values for each of the library element parameters that are stored in in a JSON file, in L2/tests/aie/<library_element>/multi_params.json. Set of parameters are combined in a form of a named testcase, with default name being: test_0_tool_canary_aie. Set of parameters can be edited as required to configure the library element for your needs.

C++ files serve as an example of how to use the library element subgraph in the context of a super-graph. These test harnesses (graphs) can be found in the L2/tests/aie/<library_element>/test.hpp and L2/tests/aie/<library_element>/test.cpp file.

Although it is recommended that only L2 (graphs) library elements are instantiated directly in user code, the kernels underlying the graphs can be found in the L1/include/aie/<library_element>.hpp and the L1/src/aie/<library_element>.cpp files.

Test harness run consists of several steps that result in a simulated and validated design. These include:

  • input files(s) generation,
  • validate configuration with metadata (in: L2/meta),
  • reference model compilation & simulation, in order to produce golden output.
  • uut design compilation & simulation
  • output post-processing (e.g. timestamps processing to produce throughput figures). The output of the reference model ( logs/ref_output.txt ) is verified against the output of the AIE graphs ( logs/uut_output.txt ).
  • status generation. On completion of the make, the file logs/status_<config_details>.txt will contain the result of compilation, simulation and an indication of whether the reference model and AIE model outputs match. Report will also contain resource utilization and performance metrics.