@@ -518,7 +518,7 BEGIN -- beh | |||||
518 | pirq_ms => 6, |
|
518 | pirq_ms => 6, | |
519 | pirq_wfp => 14, |
|
519 | pirq_wfp => 14, | |
520 | hindex => 2, |
|
520 | hindex => 2, | |
521 |
top_lfr_version => X"00013 |
|
521 | top_lfr_version => X"000134") -- aa.bb.cc version | |
522 | PORT MAP ( |
|
522 | PORT MAP ( | |
523 | clk => clk_25, |
|
523 | clk => clk_25, | |
524 | rstn => LFR_rstn, |
|
524 | rstn => LFR_rstn, |
@@ -58,6 +58,8 PACKAGE BODY lpp_lfr_filter_coeff IS | |||||
58 | VARIABLE SOS_with_gain_array : COEFF_CEL_ARRAY_REAL(1 TO CEL_NUMBER); |
|
58 | VARIABLE SOS_with_gain_array : COEFF_CEL_ARRAY_REAL(1 TO CEL_NUMBER); | |
59 |
|
59 | |||
60 | VARIABLE SOS_with_gain_array_integer : COEFF_CEL_ARRAY_INTEGER(1 TO CEL_NUMBER); |
|
60 | VARIABLE SOS_with_gain_array_integer : COEFF_CEL_ARRAY_INTEGER(1 TO CEL_NUMBER); | |
|
61 | ||||
|
62 | CONSTANT REAL_NEG : REAL := -1.0; | |||
61 | BEGIN |
|
63 | BEGIN | |
62 |
|
64 | |||
63 | all_cel: FOR I IN 1 TO CEL_NUMBER LOOP |
|
65 | all_cel: FOR I IN 1 TO CEL_NUMBER LOOP | |
@@ -70,20 +72,26 PACKAGE BODY lpp_lfr_filter_coeff IS | |||||
70 | END LOOP all_cel; |
|
72 | END LOOP all_cel; | |
71 |
|
73 | |||
72 | all_cel_int: FOR I IN 1 TO CEL_NUMBER LOOP |
|
74 | all_cel_int: FOR I IN 1 TO CEL_NUMBER LOOP | |
73 |
all_param_int: FOR J IN 1 TO |
|
75 | all_param_int: FOR J IN 1 TO 3 LOOP | |
74 | SOS_with_gain_array_integer(I)(J) := INTEGER( SOS_with_gain_array(I)(J) * REAL(2**(POINT_POSITION)) ); |
|
76 | SOS_with_gain_array_integer(I)(J) := INTEGER( SOS_with_gain_array(I)(J) * REAL(2**(POINT_POSITION)) ); | |
75 | END LOOP all_param_int; |
|
77 | END LOOP all_param_int; | |
|
78 | ||||
|
79 | --------------------------------------------------------------------------- | |||
|
80 | -- INVERSION of A param due to fact that IIR_CEL module make only MULT and MAC operation | |||
|
81 | all_param_int_a: FOR J IN 4 TO 6 LOOP | |||
|
82 | SOS_with_gain_array_integer(I)(J) := INTEGER( SOS_with_gain_array(I)(J) * REAL(2**(POINT_POSITION)) * REAL_NEG ); | |||
|
83 | END LOOP all_param_int_a; | |||
|
84 | --------------------------------------------------------------------------- | |||
76 | END LOOP all_cel_int; |
|
85 | END LOOP all_cel_int; | |
77 |
|
|
86 | ||
|
87 | ||||
78 |
|
|
88 | all_cel_output: FOR I IN 1 TO CEL_NUMBER LOOP | |
79 | all_param_b_out: FOR J IN 1 TO 3 LOOP |
|
89 | all_param_b_out: FOR J IN 1 TO 3 LOOP | |
80 | config_vector( (((I-1)*5)+3-J)*COEFFICIENT_SIZE + COEFFICIENT_SIZE -1 DOWNTO (((I-1)*5)+3-J)*COEFFICIENT_SIZE ) |
|
90 | config_vector( (((I-1)*5)+3-J)*COEFFICIENT_SIZE + COEFFICIENT_SIZE -1 DOWNTO (((I-1)*5)+3-J)*COEFFICIENT_SIZE ) := std_logic_vector(TO_SIGNED(SOS_with_gain_array_integer(I)(J),COEFFICIENT_SIZE )); | |
81 | := std_logic_vector(TO_SIGNED(SOS_with_gain_array_integer(I)(J),COEFFICIENT_SIZE )); |
|
|||
82 | END LOOP all_param_b_out; |
|
91 | END LOOP all_param_b_out; | |
83 | config_vector( (((I-1)*5)+3)*COEFFICIENT_SIZE + COEFFICIENT_SIZE -1 DOWNTO (((I-1)*5)+3)*COEFFICIENT_SIZE ) |
|
92 | ||
84 | := std_logic_vector(TO_SIGNED(SOS_with_gain_array_integer(I)(6),COEFFICIENT_SIZE)); |
|
93 | config_vector( (((I-1)*5)+3)*COEFFICIENT_SIZE + COEFFICIENT_SIZE -1 DOWNTO (((I-1)*5)+3)*COEFFICIENT_SIZE ) := std_logic_vector(TO_SIGNED(SOS_with_gain_array_integer(I)(6),COEFFICIENT_SIZE)); --a2 | |
85 | config_vector( (((I-1)*5)+4)*COEFFICIENT_SIZE + COEFFICIENT_SIZE -1 DOWNTO (((I-1)*5)+4)*COEFFICIENT_SIZE ) |
|
94 | config_vector( (((I-1)*5)+4)*COEFFICIENT_SIZE + COEFFICIENT_SIZE -1 DOWNTO (((I-1)*5)+4)*COEFFICIENT_SIZE ) := std_logic_vector(TO_SIGNED(SOS_with_gain_array_integer(I)(5),COEFFICIENT_SIZE)); --a1 | |
86 | := std_logic_vector(TO_SIGNED(SOS_with_gain_array_integer(I)(5),COEFFICIENT_SIZE)); |
|
|||
87 | END LOOP all_cel_output; |
|
95 | END LOOP all_cel_output; | |
88 |
|
96 | |||
89 | RETURN config_vector; |
|
97 | RETURN config_vector; |
General Comments 0
You need to be logged in to leave comments.
Login now