check out the engine swap forum on bimmerforums you'll see a very recent thread about the right way to do this. My guess is that it would be triple the $$$ to do S54 vs S52, double if you add in a supercharger or turbo for the S52. The S54 has electronic throttle among other things and the price of a bare engine is more like $4k-$6k vs. S52 motors going for $3k with all accessories. The most economical way is to pick up a wrecked car, take what you need cuz the little parts will kill you, and then part the rest. Or so I've read over years of fantasizing....... sigh.
Think there is someone selling their turbo'd S52 motor on ebay.
Good luck.