Changeset 50
- Timestamp:
- Sep 16, 2009, 12:51:00 PM (15 years ago)
- Location:
- trunk/MultiChannelUSB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/Paella.v
r48 r50 197 197 .uwt_flag(uwt_flag[i]), 198 198 .uwt_data(uwt_data[i]), 199 .threshold(12'd5), 199 200 .peak_ready(ana_peak_ready[i]), 200 201 .peak(ana_peak[i])); -
trunk/MultiChannelUSB/analyser.v
r45 r50 5 5 input wire [1:0] uwt_flag, 6 6 input wire [11:0] uwt_data, 7 input wire [11:0] threshold, 7 8 output wire peak_ready, 8 9 output wire [11:0] peak … … 58 59 state_next = state_reg; 59 60 counter_next = counter_reg; 60 peak_ready_next = 1'b0;61 peak_next = 12'd0;61 peak_ready_next = peak_ready_reg; 62 peak_next = peak_reg; 62 63 case (state_reg) 63 64 0: // skip first 16 samples 64 65 begin 66 peak_next = 12'd0; 67 peak_ready_next = 1'b0; 65 68 if (data_ready) 66 69 begin … … 89 92 if (data_ready & uwt_flag[0]) 90 93 begin 91 peak_next = uwt_data - baseline;92 peak_ready_next = 1'b1;94 peak_next = (uwt_data > baseline) ? (uwt_data - baseline) : 12'd0; 95 peak_ready_next = (peak_next > threshold); 93 96 end 97 else 98 begin 99 peak_ready_next = 1'b0; 100 end 94 101 end 95 102 96 103 default: 97 104 begin 105 peak_next = 12'd0; 106 peak_ready_next = 1'b0; 98 107 state_next = 2'd0; 99 108 end
Note:
See TracChangeset
for help on using the changeset viewer.