Nvidia Corp. invested $2 billion in chip-design software maker Synopsys Inc. as part of a broader engineering and design tie-up that gives the chipmaker greater control over its supply chain.