Generic software architecture for cost efficient powertrain electrification