The AI Engine simulator can detect memory violations at runtime.
By specifying the --enable-memory-check option,
aiesimulator can detect memory violations and
show messages, such as:
4040800 ps [ERROR] tl.aie_logical.aie_xtlm.math_engine.array.tile_32_1.cm.proc: dme_lda_e_out access out of boundary! address = 0x3b000 prog_cntr = 0x00001101000000
4040800 ps [ERROR] tl.aie_logical.aie_xtlm.math_engine.array.tile_32_1.cm.proc: dmo_lda_e_out access out of boundary! address = 0x3b010 prog_cntr = 0x00001101000000
The run summary shows memory violations in the AMD Vitis™ IDE. The Memory Violations tab shows the tile in which the violation occurred. Click the PC values of the violations to cross probe with the source code to determine where the issue originates. Below is an example of memory violations:
When source code has out-of-bounds (OOB) access, these typically lead to
access violations. The compiler can remove this access, optimizing the program in
the process. Such violations might not be reported by the --enable-memory-check option. Furthermore, if the source code carries
out OOB access to another buffer allocated by the compiler, these instances also
remain unreported. In such cases, it is recommended to run x86simulator with --valgrind to flag any access violations.