Ignore:
Timestamp:
Sep 17, 2009, 6:35:11 PM (15 years ago)
Author:
demin
Message:

adapat memory access to normal memory clock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MultiChannelUSB/Paella.v

    r50 r54  
    143143    assign      adc_clk[1] = ADC_FCO;
    144144    assign      adc_clk[2] = ADC_FCO;
    145 /*   
     145   
    146146    assign      adc_clk[3] = CON_B[0];
    147147    assign      adc_data[3] = CON_B[12:1];
    148 */
     148 
     149        wire                    adc_pll_clk;
     150
    149151        wire                    tst_adc_clk;
    150152        reg     [11:0]  tst_adc_data;
    151 
     153/*
    152154    assign      adc_clk[3] = tst_adc_clk;
    153155    assign      adc_data[3] = tst_adc_data;
     156*/
     157/*
     158        adc_pll adc_pll_unit(
     159                .inclk0(ADC_FCO),
     160                .c0(adc_pll_clk));
     161*/
    154162
    155163        pll pll_unit(
     
    170178                .sdoin());
    171179*/
     180
    172181        adc_lvds adc_lvds_unit (
    173182                .lvds_dco(ADC_DCO),
     183//              .lvds_dco(adc_pll_clk),
    174184                .lvds_fco(ADC_FCO),
    175185                .lvds_d(ADC_D),
     
    180190        genvar i;
    181191        generate
    182                 for (i = 2; i < 4; i = i + 1)
     192                for (i = 0; i < 4; i = i + 1)
    183193                begin : MCA_CHAIN
    184194                        adc_fifo adc_fifo_unit (
     
    197207                                .uwt_flag(uwt_flag[i]),
    198208                                .uwt_data(uwt_data[i]),
    199                                 .threshold(12'd5),
     209                                .threshold(12'd10),
    200210                                .peak_ready(ana_peak_ready[i]),
    201211                                .peak(ana_peak[i]));
    202 /*
     212
    203213                        histogram histogram_unit (
    204214                                .clk(CLK_50MHz),
    205215                                .reset(hst_reset[i]),
    206216                                .data_ready(adc_data_ready[i]),
    207                                 .data(raw_data[i]),
     217//                              .data(raw_data[i]),
     218                                .data(uwt_data[i]),
    208219                                .address(hst_addr[i]),
    209220                                .q(hst_q[i]));
    210 */
     221/*
    211222                        histogram histogram_unit (
    212223                                .clk(CLK_50MHz),
     
    216227                                .address(hst_addr[i]),
    217228                                .q(hst_q[i]));
    218                        
     229*/                     
    219230                        oscilloscope oscilloscope_unit (
    220231                                .clk(CLK_50MHz),
     
    223234                                .raw_data(raw_data[i]),
    224235                                .uwt_data(uwt_data[i]),
    225                                 .threshold(16'd100),
     236                                .threshold(16'd40),
    226237                                .address(osc_addr[i]),
    227238                                .start_address(osc_start_addr[i]),
     
    341352                                                        usb_fifo_rx_rdreq <= 1'b0;
    342353                                                        tst_counter <= 11'd0;   
    343                                                         state1 <= 4'd9;
     354                                                        state1 <= 4'd6;
    344355                                                end
    345356                                        endcase
     
    354365                                state1 <= 4'd4;
    355366                        end
     367       
    356368                        4:
    357369                        begin
    358                                 usb_fifo_tx_data <= mux_q;
    359                                 usb_fifo_tx_wrreq <= 1'b1;
    360                                 mux_byte <= 2'd1;
     370                                usb_fifo_tx_wrreq <= 1'b0;
    361371                                state1 <= 4'd5;
    362372                        end
     373
    363374                        5:
    364375                        begin
     
    366377                                begin
    367378                                        usb_fifo_tx_data <= mux_q;
     379                                        usb_fifo_tx_wrreq <= 1'b1;
    368380                                        if ((mux_byte == mux_max_byte) && (mux_addr == mux_max_addr))
    369381                                        begin
    370                                                 state1 <= 4'd6;
     382                                                state1 <= 4'd1;
    371383                                        end
    372384                                        else
    373385                                        begin
     386                                                state1 <= 4'd4;
    374387                                                if (mux_byte == mux_max_byte)
    375388                                                begin
     
    384397                                end
    385398                        end
     399
     400                        // tst transfer
    386401                        6:
    387                         begin
    388                                 if (~usb_fifo_tx_full)
    389                                 begin
    390                                         usb_fifo_tx_wrreq <= 1'b0;
    391                                         state1 <= 4'd1;
    392                                 end
    393                         end
    394                         // tst transfer
    395                         7:
    396402                        begin
    397403                                usb_fifo_tx_data <= tst_counter;
     
    400406                                state1 <= 4'd8;
    401407                        end
    402                         8:
     408                        7:
    403409                        begin
    404410                                if (~usb_fifo_tx_full)
     
    415421                                end
    416422                        end
    417                         9:
     423                        8:
    418424                        begin
    419425                                if (~usb_fifo_tx_full)
Note: See TracChangeset for help on using the changeset viewer.