Changeset 120 for sandbox/MultiChannelUSB
- Timestamp:
- Feb 16, 2011, 9:49:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/MultiChannelUSB/deconv.v
r118 r120 9 9 input wire [3*size*8-1:0] amp_data, 10 10 input wire [3*size*16-1:0] tau_data, 11 input wire [3*size*6-1:0] cls_data, 11 12 input wire [3*size*width-1:0] inp_data, 12 13 output wire [3*size*widthr-1:0] out_data … … 29 30 wire [size*widthr-1:0] out_data_wire; 30 31 32 wire [size*widthr-1:0] add_data_wire; 33 31 34 wire [size*widthr-1:0] mul_data_wire [1:0]; 32 35 … … 44 47 reg [size*16-1:0] tau_data_reg, tau_data_next; 45 48 wire [size*16-1:0] tau_data_wire [2:0]; 49 50 reg [size*6-1:0] cls_data_reg, cls_data_next; 51 wire [size*6-1:0] cls_data_wire [2:0]; 46 52 47 53 integer i; … … 60 66 assign tau_data_wire[1][j*16+16-1:j*16] = tau_data[(3*j+1)*16+16-1:(3*j+1)*16]; 61 67 assign tau_data_wire[2][j*16+16-1:j*16] = tau_data[(3*j+2)*16+16-1:(3*j+2)*16]; 68 assign cls_data_wire[0][j*6+6-1:j*6] = cls_data[(3*j+0)*6+6-1:(3*j+0)*6]; 69 assign cls_data_wire[1][j*6+6-1:j*6] = cls_data[(3*j+1)*6+6-1:(3*j+1)*6]; 70 assign cls_data_wire[2][j*6+6-1:j*6] = cls_data[(3*j+2)*6+6-1:(3*j+2)*6]; 62 71 63 72 lpm_mux #( … … 139 148 .dataa(mul_data_wire[0][j*widthr+widthr-1:j*widthr]), 140 149 .datab(mul_data_wire[1][j*widthr+widthr-1:j*widthr]), 141 .result( out_data_wire[j*widthr+widthr-1:j*widthr]));142 143 /* 150 .result(add_data_wire[j*widthr+widthr-1:j*widthr])); 151 152 144 153 lpm_clshift #( 145 154 .lpm_shifttype("LOGICAL"), 146 155 .lpm_type("LPM_CLSHIFT"), 147 .lpm_width( 64),156 .lpm_width(widthr), 148 157 .lpm_widthdist(6)) shift_unit_1 ( 149 .distance( distance),150 .direction( sub_wire1),151 .data( data),152 .result( sub_wire0));153 */ 158 .distance(cls_data_reg[j*6+6-1:j*6]), 159 .direction(1'b1), 160 .data(add_data_wire[j*widthr+widthr-1:j*widthr]), 161 .result(out_data_wire[j*widthr+widthr-1:j*widthr])); 162 154 163 end 155 164 endgenerate … … 211 220 amp_data_reg <= 8'd0; 212 221 tau_data_reg <= 16'd0; 222 cls_data_reg <= 6'd0; 213 223 for(i = 0; i <= 2; i = i + 1) 214 224 begin … … 230 240 amp_data_reg <= amp_data_next; 231 241 tau_data_reg <= tau_data_next; 242 cls_data_reg <= cls_data_next; 232 243 for(i = 0; i <= 2; i = i + 1) 233 244 begin … … 251 262 amp_data_next = amp_data_reg; 252 263 tau_data_next = tau_data_reg; 264 cls_data_next = cls_data_reg; 253 265 for(i = 0; i <= 2; i = i + 1) 254 266 begin … … 270 282 amp_data_next = 8'd0; 271 283 tau_data_next = 16'd0; 284 cls_data_next = 6'd0; 272 285 for(i = 0; i <= 2; i = i + 1) 273 286 begin … … 314 327 tau_data_next = tau_data_wire[0]; 315 328 amp_data_next = amp_data_wire[0]; 329 cls_data_next = cls_data_wire[0]; 316 330 317 331 int_case_next = 3'd3; … … 332 346 tau_data_next = tau_data_wire[1]; 333 347 amp_data_next = amp_data_wire[1]; 348 cls_data_next = cls_data_wire[1]; 334 349 335 350 // register 1st sum … … 349 364 tau_data_next = tau_data_wire[2]; 350 365 amp_data_next = amp_data_wire[2]; 366 cls_data_next = cls_data_wire[2]; 351 367 352 368 // register 2nd sum
Note:
See TracChangeset
for help on using the changeset viewer.