The N51 has a 3-stage intake manifold already so there's nothing to swap. It's internals are different from the N52 so 330 software will not work. You can get software specific to that engine. Go to www.realoem.com and enter in the last 7 of your VIN and it will tell you what engine you have.

It's an N52N. Forgive my ignorance, what differences are there between my engine and your 325's?