Siemens said it would pay $37.25 per share for Mentor – which makes software for designing semiconductors.