Changeset 37 for trunk/MultiChannelUSB/Paella.v
- Timestamp:
- Sep 7, 2009, 7:21:43 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/Paella.v
r35 r37 106 106 107 107 .rx_empty(usb_fifo_rx_empty), 108 .rx_rdreq( usb_fifo_rx_rdreq),108 .rx_rdreq((~usb_fifo_rx_empty) & usb_fifo_rx_rdreq), 109 109 .rx_q(usb_fifo_rx_data) 110 110 ); 111 111 112 reg [23:0] rx_counter; 112 113 reg [10:0] tst_counter; 113 114 … … 209 210 always @(posedge CLK_50MHz) 210 211 begin 212 if (~usb_fifo_rx_empty) 213 begin 214 led_reg <= 1'b0; 215 rx_counter <= 24'd0; 216 end 217 else 218 begin 219 if (&rx_counter) 220 begin 221 led_reg <= 1'b1; 222 end 223 else 224 begin 225 rx_counter <= rx_counter + 24'd1; 226 end 227 end 228 211 229 case(state1) 212 230 1: 213 231 begin 214 usb_fifo_rx_rdreq <= 1'b 0;232 usb_fifo_rx_rdreq <= 1'b1; 215 233 usb_fifo_tx_wrreq <= 1'b0; 216 234 hst_reset <= 1'b0; … … 221 239 2: 222 240 begin 223 usb_fifo_rx_rdreq <= ~usb_fifo_rx_empty;224 241 if (~usb_fifo_rx_empty) 225 242 begin … … 227 244 8'h30: 228 245 begin 246 usb_fifo_rx_rdreq <= 1'b0; 229 247 hst_reset <= 1'b1; 230 248 state1 <= 4'd1; … … 232 250 8'h31: 233 251 begin 252 usb_fifo_rx_rdreq <= 1'b0; 234 253 hst_addr <= 12'd0; 235 254 hst_byte_num <= 2'd0; … … 238 257 8'h32: 239 258 begin 240 led_reg <= 1'b1;259 usb_fifo_rx_rdreq <= 1'b0; 241 260 osc_reset <= 1'b1; 242 261 state1 <= 4'd1; … … 244 263 8'h33: 245 264 begin 246 led_reg<= 1'b0;265 usb_fifo_rx_rdreq <= 1'b0; 247 266 osc_addr <= osc_start_addr; 248 267 osc_counter <= 10'd0; … … 252 271 8'h34: 253 272 begin 254 led_reg <= 1'b1;273 usb_fifo_rx_rdreq <= 1'b0; 255 274 state1 <= 4'd1; 256 275 end 257 276 8'h35: 258 277 begin 259 led_reg<= 1'b0;278 usb_fifo_rx_rdreq <= 1'b0; 260 279 tst_counter <= 11'd0; 261 280 state1 <= 4'd9;
Note:
See TracChangeset
for help on using the changeset viewer.