I'm working on creating a basic FIR filter as part of a larger project. I've created a really basic four tap filter using LabVIEW primitives that's about as fast as I can make it, but I was curious to see if anyone would be able to spot any ways I can make gains in efficiency The file attached is a VI snippet.
Part of the problem is that eventually this would need to become a 64 or 128 tap filter, and I don't believe this implementation would scale up very well.
Some things I already tried that didn't do much:
You're right in that it's going to be rough to scale.
To start trying to make it easier, try right-clicking on the Shift Registers and having them implement as a Feedback Node. At least that way you're not forced to drag out N-1 of those.
Also, don't you want a casual filter? If so, you'll need to set those initial conditions to 0. Shift Registers/Feedback Nodes will maintain their last value. If you call your filter more than once, you'll be using the values that remain from the last time you called the filter.
If you can get the MAC into an easy subVI, you can go into VI Properties and make it inline. That way, it'll appear like a subVI but you'll be able to treat it as if it's on the block diagram. That might make it a little easier to scale.
I noticed you're trying to time your loop. You aren't succeeding with your current attempt. There's nothing controlling the order of operation. You'll want to use a sequence structure and change the time to high resolution relative seconds.