Changeset 119
- Timestamp:
- Feb 16, 2011, 5:04:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/MultiChannelUSB/cic_filter.v
r108 r119 31 31 wire [size*widthr-1:0] acc_data_wire [2:0], del_data_wire [1:0]; 32 32 33 wire [size*widthr-1:0] add_data_wire, sub_data_wire; 34 33 35 34 36 integer i; … … 41 43 42 44 // -2*del_data_1 + del_data_2 + inp_data + result 43 parallel_add #( 44 .msw_subtract("YES"), 45 .representation("SIGNED"), 46 .result_alignment("LSB"), 47 .shift(0), 48 .size(4), 49 .width(widthr), 50 .widthr(widthr)) acc_unit_1 ( 51 .data({ 52 {del_data_wire[0][j*widthr+widthr-1],del_data_wire[0][j*widthr+widthr-3:j*widthr], 1'b0}, 53 {del_data_wire[1][j*widthr+widthr-1:j*widthr]}, 54 {acc_data_reg[0][j*widthr+widthr-1:j*widthr]}, 55 {acc_data_reg[1][j*widthr+widthr-1:j*widthr]}}), 45 46 lpm_add_sub #( 47 .lpm_direction("ADD"), 48 .lpm_hint("ONE_INPUT_IS_CONSTANT=NO,CIN_USED=NO"), 49 .lpm_representation("SIGNED"), 50 .lpm_type("LPM_ADD_SUB"), 51 .lpm_width(widthr)) add_unit_1 ( 52 .dataa(acc_data_reg[0][j*widthr+widthr-1:j*widthr]), 53 .datab(del_data_wire[1][j*widthr+widthr-1:j*widthr]), 54 .result(add_data_wire[j*widthr+widthr-1:j*widthr])); 55 56 lpm_add_sub #( 57 .lpm_direction("SUB"), 58 .lpm_hint("ONE_INPUT_IS_CONSTANT=NO,CIN_USED=NO"), 59 .lpm_representation("SIGNED"), 60 .lpm_type("LPM_ADD_SUB"), 61 .lpm_width(widthr)) sub_unit_1 ( 62 .dataa(acc_data_reg[1][j*widthr+widthr-1:j*widthr]), 63 .datab({del_data_wire[0][j*widthr+widthr-1],del_data_wire[0][j*widthr+widthr-3:j*widthr], 1'b0}), 64 .result(sub_data_wire[j*widthr+widthr-1:j*widthr])); 65 66 lpm_add_sub #( 67 .lpm_direction("ADD"), 68 .lpm_hint("ONE_INPUT_IS_CONSTANT=NO,CIN_USED=NO"), 69 .lpm_representation("SIGNED"), 70 .lpm_type("LPM_ADD_SUB"), 71 .lpm_width(widthr)) acc_unit_1 ( 72 .dataa(add_data_wire[j*widthr+widthr-1:j*widthr]), 73 .datab(sub_data_wire[j*widthr+widthr-1:j*widthr]), 56 74 .result(acc_data_wire[1][j*widthr+widthr-1:j*widthr])); 57 75 58 parallel_add #( 59 .msw_subtract("NO"), 60 .representation("SIGNED"), 61 .result_alignment("LSB"), 62 .shift(0), 63 .size(2), 64 .width(widthr), 65 .widthr(widthr)) acc_unit_2 ( 66 .data({ 67 {acc_data_reg[1][j*widthr+widthr-1:j*widthr]}, 68 {acc_data_reg[2][j*widthr+widthr-1:j*widthr]}}), 76 lpm_add_sub #( 77 .lpm_direction("ADD"), 78 .lpm_hint("ONE_INPUT_IS_CONSTANT=NO,CIN_USED=NO"), 79 .lpm_representation("SIGNED"), 80 .lpm_type("LPM_ADD_SUB"), 81 .lpm_width(widthr)) acc_unit_2 ( 82 .dataa(acc_data_reg[1][j*widthr+widthr-1:j*widthr]), 83 .datab(acc_data_reg[2][j*widthr+widthr-1:j*widthr]), 69 84 .result(acc_data_wire[2][j*widthr+widthr-1:j*widthr])); 70 85
Note:
See TracChangeset
for help on using the changeset viewer.