• 0
sgandhi

Audio processing

Question

I am working with nexys 4 ddr board...

I am using on board microphone and audio jack with task of giving audio at the mic and hearing through speakers or headphones at the jack.......

The nexys datasheet says there is a need of three signals... mic clk, lrsel and data output...

Now am I suppose to directly provide the name of the output pin in the xdc file in pwn audio section or there is some processing to be done?

the data output is H5 but where is it routed?... and on the other side audio jack needs pdm/ pwm input which is the same form that mic gives....so just help me with the logic...

 

THANK YOU 

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

@D@n

I need your help sir...

I want to use triangle or a square wave and want to pass it through the three/four band pass filters so I could analyze the harmonics...!!

Now if I am working in digital domain so I may go for FIR Compiler IP but from where can I get triangle/square wave in digital domain as I don't want to use the microphone and suppose if I get it how will I define them as input of x no of bits when customizing FIR IP ??

Please help me with this or suggest some other idea..

My work is on halt currently..

Thank you..

Edited by muku

Share this post


Link to post
Share on other sites
  • 0

@muku,

Have you looked at this article?  That'll explain how to build a phase accumulator.  The top bit of this phase accumulator will easily qualify for your square wave.  If you wanted it at a different amplitude, you could easily do something like: square_wave <= (phase_accumulator[PHASE_WIDTH-1])? amplitude : -amplitude;

That should give you your square wave.

As for the triangle wave, the phase accumulator by itself is a saw tooth.  You could also use the techniques in this article to turn it into something closer to a triangle.

Dan

Share this post


Link to post
Share on other sites
  • 0

@muku,

If you want to try using your own FIR filter, you might find this article useful as well.  It describes code that will allow you to get about 2k multiplies per input audio sample, or about 2k filter coefficients per audio sample, while using only one hardware multiply.  That's a fairly powerful filter, and the code described is open source as well.

Dan

Share this post


Link to post
Share on other sites
  • 0

@D@n

The output of mic has 16 bit pdm data at 48 kHz , now audio being non - stationary signal, I cannot let the whole data pass through FIR bandpass filter so instead of windowing it, can I use BRAM IP (Block Memory Generator) with depth of 1024 and than pass it through the FIR ?

 

Thanks.........

Share this post


Link to post
Share on other sites
  • 0

@muku,

Why not let it all pass through all of your bandpass filters?  If you want to selectively filter it, it'll cost you more logic and debugging pain.  You'd have to create the logic to place it into memory, the logic to pull it out and place it into the filter, the logic to take the output from the filter and place that back in memory ... yikes.  If your project doesn't require this, then I would recommend not doing it.  I think you'd find it easier to filter everything, and then if you don't want to output an answer then just ignore the output of the filter.

Remember: this isn't software.  If you place a filter within your design, it'll be there regardless of whether you are using it or not.

Dan

Share this post


Link to post
Share on other sites
  • 0

@D@n

 

Oh yes I understood what you are exactly trying to say... But passing whole of my pdm data ( as audio is infinitely large)  directly from the filter would be a good idea ?

Share this post


Link to post
Share on other sites
  • 0

@muku,

That all depends upon what you wish to do with it.  Are you intending to record and play back, or send the received audio directly to a D/A?  If you want to record from the microphone and play back in a head set, then I'd personally recommend you skip the memory.  Even if you want to do something else first, skipping the memory would be a good first step simply because it means one less thing that can go wrong.

Dan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now