AC Motor Control Architecture, Code Generation, and Verification