Xilinx / Vitis-Tutorials

Vitis In-Depth Tutorials
https://Xilinx.github.io/Vitis-Tutorials/
MIT License
1.24k stars 554 forks source link

14-implementing FIR filter 1b - Emulation-AIE build crashes #248

Closed nielsvanetten closed 2 years ago

nielsvanetten commented 2 years ago

When building Emulation-AIE for the graph of 1b, it crashes: make[1]: Waiting for unfinished jobs.... make[1]: [25_0.elfgen.Makefile:14: 25_0] Error 5 make[1]: [24_1.elfgen.Makefile:14: 24_1] Error 5 make[1]: [24_0.elfgen.Makefile:14: 24_0] Error 5 aiecompiler 77-4608

Error in "/cadlinux/xilinx/Vitis/2021.2/aietools/include/aie_api/detail/aie1/mul_acc32_fp.hpp", line 85, column 115: [chess_error]: zstart argument (argument number 6) to "fpmac_conf" should be a compile-time constant This error occurred while running: noodle -v -I/cadlinux/xilinx/Vitis/2021.2/aietools/data/versal_prod/lib -I/cadlinux/xilinx/Vitis/2021.2/aietools/data/versal_prod/lib/isg -I/cadlinux/xilinx/Vitis/2021.2/aietools/include -I.. -I../data -I../src -I/cadlinux/xilinx/Vitis/2021.2/aietools/include -I/cadlinux/xilinx/Vitis_HLS/2021.2/include -I/home/HBM/netten/ws_IIRfilter1b/AI_IIRfilter/Emulation-AIE/. -I/home/HBM/netten/ws_IIRfilter1b/AI_IIRfilter/Emulation-AIE/.. -I/home/HBM/netten/ws_IIRfilter1b/AI_IIRfilter/Emulation-AIE/../data -I/home/HBM/netten/ws_IIRfilter1b/AI_IIRfilter/Emulation-AIE/../src -I/home/HBM/netten/ws_IIRfilter1b/AI_IIRfilter/Emulation-AIE/cadlinux/xilinx/Vitis/2021.2/aietools/include -I/home/HBM/netten/ws_IIRfilter1b/AI_IIRfilter/Emulation-AIE/cadlinux/xilinx/Vitis_HLS/2021.2/include -I/cadlinux/xilinx/Vitis/2021.2/aietools/data/versal_prod/lib/runtime_cxx/libcxx-lite/include -I/cadlinux/xilinx/Vitis/2021.2/aietools/data/versal_prod/lib/runtime_cxx/libs/libcxx-9.0.0/include-lite -I/cadlinux/xilinx/Vitis/2021.2/aietools/data/versal_prod/lib/runtime/include -DAIENGINE -DAIEARCH=1 -DDEPLOYMENT_ELF=1 +Oitm -iaie_core.h +Sinl +Olbb=200 +Opmsa +Olzyinl +w../Release/chesswork ../Release/chesswork/24_0.sfg +Q1=+Sinl,+Olbb=200,+Opmsa,+Olzyinl +Q2=+Sinl,+Olbb=200,+Opmsa,+Olzyinl +Q3=+Sinl,+Olbb=1000,+Opmsa,+Olzyinl +Qfast=+Sinl,+Olbb=1000,+Opmsa,+Olzyinl,+Opfp +Qs=+Sinl,+Olbb=200,+Opmsa,+Olzyinl +Qz=+Sinl,+Olbb=200,+Opmsa,+Olzyinl me Compilation not finished (1 errors, 17 warnings) make[1]: *** [24_0.elfgen.Makefile:14: 24_0] Error 5 make[1]: Leaving directory '/home/HBM/netten/ws_IIRfilter1b/AI_IIRfilter/Emulation-AIE/Work/aie' ERROR: [aiecompiler 77-4608] This application has discovered an error while executing the following command

make -C ./Work/aie -O -j 8 -f 24_0.elfgen.Makefile -f 24_1.elfgen.Makefile -f 25_0.elfgen.Makefile all 2>&1;

Emulation-SW does work though.

louiev-xlnx commented 2 years ago

In README.md: "In Part 1, we have focused only on functional verification using Emulation-SW. "

Part1 is not expected to be used with Emulation-AIE as it is intended to show the preliminary steps in the development process. Please see Part2a and Part2b to use Emulation-AIE.

If it is really required to run Emulation-AIE on Part1b, please make the following edits to kernel.cpp:

WAS:

for (auto i = 1; i < 12; i++) {
        coeff = aie::load_v<8>(&C[8 * i]);
        acc = aie::mac(acc, coeff, xreg[i + 4]); // xreg[] is not a compile-time constant
        ...
}

IS:

for (auto i = 1; i < 12; i++) {
        coeff = aie::load_v<8>(&C[8 * i]);
                float xval = xreg[i + 4];
        acc = aie::mac(acc, coeff, xval); // xval is a compile-time constant
        ...
}
nielsvanetten commented 2 years ago

thank you !