Changeset 162 for trunk/MultiChannelUSB/Paella.v
- Timestamp:
- Feb 22, 2012, 11:09:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/Paella.v
r161 r162 116 116 wire [4*12-1:0] int_mux_data [N-1:0]; 117 117 118 wire [1:0] amp_flag [ 2*N-1:0];119 wire [11:0] amp_data [ 2*N-1:0];120 121 wire [1:0] amp_mux_flag [ 1:0];122 wire [11:0] amp_mux_data [ 1:0];123 124 wire cnt_good [ N-1:0];118 wire [1:0] amp_flag [3*N-1:0]; 119 wire [11:0] amp_data [3*N-1:0]; 120 121 wire [1:0] amp_mux_flag [2:0]; 122 wire [11:0] amp_mux_data [2:0]; 123 124 wire cnt_good [3:0]; 125 125 wire [15:0] cnt_bits_wire; 126 126 … … 228 228 .lpm_width(14), 229 229 .lpm_widths(2)) amp_mux_unit_1 ( 230 .sel(cfg_bits[ 8][1:0]),230 .sel(cfg_bits[6][1:0]), 231 231 .data({ 232 {amp_flag[4], amp_data[4]},233 232 {amp_flag[2], amp_data[2]}, 233 {amp_flag[1], amp_data[1]}, 234 234 {amp_flag[0], amp_data[0]}}), 235 235 .result({amp_mux_flag[0], amp_mux_data[0]})); … … 240 240 .lpm_width(14), 241 241 .lpm_widths(2)) amp_mux_unit_2 ( 242 .sel(cfg_bits[ 8][5:4]),242 .sel(cfg_bits[6][5:4]), 243 243 .data({ 244 244 {amp_flag[5], amp_data[5]}, 245 {amp_flag[ 3], amp_data[3]},246 {amp_flag[ 1], amp_data[1]}}),245 {amp_flag[4], amp_data[4]}, 246 {amp_flag[3], amp_data[3]}}), 247 247 .result({amp_mux_flag[1], amp_mux_data[1]})); 248 249 lpm_mux #( 250 .lpm_size(3), 251 .lpm_type("LPM_MUX"), 252 .lpm_width(14), 253 .lpm_widths(2)) amp_mux_unit_3 ( 254 .sel(cfg_bits[6][9:8]), 255 .data({ 256 {amp_flag[8], amp_data[8]}, 257 {amp_flag[7], amp_data[7]}, 258 {amp_flag[6], amp_data[6]}}), 259 .result({amp_mux_flag[2], amp_mux_data[2]})); 248 260 249 261 generate … … 329 341 .frame(sys_frame), 330 342 .reset(1'b0), 331 .cfg_data(cfg_bits[ 6][11:0]),343 .cfg_data(cfg_bits[7][11:0]), 332 344 // .cfg_data(cfg_bits[6+2*j][11:0]), 333 345 .inp_data(clp_data[j]), 334 .out_flag(amp_flag[0+ 2*j]),335 .out_data(amp_data[0+ 2*j]));346 .out_flag(amp_flag[0+j]), 347 .out_data(amp_data[0+j])); 336 348 337 349 amplitude #(.width(12)) amplitude_unit_2 ( … … 339 351 .frame(sys_frame), 340 352 .reset(1'b0), 341 .cfg_data(cfg_bits[ 7][11:0]),353 .cfg_data(cfg_bits[8][11:0]), 342 354 // .cfg_data(cfg_bits[7+2*j][11:0]), 343 355 .inp_data(clp_data[j]), 344 .out_flag(amp_flag[1+2*j]), 345 .out_data(amp_data[1+2*j])); 356 .out_flag(amp_flag[3+j]), 357 .out_data(amp_data[3+j])); 358 359 amplitude #(.width(12)) amplitude_unit_3 ( 360 .clock(sys_clock), 361 .frame(sys_frame), 362 .reset(1'b0), 363 .cfg_data(cfg_bits[9][11:0]), 364 // .cfg_data(cfg_bits[7+2*j][11:0]), 365 .inp_data(clp_data[j]), 366 .out_flag(amp_flag[6+j]), 367 .out_data(amp_data[6+j])); 346 368 347 369 end 348 370 endgenerate 349 371 350 histogram32 histogram32_unit (372 histogram32 histogram32_unit_1 ( 351 373 .clock(sys_clock), 352 374 .frame(sys_frame), … … 361 383 .bus_busy(bus_busy[2])); 362 384 363 counter hst_counter_unit (385 counter hst_counter_unit_1 ( 364 386 .clock(sys_clock), 365 387 .frame((sys_frame) & (~amp_mux_flag[0][1])), … … 376 398 .cnt_good(cnt_good[0])); 377 399 400 histogram32 histogram32_unit_2 ( 401 .clock(sys_clock), 402 .frame(sys_frame), 403 .reset(cfg_bits[0][5]), 404 .hst_good((amp_mux_flag[0][0]) & (cnt_good[1]) & (cfg_bits[14][1])), 405 .hst_data(amp_mux_data[0]), 406 .bus_ssel(bus_ssel[3]), 407 .bus_wren(bus_wren), 408 .bus_addr(bus_addr[12:0]), 409 .bus_mosi(bus_mosi), 410 .bus_miso(bus_miso[3]), 411 .bus_busy(bus_busy[3])); 412 413 counter hst_counter_unit_2 ( 414 .clock(sys_clock), 415 .frame((sys_frame) & (~amp_mux_flag[0][1])), 416 // .frame(sys_frame), 417 .reset(cfg_bits[0][8]), 418 .setup(cfg_bits[14][0]), 419 .count(cfg_bits[14][1]), 420 .bus_ssel(bus_ssel[6]), 421 .bus_wren(bus_wren), 422 .bus_addr(bus_addr[1:0]), 423 .bus_mosi(bus_mosi), 424 .bus_miso(bus_miso[6]), 425 .bus_busy(bus_busy[6]), 426 .cnt_good(cnt_good[1])); 427 378 428 histogram16 histogram16_unit ( 379 429 .clock(sys_clock), 380 430 .frame(sys_frame), 381 431 .reset(cfg_bits[0][11]), 382 .hst_good((cnt_good[ 2]) & (~cnt_good[1])),432 .hst_good((cnt_good[3]) & (~cnt_good[2])), 383 433 .hst_data(cnt_bits_wire), 384 434 .bus_ssel(bus_ssel[8]), … … 394 444 // .frame(sys_frame), 395 445 .reset(cfg_bits[0][12]), 396 .setup((sys_frame) & (~cnt_good[ 1])),397 .count((cnt_good[ 2]) & (cfg_bits[16][1])),446 .setup((sys_frame) & (~cnt_good[2])), 447 .count((cnt_good[3]) & (cfg_bits[16][1])), 398 448 .bus_ssel(bus_ssel[9]), 399 449 .bus_wren(bus_wren), … … 402 452 .bus_miso(bus_miso[9]), 403 453 .bus_busy(bus_busy[9]), 404 .cnt_good(cnt_good[ 1]));454 .cnt_good(cnt_good[2])); 405 455 406 456 counter rmt_counter_2 ( 407 457 .clock(sys_clock), 408 .frame((sys_frame) & (~cnt_good[ 1])),458 .frame((sys_frame) & (~cnt_good[2])), 409 459 .reset(cfg_bits[0][13]), 410 460 .setup(cfg_bits[16][0]), … … 416 466 .bus_miso(bus_miso[10]), 417 467 .bus_busy(bus_busy[10]), 418 .cnt_good(cnt_good[ 2]));468 .cnt_good(cnt_good[3])); 419 469 420 470 lpm_counter #( … … 423 473 .lpm_type("LPM_COUNTER"), 424 474 .lpm_width(16)) lpm_counter_component ( 425 .sclr(((sys_frame) & (cnt_good[ 2]) & (~cnt_good[1])) | (cfg_bits[0][11])),426 .clock(sys_clock), 427 .cnt_en((sys_frame) & (amp_mux_flag[1][0]) & (cnt_good[ 1]) & (cnt_good[2]) & (cfg_bits[16][1])),475 .sclr(((sys_frame) & (cnt_good[3]) & (~cnt_good[2])) | (cfg_bits[0][11])), 476 .clock(sys_clock), 477 .cnt_en((sys_frame) & (amp_mux_flag[1][0]) & (cnt_good[2]) & (cnt_good[3]) & (cfg_bits[16][1])), 428 478 .q(cnt_bits_wire)); 429 479
Note:
See TracChangeset
for help on using the changeset viewer.