US-based Cadence to buy IC design firm Cosmic Circuits