I think a lot of it would depend on how exactly the SMG module communicates with the other modules in the car and how much SMG-specific cooperation it needs from them. From a software standpoint it seems like something that could work, if the SMG components request information from the DME, et cetera via the same interface as what exists in the DME for the regular M54 engine. Additionally, since the SMG stuff physically operates a manual gearbox, I think there would need to be some level of compatibility between a gearbox for the S54 and the gearbox for the M54 you have.
Bottom line is that anything is possible if you have enough time and money, but it's probably prohibitively expensive and totally not worth even thinking about doing. You would be better off swapping the whole power/drivedrain/rear end and all of the electronic components from a donor car if you want to go messing with stuff like this.
A forum community dedicated to BMW E46, E90, and F30 owners and enthusiasts. Come join the discussion about M performance, turbo kits, engine swaps, builds, modifications, classifieds, troubleshooting, maintenance, and more!