My question is regarding the memory of a filter when we want to implement it on a real time dsp environment. We have certain memories like scratch memory , intermediate memory and internal memory. Does anyone knows how to we implement a filter in real time environment keeping in mind the memory considerations because memory is an important issue when it comes to real time signal processing. I want to implement a low pass filter using the above conditions.
If memory is your primary concern then an IIR filter is the way to go. It uses very little memory and is pretty computationally efficient.
FIR filters' memory length is one less than the number of filter taps. This usually isn't that much, but it can add up if there are a number of filters and/or they are long.
Not really sure what you mean...
Scratch memory is probably temporary memory that is only used during one call to the filter (like the result of the MAC operations in an FIR). This should be internal since it is used so often.
Intermediate(?) memory - could this be state variables like the input signal history as in an FIR? If so, also internal, because the FIR does convolution with this array.
Internal memory is internal memory. This should be internal because it is called internal. You are probably referring to the coefficients of a filter since these don't change, but I have no idea from your question.
The only thing you should have externally might be your input signal - each new sample gets copied into your history array for multiplication with the coefficients of the filter. 1 copy from external memory per filter pass isn't too expensive.
Things get much more complicated when you have SIMD, multiple memory banks, etc., but you didn't mention any of that in your question.