Changeset 48 for trunk/MultiChannelUSB
- Timestamp:
- Sep 16, 2009, 12:35:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/Paella.v
r46 r48 61 61 assign RAM_DQB = 8'bz; 62 62 63 64 63 assign USB_PA2 = ~usb_rden; 65 64 assign USB_PA4 = usb_addr[0]; … … 67 66 assign USB_PA6 = ~usb_pktend; 68 67 69 reg [31:0] counter;70 68 reg led_reg; 71 // assign LED = counter[24];72 69 assign LED = led_reg; 73 70 … … 115 112 wire [11:0] ana_peak [3:0]; 116 113 117 reg [9:0] osc_counter;118 119 114 reg osc_reset [3:0]; 120 115 wire [9:0] osc_start_addr [3:0]; … … 129 124 reg mux_reset, mux_type; 130 125 reg [1:0] mux_chan, mux_byte, mux_max_byte; 131 reg [15:0] mux_addr, mux_min_addr, mux_max_addr ;126 reg [15:0] mux_addr, mux_min_addr, mux_max_addr, mux_num_addr; 132 127 reg [7:0] mux_q; 133 128 … … 137 132 wire adc_clk [3:0]; 138 133 139 // reg [11:0] adc_data;140 134 141 135 wire adc_data_ready [3:0]; … … 149 143 assign adc_clk[1] = ADC_FCO; 150 144 assign adc_clk[2] = ADC_FCO; 145 /* 151 146 assign adc_clk[3] = CON_B[0]; 152 147 assign adc_data[3] = CON_B[12:1]; 153 /* 148 */ 149 wire tst_adc_clk; 150 reg [11:0] tst_adc_data; 151 152 assign adc_clk[3] = tst_adc_clk; 153 assign adc_data[3] = tst_adc_data; 154 154 155 pll pll_unit( 155 156 .inclk0(CLK_50MHz), 156 .c0( adc_clk));157 */ 157 .c0(tst_adc_clk)); 158 158 159 /* 159 160 altserial_flash_loader #( … … 179 180 genvar i; 180 181 generate 181 for (i = 0; i < 4; i = i + 1)182 for (i = 2; i < 4; i = i + 1) 182 183 begin : MCA_CHAIN 183 184 adc_fifo adc_fifo_unit ( … … 228 229 endgenerate 229 230 230 /*231 always @ (posedge adc_clk)232 begin233 counter <= counter + 32'd1;234 end235 */236 237 231 integer j; 238 232 … … 254 248 mux_max_byte = 2'd1; 255 249 mux_min_addr = {6'd0, osc_start_addr[mux_chan]}; 256 mux_ max_addr = {6'd0, osc_start_addr[mux_chan]} +16'd1023;250 mux_num_addr = 16'd1023; 257 251 end 258 252 … … 263 257 mux_max_byte = 2'd2; 264 258 mux_min_addr = 16'd0; 265 mux_ max_addr = 16'd4095;259 mux_num_addr = 16'd4095; 266 260 end 267 261 endcase … … 355 349 begin 356 350 mux_addr <= mux_min_addr; 351 mux_max_addr <= mux_min_addr + mux_num_addr; 357 352 mux_byte <= 2'd0; 358 353 state1 <= 4'd4; … … 409 404 begin 410 405 usb_fifo_tx_data <= tst_counter; 411 if (tst_counter == 11'd0) //(&osc_counter)406 if (tst_counter == 11'd0) 412 407 begin 413 408 state1 <= 4'd9; … … 434 429 endcase 435 430 end 436 /* 437 always @ (posedge adc_clk)431 432 always @ (posedge tst_adc_clk) 438 433 begin 439 434 case (state2) 440 435 1: 441 436 begin 442 adc_data <= 12'd0;437 tst_adc_data <= 12'd0; 443 438 state2 <= 4'd2; 444 439 end … … 446 441 2: 447 442 begin 448 adc_data <= 12'd1024;443 tst_adc_data <= 12'd1024; 449 444 state2 <= 4'd3; 450 445 end … … 452 447 3: 453 448 begin 454 adc_data <= 12'd2048;449 tst_adc_data <= 12'd2048; 455 450 state2 <= 4'd4; 456 451 end … … 458 453 4: 459 454 begin 460 adc_data <= 12'd3072;455 tst_adc_data <= 12'd3072; 461 456 state2 <= 4'd5; 462 457 end … … 464 459 5: 465 460 begin 466 adc_data <= 12'd4095;461 tst_adc_data <= 12'd4095; 467 462 state2 <= 4'd1; 468 463 end … … 474 469 endcase 475 470 end 476 */ 471 477 472 endmodule
Note:
See TracChangeset
for help on using the changeset viewer.