- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I designed FIR filter and I try to undestand why the number of output samples is different from the input? It lacks 2-3 samples. Thank you for your help.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do you do the counting? hopefully not by fingers...
Every filter output needs initial time to settle. the internal delay line(same as number of taps) have to be filled up first. The output will only be correct after this delay line is full. just in case, groupdelay of FIR is order/2 and is a different concept.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On each rising edge of ast_source_valid (enable output), I write the result in file.
ex: I have a FIR filter with 16 coefficients. 5000 input samples with an enable => 4997 output samples. Why 3 missing samples? If I want all my samples out, how do I do? I find nothing about it in the documentation. Thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't use fir compilers or simulink. I guess your enable signal doesn't go high until after few clks.
I don't think you should worry about it if that is the case. In many designs we don't care about startup functionality as long as things will soon settle. Check the filtering itself. apply fft in Matlab to your output/input and see the response and check if it matches the function freqz(taps)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why are you worried about 3 missing outputs? They're probably gone forever because of latency. Also, are you using the avalon data out valid signal as your "data valid" signal or just sampling it according to your data in side, if you are that's a no no? :) I bet if you run 10000 inputs you'll get 9997. I tend to look at the streaming data anyway in signaltap. The first n samples out of an n stage FIR will be invalid carp data anyway. Why not run 10000 samples through and grab the most recent 5000? or at least give time for your fir n data stages to fill up. Put an impulse through it and see if that helps to determine the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A couple of them probably got stuck in the Avalon ST FIFO. I ran into that problem a couple versions ago (haven't checked the latest version yet, so can't be sure). If it's really a big deal for you, just zero pad your original input a little bit.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page