Yes. An S54 will be a bolt in replacement to the M54. However I dunno why you would want to mate it to an SMG transmission. If I did an S5x swap I'm throwing in a manual transmission. Now the engine bolts in using the factory mounts but other parts from an S54 will be required.