source: trunk/MultiChannelUSB/adc_fifo.v@ 40

Last change on this file since 40 was 27, checked in by demin, 15 years ago

initial commit

File size: 1.3 KB
Line 
1module adc_fifo
2 (
3 input wire adc_clk,
4 input wire [11:0] adc_data,
5
6 input wire aclr,
7 input wire rdclk,
8 input wire rdreq,
9 output wire rdempty,
10 output wire [11:0] raw_data,
11 output wire [13:0] uwt_data
12 );
13
14 wire [31:0] uwt_d1, uwt_a1, uwt_peak1;
15 wire [31:0] uwt_d2, uwt_a2, uwt_peak2;
16 wire [31:0] uwt_d3, uwt_a3, uwt_peak3;
17 wire [1:0] uwt_flag1, uwt_flag2, uwt_flag3;
18
19 wire [1:0] wrfull;
20
21 uwt_bior31 #(.L(1)) uwt_1_unit (
22 .clk(adc_clk),
23 .x(adc_data),
24 .d(uwt_d1),
25 .a(uwt_a1),
26 .peak(uwt_peak1),
27 .flag(uwt_flag1));
28
29 uwt_bior31 #(.L(2)) uwt_2_unit (
30 .clk(adc_clk),
31 .x(uwt_a1),
32 .d(uwt_d2),
33 .a(uwt_a2),
34 .peak(uwt_peak2),
35 .flag(uwt_flag2));
36
37 uwt_bior31 #(.L(3)) uwt_3_unit (
38 .clk(adc_clk),
39 .x(uwt_a2),
40 .d(uwt_d3),
41 .a(uwt_a3),
42 .peak(uwt_peak3),
43 .flag(uwt_flag3));
44
45
46 fifo32x12 fifo0 (
47 .aclr(aclr),
48 .data(adc_data),
49 .rdclk(rdclk),
50 .rdreq(rdreq),
51 .wrclk(adc_clk),
52 .wrreq(~wrfull[0]),
53 .q(raw_data),
54 .rdempty(rdempty),
55 .wrfull(wrfull[0]));
56
57 fifo32x14 fifo1 (
58 .aclr(aclr),
59 .data({uwt_flag3, uwt_peak3[11:0]}),
60 .rdclk(rdclk),
61 .rdreq(rdreq),
62 .wrclk(adc_clk),
63 .wrreq(~wrfull[1]),
64 .q(uwt_data),
65 .rdempty(),
66 .wrfull(wrfull[1]));
67
68endmodule
Note: See TracBrowser for help on using the repository browser.