CMake API Reference
Below you find a list of CMake Modules included in this project.
Utility Modules
- chimera_select_shape(OPTION <var> DEFAULT <shape> HEADER_PREFIXES <prefix>...)
Pick one data shape for a test at configure time. Shapes are discovered from the headers matching the first
HEADER_PREFIXESentry, so adding<prefix><shape>.his enough to make a new shape selectable.Sets
SELECTED_SHAPEandSELECTED_SHAPE_SOURCEin the caller’s scope.- Param OPTION:
Cache variable exposed to the user. Required.
- Param DEFAULT:
Shape used when
OPTIONis unset. Required.- Param HEADER_PREFIXES:
Prefixes of the per-shape headers. The first discovers the shapes; all must exist for the selected one. Required.
- Param HEADER_DIR:
Where the headers live. Defaults to
include.- Param SOURCE_PREFIX:
If given, also select
<SOURCE_DIR>/<prefix><shape>.c.- Param SOURCE_DIR:
Where the sources live. Defaults to
src_cluster.
Example Usagechimera_select_shape( OPTION ITA_MATMUL_L1_SHAPE DEFAULT 64x128x64 HEADER_PREFIXES ITA_dims_ SOURCE_PREFIX ITA_mem_ )
- chimera_test_vector_generator(GENERATOR <script> OUTPUTS <file>...)
Register a test’s
generate_vectors.py. Fails configure with an actionable message when the vectors have not been generated yet, and adds them to theregenerate-test-vectorstarget.- Param GENERATOR:
Path to the generator script. Required.
- Param OUTPUTS:
Files the generator writes. Required. Used for the missing-vector check and as the target’s byproducts.
- Param ARGS:
Optional generator arguments. Omit when the generator already defaults to the right paths, which is the usual case.
- add_chimera_subdirectories(target_platform, category, mappings)
Add subdirectories based on a mapping of target platforms to folders. The mappings are expected to be in the format
target_platform:folder1,folder2,.... :param target_platform: The target platform to build for. :param category: The category of the subdirectories. :param mappings: A list of mappings from target platforms to folders. Make sure to wrap the list in quotes!Example Usageset(MAPPINGS chimera-convolve:snitch_cluster chimera-open:snitch_cluster chimera-host: ) add_chimera_subdirectories(${TARGET_PLATFORM} "Device" "${MAPPINGS}")