0

I have designed a multi rate fir filter in MATLAB and I want to implement it in verilog.This is the block diagram. enter image description here

Total number of taps are 391. Is there any way to automatically generate verilog code? MATLAB hdl coder is giving a lot of errors.

Also, My input sampling rate is 44.1 kHz and output sampling rate is 48 kHz. Signal passband and stopband are 1kHz and 1.1kHz. So what should be the clock frequency of G(z),I(z), K(z) and P(z) (I,K,P(z) are the anti imaging filter). please help!

  • What kind of errors? – Ben Mar 15 '21 at 17:53
  • 1
    Does this help you: https://dsp.stackexchange.com/questions/67407/realtime-sample-rate-conversion/67408#67408. This implements the rate conversion with a maximum frequency of 470.4 Ksps with an FIR approach, or 67,2 Ksps max with a polyphase filter approach. In either case with avoiding the large M=147 downsampling the overall filter requirements are much simpler. – Dan Boschen Mar 16 '21 at 03:20
  • @Ben lot of errors, if you give me your email I can send you my MATLAB files – Himadri Debnath Mar 16 '21 at 06:02
  • 2
    @HimadriDebnath I mean, this is just development: fix these errors; one by one. Start with the smallest piece of your signal chain and try to get HDL coder to translate it. If that doesn't work, further try to narrow down. It's not like we can magically make your code work by guessing what the code is and what errors it produces. – Marcus Müller Mar 16 '21 at 09:12
  • @MarcusMüller Thank you for your advice. I am doing so. I was getting hundreds of errors, That's why I asked. Anyway it will be helpful if you answer my 2nd question. – Himadri Debnath Mar 16 '21 at 14:34
  • I don't understand your second question. You have the rates given, and then you ask what the rates are? – Marcus Müller Mar 16 '21 at 14:42
  • @MarcusMüller I mean is the sampling frequency and clock frequency of filter same? Like x[n] is 44.1Khz, so after up sampling it becomes 441 kHz. That means the clock frequency of registers of G(z) should be 441kHz, right? – Himadri Debnath Mar 16 '21 at 15:00

0 Answers0