Changeset 149


Ignore:
Timestamp:
May 13, 2011, 6:19:37 PM (13 years ago)
Author:
demin
Message:

add new pwm module and disable deconvolution module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/MultiChannelUSB/Paella.v

    r145 r149  
    77                input   wire                    ADC_FCO,
    88                input   wire    [5:0]   ADC_D,
     9
     10                output  wire    [3:0]   PWM,
    911
    1012                output  wire    [1:0]   SPI_SEL,
     
    201203                begin : MUX_DATA
    202204                        assign int_mux_data[j] = {
    203                                 clp_data[j][11:0],
    204                                 dec_data[j][11:0],
     205                                amp_data2[j],
     206                                clp_data[j],
    205207                                cic_data[j][19:8],
    206208                                sys_data[j]};
     
    281283                for (j = 0; j < 3; j = j + 1)
    282284                begin : DECONV_CHAIN
    283        
     285/*
    284286                        deconv #(.shift(22), .width(20), .widthr(12)) deconv_unit (
    285287                                .clock(sys_clock),
     
    298300                                        dec_data[j*4+3], dec_data[j*4+2],
    299301                                        dec_data[j*4+1], dec_data[j*4+0]}));
    300                
    301                
     302*/
    302303                        clip #(.shift(22), .width(20), .widthr(12)) clip_unit (
    303304                                .clock(sys_clock),
    304305                                .frame(sys_frame),
    305306                                .reset(1'b0),
    306                                 .del_data({6'd14, 6'd14, 6'd14, 6'd14}),
     307                                .del_data({6'd12, 6'd12, 6'd12, 6'd12}),
    307308                                .amp_data({6'd17, 6'd17, 6'd17, 6'd17}),
    308                                 .tau_data({16'd17166, 16'd17166, 16'd17166, 16'd17166}),
     309                                .tau_data({16'd16560, 16'd16560, 16'd16560, 16'd16560}), // exp(-12/240)*1024*17
    309310                                .inp_data({
    310311                                        cic_data[j*4+3][19:0], cic_data[j*4+2][19:0],
     
    313314                                        clp_data[j*4+3], clp_data[j*4+2],
    314315                                        clp_data[j*4+1], clp_data[j*4+0]}));
     316
     317/*
     318                        clip #(.shift(22), .width(22), .widthr(12)) clip_unit (
     319                                .clock(sys_clock),
     320                                .frame(sys_frame),
     321                                .reset(1'b0),
     322                                .del_data({6'd18, 6'd18, 6'd18, 6'd18}),
     323                                .amp_data({6'd5, 6'd5, 6'd5, 6'd5}),
     324                                .tau_data({16'd4932, 16'd4932, 16'd4932, 16'd4932}), // exp(-18/480)*1024*5
     325                                .inp_data({
     326                                        cic_data[j*4+3][21:0], cic_data[j*4+2][21:0],
     327                                        cic_data[j*4+1][21:0], cic_data[j*4+0][21:0]}),
     328                                .out_data({
     329                                        clp_data[j*4+3], clp_data[j*4+2],
     330                                        clp_data[j*4+1], clp_data[j*4+0]}));
     331*/
    315332                end
    316333        endgenerate
     
    321338
    322339                        assign sys_data[j] = (cfg_bits[1][j]) ? (adc_data[j] ^ 12'hfff) : (adc_data[j]);
    323 
     340/*
    324341                        amplitude #(.width(12)) amplitude_unit_1 (
    325342                                .clock(sys_clock),
     
    331348                                .out_flag(amp_flag1[j]),
    332349                                .out_data(amp_data1[j]));
    333 
     350*/
    334351                        amplitude #(.width(12)) amplitude_unit_2 (
    335352                                .clock(sys_clock),
    336353                                .frame(sys_frame),
    337                                 .reset(cfg_bits[0][2+j]),
     354                                .reset(1'b0),
    338355                                .cfg_data({1'b0, 12'd0, 12'd5}),
    339356//                              .cfg_data({cfg_bits[7+2*j][12:0], cfg_bits[6+2*j][11:0]}),
     
    407424                .bus_mosi(bus_mosi),
    408425                .bus_busy(bus_busy[12]));
     426
     427        pwm pwm_unit(
     428                .clock(sys_clock),
     429                .cfg_data({cfg_bits[31], cfg_bits[30], cfg_bits[29]}),
     430                .out_data(PWM));
    409431
    410432        generate
Note: See TracChangeset for help on using the changeset viewer.