-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFFT4_LUT_tb.v
74 lines (64 loc) · 1.07 KB
/
FFT4_LUT_tb.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
`timescale 1ns / 1ps
module FFT4_LUT_tb_v;
reg Clk;
reg Reset, Start;
reg [3:0] address;
wire [16:0] coeff_real;
wire [16:0] coeff_imag;
// Instantiate the Unit Under Test (UUT)
FFT4_LUT_Re uut1 (
.k(address[3:2]),
.n(address[1:0]),
.twiddle(coeff_real)
);
FFT4_LUT_Im uut2 (
.k(address[3:2]),
.n(address[1:0]),
.twiddle(coeff_imag)
);
initial
begin
Clk = 0; // Initialize clock
end
// Keep clock running
always
begin
#20;
Clk = ~ Clk;
end
initial
begin
#200
address = 4'b0000;
#20
address = 4'b0001;
#20
address = 4'b0010;
#20
address = 4'b0011;
#20
address = 4'b0100;
#20
address = 4'b0101;
#20
address = 4'b0110;
#20
address = 4'b0111;
#200
address = 4'b1000;
#20
address = 4'b1001;
#20
address = 4'b1010;
#20
address = 4'b1011;
#20
address = 4'b1100;
#20
address = 4'b1101;
#20
address = 4'b1110;
#20
address = 4'b1111;
end
endmodule