Changeset 86 for trunk/MultiChannelUSB/adc_fifo.v
- Timestamp:
- Dec 21, 2009, 11:55:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/adc_fifo.v
r84 r86 1 1 module adc_fifo 2 #( 3 parameter W = 48 // fifo width 4 ) 2 5 ( 3 6 input wire adc_clk, 4 input wire [ 11:0] adc_data,7 input wire [W-1:0] adc_data, 5 8 6 9 input wire clk, 7 10 output wire data_ready, 8 output wire [ 11:0] data11 output wire [W-1:0] data 9 12 ); 10 13 11 wire [ 11:0] int_q;12 reg [ 11:0] int_data;14 wire [W-1:0] int_q; 15 reg [W-1:0] int_data; 13 16 14 reg [1:0] state; 15 reg int_rdreq, int_data_ready; 17 reg state, int_rdreq, int_data_ready; 16 18 wire int_wrfull, int_rdempty; 17 19 … … 21 23 .lpm_showahead("ON"), 22 24 .lpm_type("dcfifo"), 23 .lpm_width( 12),25 .lpm_width(W), 24 26 .lpm_widthu(4), 25 27 .rdsync_delaypipe(4), … … 46 48 begin 47 49 case (state) 48 2'd0:50 1'b0: 49 51 begin 50 52 int_rdreq <= 1'b1; 51 53 int_data_ready <= 1'b0; 52 state <= 2'd1;54 state <= 1'b1; 53 55 end 54 56 55 2'd1:57 1'b1: 56 58 begin 57 59 if (~int_rdempty) … … 60 62 int_rdreq <= 1'b0; 61 63 int_data_ready <= 1'b1; 62 state <= 2'd0;64 state <= 1'b0; 63 65 end 64 66 end 65 66 2'd2:67 begin68 int_data_ready <= 1'b0;69 state <= 2'd3;70 end71 72 2'd3:73 begin74 state <= 2'd0;75 end76 77 67 endcase 78 68 end
Note:
See TracChangeset
for help on using the changeset viewer.