Ignore:
Timestamp:
Feb 23, 2011, 10:22:29 PM (14 years ago)
Author:
demin
Message:

change width of the amplification parameter to 6-bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/MultiChannelUSB/deconv.v

    r125 r129  
    44                parameter       shift   =       24, // right shift of the result
    55                parameter       width   =       27, // bit width of the input data
    6                 parameter       widthr  =       13 // bit width of the output data
     6                parameter       widthr  =       12 // bit width of the output data
    77        )
    88        (
    99                input   wire                                            clock, frame, reset,
    1010                input   wire    [3*size*6-1:0]          del_data,
    11                 input   wire    [3*size*4-1:0]          amp_data,
     11                input   wire    [3*size*6-1:0]          amp_data,
    1212                input   wire    [3*size*16-1:0]         tau_data,
    1313                input   wire    [3*size*width-1:0]      inp_data,
     
    4343        wire    [size*width-1:0]        inp_data_wire [3:0];
    4444
    45         reg             [size*4-1:0]            amp_data_reg, amp_data_next;
    46         wire    [size*4-1:0]            amp_data_wire [2:0];
     45        reg             [size*6-1:0]            amp_data_reg, amp_data_next;
     46        wire    [size*6-1:0]            amp_data_wire [2:0];
    4747
    4848        reg             [size*16-1:0]           tau_data_reg, tau_data_next;
     
    5858                        assign inp_data_wire[1][j*width+width-1:j*width] = inp_data[(3*j+1)*width+width-1:(3*j+1)*width];
    5959                        assign inp_data_wire[2][j*width+width-1:j*width] = inp_data[(3*j+2)*width+width-1:(3*j+2)*width];
    60                         assign amp_data_wire[0][j*4+4-1:j*4] = amp_data[(3*j+0)*4+4-1:(3*j+0)*4];
    61                         assign amp_data_wire[1][j*4+4-1:j*4] = amp_data[(3*j+1)*4+4-1:(3*j+1)*4];
    62                         assign amp_data_wire[2][j*4+4-1:j*4] = amp_data[(3*j+2)*4+4-1:(3*j+2)*4];
     60                        assign amp_data_wire[0][j*6+6-1:j*6] = amp_data[(3*j+0)*6+6-1:(3*j+0)*6];
     61                        assign amp_data_wire[1][j*6+6-1:j*6] = amp_data[(3*j+1)*6+6-1:(3*j+1)*6];
     62                        assign amp_data_wire[2][j*6+6-1:j*6] = amp_data[(3*j+2)*6+6-1:(3*j+2)*6];
    6363                        assign tau_data_wire[0][j*16+16-1:j*16] = tau_data[(3*j+0)*16+16-1:(3*j+0)*16];
    6464                        assign tau_data_wire[1][j*16+16-1:j*16] = tau_data[(3*j+1)*16+16-1:(3*j+1)*16];
     
    127127                                .lpm_pipeline(3),
    128128                                .lpm_widtha(width2),
    129                                 .lpm_widthb(4),
     129                                .lpm_widthb(6),
    130130                                .lpm_widthp(width3)) mult_unit_2 (
    131131                                .clock(clock),
    132132                                .clken(int_wren_reg),
    133133                                .dataa(acc_data_reg[0][j*width2+width2-1:j*width2]),
    134                                 .datab(amp_data_reg[j*4+4-1:j*4]),
     134                                .datab(amp_data_reg[j*6+6-1:j*6]),
    135135                                .result(mul_data_wire[1][j*width3+width3-1:j*width3]));
    136136
     
    213213                        del_addr_reg <= 6'd0;
    214214                        int_addr_reg <= 8'd0;
    215                         amp_data_reg <= 4'd0;
     215                        amp_data_reg <= 6'd0;
    216216                        tau_data_reg <= 16'd0;
    217217                        for(i = 0; i <= 2; i = i + 1)
     
    272272                                del_addr_next = 6'd0;
    273273                                int_addr_next = 8'd0;
    274                                 amp_data_next = 4'd0;
     274                                amp_data_next = 6'd0;
    275275                                tau_data_next = 16'd0;
    276276                                for(i = 0; i <= 2; i = i + 1)
Note: See TracChangeset for help on using the changeset viewer.