Changeset 48 for trunk


Ignore:
Timestamp:
Sep 16, 2009, 12:35:44 PM (15 years ago)
Author:
demin
Message:

cleanup test circuit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MultiChannelUSB/Paella.v

    r46 r48  
    6161        assign  RAM_DQB         =       8'bz;
    6262
    63 
    6463        assign  USB_PA2         =       ~usb_rden;
    6564        assign  USB_PA4         =       usb_addr[0];
     
    6766        assign  USB_PA6         =       ~usb_pktend;
    6867
    69         reg             [31:0]  counter;       
    7068        reg                             led_reg;       
    71 //      assign  LED                     =       counter[24];
    7269        assign  LED                     =       led_reg;
    7370
     
    115112        wire    [11:0]  ana_peak [3:0];
    116113
    117         reg             [9:0]   osc_counter;   
    118 
    119114        reg                     osc_reset [3:0];
    120115        wire    [9:0]   osc_start_addr [3:0];
     
    129124        reg                     mux_reset, mux_type;
    130125        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;
    132127        reg             [7:0]   mux_q;
    133128
     
    137132        wire                    adc_clk [3:0];
    138133
    139 //      reg     [11:0]  adc_data;
    140134
    141135        wire                    adc_data_ready [3:0];
     
    149143    assign      adc_clk[1] = ADC_FCO;
    150144    assign      adc_clk[2] = ADC_FCO;
     145/*   
    151146    assign      adc_clk[3] = CON_B[0];
    152147    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
    154155        pll pll_unit(
    155156                .inclk0(CLK_50MHz),
    156                 .c0(adc_clk));
    157 */
     157                .c0(tst_adc_clk));
     158
    158159/*
    159160        altserial_flash_loader #(
     
    179180        genvar i;
    180181        generate
    181                 for (i = 0; i < 4; i = i + 1)
     182                for (i = 2; i < 4; i = i + 1)
    182183                begin : MCA_CHAIN
    183184                        adc_fifo adc_fifo_unit (
     
    228229        endgenerate
    229230
    230 /*
    231         always @ (posedge adc_clk)
    232         begin
    233                 counter <= counter + 32'd1;
    234         end
    235 */
    236 
    237231        integer j;
    238232
     
    254248                                mux_max_byte = 2'd1;   
    255249                                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;
    257251                        end
    258252
     
    263257                                mux_max_byte = 2'd2;   
    264258                                mux_min_addr = 16'd0;
    265                                 mux_max_addr = 16'd4095;
     259                                mux_num_addr = 16'd4095;
    266260                        end
    267261                endcase
     
    355349                        begin
    356350                                mux_addr <= mux_min_addr;
     351                                mux_max_addr <= mux_min_addr + mux_num_addr;
    357352                                mux_byte <= 2'd0;       
    358353                                state1 <= 4'd4;
     
    409404                                begin
    410405                                        usb_fifo_tx_data <= tst_counter;
    411                                         if (tst_counter == 11'd0) //(&osc_counter)
     406                                        if (tst_counter == 11'd0)
    412407                                        begin
    413408                                                state1 <= 4'd9;
     
    434429                endcase
    435430        end
    436 /*
    437         always @ (posedge adc_clk)
     431
     432        always @ (posedge tst_adc_clk)
    438433        begin
    439434                case (state2)
    440435                        1:
    441436                        begin
    442                                 adc_data <= 12'd0;
     437                                tst_adc_data <= 12'd0;
    443438                                state2 <= 4'd2;
    444439                        end
     
    446441                        2:
    447442                        begin
    448                                 adc_data <= 12'd1024;
     443                                tst_adc_data <= 12'd1024;
    449444                                state2 <= 4'd3;
    450445                        end
     
    452447                        3:
    453448                        begin
    454                                 adc_data <= 12'd2048;
     449                                tst_adc_data <= 12'd2048;
    455450                                state2 <= 4'd4;
    456451                        end
     
    458453                        4:
    459454                        begin
    460                                 adc_data <= 12'd3072;
     455                                tst_adc_data <= 12'd3072;
    461456                                state2 <= 4'd5;
    462457                        end
     
    464459                        5:
    465460                        begin
    466                                 adc_data <= 12'd4095;
     461                                tst_adc_data <= 12'd4095;
    467462                                state2 <= 4'd1;
    468463                        end
     
    474469                endcase
    475470        end
    476 */
     471
    477472endmodule
Note: See TracChangeset for help on using the changeset viewer.