We set first_set
to false
in aie_iir_1b.jl
as follows to generate another set of coefficients for an LPF with a passband of 20 MHz.
first_set = false; # true: 1st set; false: 2nd set
...
The frequency response with a 20MHz passband is as follows:
Move the generated *.h
(coefficient files) to src
and impresponse_b.dat
to data
.
We use two_freqs.jl
to generate an input signal (two_freqs.dat
) with two frequencies (f1 = 2 MHz, f2 = 18 MHz) to test the functionality of coefficient switching. The time and frequency domain plots of the signal are as follows:
Move the generated two_freqs.dat
to data
.
In the testbench (tb.cpp
), we uncomment #define RTP_SWITCH
to include the second set of coefficients.
Note: A wait()
statement is required to allow the specified number of iterations to complete before loading the new set of coefficients.
The output of the AI Engines is as follows (use check2.jl
):