<p>Nvidia CEO Jensen Huang testified that he resigned from Nvidia because he broke the company's code of conduct when he had an affair with a senior employee.</p>