F
Florian Schlembach
Guest
Hi there,
I am just trying to modify a running LMS filter implementation. Basically, it is a kind of FIR filter with adaptive filter coefficients. This filter is processing the I and Q components (it is a communication system) separately, which is a simplification.
Now, I try to extend it to a complex-valued realisation. The basic difference can be seen in the following code lines:
if(strobe_filtout_reg) begin
p_i_reg[n] <= $signed({ {1{p_aixi_reg[n][35]}} ,p_aixi_reg[n][35:0]}) - $signed({ {1{p_aqxq_reg[n][35]}},p_aqxq_reg[n][35:0]});
p_q_reg[n] <= $signed({ {1{p_aixq_reg[n][35]}} ,p_aixq_reg[n][35:0]}) + $signed({ {1{p_aqxi_reg[n][35]}},p_aqxi_reg[n][35:0]});
// p_i_reg[n] <= p_aixi_reg[n];
// p_q_reg[n] <= p_aqxq_reg[n];
end
The lines that are commented out are running fine (real-valued LMS filter), the other (complex-valued) gives a weird behaviour when it runs on hardware (jumps in the fft plot of the signal etc.). I have already checked whether p_i_reg is large enough to avoid any potential overflows. In simulation (also post-route timing simulation) I do not experience any problems with the complex-valued implementation.
It's difficult to explain the entire code in a few sentences and a small snippet but maybe you could have a look into it: http://pastebin.com/n5GBKQz7
Thank you, Florian
I am just trying to modify a running LMS filter implementation. Basically, it is a kind of FIR filter with adaptive filter coefficients. This filter is processing the I and Q components (it is a communication system) separately, which is a simplification.
Now, I try to extend it to a complex-valued realisation. The basic difference can be seen in the following code lines:
if(strobe_filtout_reg) begin
p_i_reg[n] <= $signed({ {1{p_aixi_reg[n][35]}} ,p_aixi_reg[n][35:0]}) - $signed({ {1{p_aqxq_reg[n][35]}},p_aqxq_reg[n][35:0]});
p_q_reg[n] <= $signed({ {1{p_aixq_reg[n][35]}} ,p_aixq_reg[n][35:0]}) + $signed({ {1{p_aqxi_reg[n][35]}},p_aqxi_reg[n][35:0]});
// p_i_reg[n] <= p_aixi_reg[n];
// p_q_reg[n] <= p_aqxq_reg[n];
end
The lines that are commented out are running fine (real-valued LMS filter), the other (complex-valued) gives a weird behaviour when it runs on hardware (jumps in the fft plot of the signal etc.). I have already checked whether p_i_reg is large enough to avoid any potential overflows. In simulation (also post-route timing simulation) I do not experience any problems with the complex-valued implementation.
It's difficult to explain the entire code in a few sentences and a small snippet but maybe you could have a look into it: http://pastebin.com/n5GBKQz7
Thank you, Florian