The example below run in approx 1.67 seconds on an Intel i3 2.3GHz. It performed the sequence VpFft, VpIfft. The two transformations are perfomed in-place on the contents of xformFC, which is of type VpFComplex. VpFComplex indicates a complex number in cartesian coordinates with fields of type real.
The parameter SIZE is set to 1024 * 1024
Note that the size of the array upon which VpFft and VpIfft are called must be a power of 2 for the given FFT algorithm to work.
module top;
parameter SIZE = 1024 * 1024;
real d;
VpFComplex xformFC [0:SIZE - 1];
VpFComplex origFC [0:SIZE - 1];
initial begin
#1;
$InitM(xformFC, (($I1==3) ? 7.0 : 0.0), 0.0);
$InitM(origFC, (($I1==3) ? 7.0 : 0.0), 0.0);
$VpFft(xformFC, 0, SIZE-1);
$VpIfft(xformFC, 0, SIZE-1);
d = $VpDistAbsMax(xformFC, origFC);
$display("maximum error=%e\n", d);
end
endmodule