Hi,
my first thoughts:
- yep, should have low-pass behavior
- FIR design, so it'll be stable
- your code could need some indentation, and is written in a bit complicated way, but that's fine
- your simulation is not labeled, I can just do educated guesses on what's going on
Then I tried to simulate it and realized that it didn't work, as you didn't put any "library" or "use" clause into it. And there's no test bench. If you want help from people, meet them half-way ;-)
Then you did not specify what your goal was. It looks like a simple FIR-filter with all gains set to one. Did you choose that deliberately? Because it looks like you were just experimenting.
I don't know how much knowledge you have about filters, so here are a few hints to get started:
Does any of that help maybe?
Best regards,
GooGooCluster