Changeset 49
- Timestamp:
- Sep 16, 2009, 12:37:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/adc_fifo.v
r45 r49 16 16 wire [31:0] uwt_d3, uwt_a3, uwt_peak3; 17 17 wire [1:0] uwt_flag1, uwt_flag2, uwt_flag3; 18 19 wire [11:0] int_raw_q; 20 wire [13:0] int_uwt_q; 21 22 reg [11:0] int_raw_data; 23 reg [13:0] int_uwt_data; 18 24 19 25 wire [1:0] wrfull; … … 63 69 .data(adc_data), 64 70 .rdclk(rdclk), 65 .rdreq( int_rdreq),71 .rdreq((~int_rdempty) & int_rdreq), 66 72 .wrclk(adc_clk), 67 73 .wrreq(~wrfull[0]), 68 .q( raw_data),74 .q(int_raw_q), 69 75 .rdempty(int_rdempty), 70 76 .wrfull(wrfull[0]), … … 90 96 .data({uwt_flag3, uwt_peak3[11:0]}), 91 97 .rdclk(rdclk), 92 .rdreq( int_rdreq),98 .rdreq((~int_rdempty) & int_rdreq), 93 99 .wrclk(adc_clk), 94 100 .wrreq(~wrfull[1]), 95 .q( uwt_data),101 .q(int_uwt_q), 96 102 .rdempty(), 97 103 .wrfull(wrfull[1]), … … 106 112 1'b0: 107 113 begin 114 int_rdreq <= 1'b1; 115 int_ready <= 1'b0; 116 state <= 1'b1; 117 end 118 119 1'b1: 120 begin 108 121 if (~int_rdempty) 109 122 begin 110 int_rdreq <= 1'b1; 123 int_raw_data <= int_raw_q; 124 int_uwt_data <= int_uwt_q; 125 int_rdreq <= 1'b0; 111 126 int_ready <= 1'b1; 112 state <= 1'b 1;127 state <= 1'b0; 113 128 end 114 end115 116 1'b1:117 begin118 int_rdreq <= 1'b0;119 int_ready <= 1'b0;120 state <= 1'b0;121 129 end 122 130 123 131 default: 124 132 begin 125 int_rdreq <= 1'b 0;133 int_rdreq <= 1'b1; 126 134 int_ready <= 1'b0; 127 state <= 1'b 0;135 state <= 1'b1; 128 136 end 129 137 endcase … … 131 139 132 140 assign ready = int_ready; 141 assign raw_data = int_raw_data; 142 assign uwt_data = int_uwt_data; 133 143 134 144 endmodule
Note:
See TracChangeset
for help on using the changeset viewer.