Compile the AI Engine graph (libadf.a
) using the AI Engine compiler:
make aie
After the AI Engine graph (libadf.a
) has been generated, verify for correctness using the AI Engine simulator:
make aiesim
After simulation completes, you should see output.txt
under aiesimulator_output/data
. You can compare output.txt
with the golden reference in data/golden.txt
using the following commands in command line:
grep -v T aiesimulator_output/data/output.txt > aiesimulator_output/data/output_data.txt
diff -w aiesimulator_output/data/output_data.txt ./data/golden.txt
If you have MATLAB or Octave, you can use the following script to visualize the data:
data=load('./aiesimulator_output/data/output_data.txt', '-ascii');
cxdata = data(:,1) + data(:,2)*i;
narrow_spectrum = 20*log10(abs(fftshift(fft(cxdata(1:1024)))));
wide_spectrum = 20*log10(abs(fftshift(fft(cxdata(1025:2048)))));
plot(narrow_spectrum);
plot(wide_spectrum);