-
Notifications
You must be signed in to change notification settings - Fork 5
/
MSAC.v
102 lines (100 loc) · 2.45 KB
/
MSAC.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//`timescale 1ns / 1ps
//module MSAC (input sample_clock, input reset, input param, input [15:0] input_sample1, output [15:0] output_sample1);
//parameter N = param; //Specify the number of taps
////reg [15:0] delayholder[N-1:0];
////
////wire [31:0] summation[N-1:0];
////
////wire [15:0] finsummations[N-1:0];
////wire [15:0] finsummation;
////
////integer x;
////integer z;
////
//////Specifying our coefficients
////reg signed[15:0] coeffs[200:0];
////
////
////always @(*)
////begin
////
////for (x=0; x<N; x=x+31)
////begin
////
//// coeffs[x+0] = 0;
//// coeffs[x+1] = 2267;
//// coeffs[x+2] = 0;
//// coeffs[x+3] = -3030;
//// coeffs[x+4] = 0;
//// coeffs[x+5] = 4621;
//// coeffs[x+6] = 0;
//// coeffs[x+7] = -6337;
//// coeffs[x+8] = 0;
//// coeffs[x+9] = 7985;
//// coeffs[x+10] = 0;
//// coeffs[x+11] = -9536;
//// coeffs[x+12] = 1;
//// coeffs[x+13] = 10265;
//// coeffs[x+14] = -1;
//// coeffs[x+15] = 87720;
//// coeffs[x+16] = -1;
//// coeffs[x+17] = 10265;
//// coeffs[x+18] = 1;
//// coeffs[x+19] = -9536;
//// coeffs[x+20] = 0;
//// coeffs[x+21] = 7985;
//// coeffs[x+22] = 0;
//// coeffs[x+23] = -6337;
//// coeffs[x+24] = 0;
//// coeffs[x+25] = 4621;
//// coeffs[x+26] = 0;
//// coeffs[x+27] = -3030;
//// coeffs[x+28] = 0;
//// coeffs[x+29] = 2267;
//// coeffs[x+30] = 0;
//// end
////end
////
////generate
////genvar i;
////for (i=0; i<N; i=i+1)
//// begin: mult1
//// multiplier mult1(.dataa(coeffs[i]), .datab(delayholder[i]),.result(summation[i]));
//// end
////endgenerate
////
////always @(posedge sample_clock or posedge reset)
////begin
////if(reset)
//// begin
//// output_sample1 = 0;
//// for (z=0; z<N; z=z+1)
//// begin
//// delayholder[z] = 0;
//// end
////end
////
////else
//// begin
//// for (z=N-1; z>0; z=z-1)
//// begin
//// delayholder[z] = delayholder[z-1];
//// end
//// delayholder[0] = input_sample1;
////end
////
//// for (z=0; z<N; z=z+1)
//// begin
//// finsummations[z] = summation[z] >> 15; //{summation[z][15], summation[z][15], summation[z][15:2]}
//// end
////
//// finsummation = 0;
//// for (z=0; z<N; z=z+1)
//// begin
//// finsummation = finsummation + finsummations[z];
//// end
////
//// output_sample1 = finsummation;
////end
////
//endmodule