W elcome to
Fintronic USA

redball.gif (326 bytes)About Fintronic USA

redball.gif (326 bytes)Main announcements

redball.gif (326 bytes)What's new at Fintronic

redball.gif (326 bytes)What our customers are saying...

redball.gif (326 bytes)Support for SystemC

redball.gif (326 bytes)Support for Verilog 2001

redball.gif (326 bytes)Third party tools integrated with FinSim(Specman, Denali, Debussy, Undertow, Vera, VirSim, HDL Score, Comet, Meteor, NelSim, Pivot, DeskPOD, @Designer 2.1)

home.htmlProductsSupportEvaluateContact

Fast autocorrelation in Verilog


This example works on FinSim 10_0_6 and subsequent versions.

This example shows how to perform a fast autocorrelation on two vectors of type VpFCartesian, which is a complex number in cartesian coordinates, with fields of type real

module top;
parameter SIZE = 1024;
VpFCartesian t1[2*SIZE -1:0], t2[2*SIZE -1:0], prod[2*SIZE -1:0];
integer j;

initial begin
#1;
   $InitM(t1, ($I1 < SIZE-1) ? 0 : $I1-SIZE+1, 0);
   $PrintM(t1, "%e");
   $InitM(t2, ($I1 < SIZE) ? 0 : 2*SIZE-$I1, 0);
   $PrintM(t2, "%e");
   $VpFft(t1, 0, 2*SIZE-1);
   $VpFft(t2, 0, 2*SIZE-1);
   for (j = 0; j < 2*SIZE; j = j + 1)
     begin
       prod[j] = t1[j] * t2[j];
     end
   $VpIfft(prod, 0, 2*SIZE-1);
   $PrintM(prod, "%e");
end
endmodule


Copyright 1999-2011, Fintronic USA, Inc.   All rights reserved.