The big idea is to help make its weakness in the mobile market go away.
Cypress, which makes programmable and memory chips, has fallen for the past two years, while Samsung Electronics contribution to its revenue has increased.
Samsung accounted for about 12 percent of Cypress’s fiscal 2013 revenue of $723 million.
Spansion has seen strong demand from automotive clients for its microcontroller chips, whose uses range from controlling airbag deployment to rolling down windows.
That helped the company, which also makes flash memory-based products, post a rise in revenue in fiscal 2013, halting a string of six straight years of revenue decline.
Spansion shareholders will receive 2.457 Cypress shares for each Spansion share they own, the companies said on Monday, valuing the tax-free deal at about $4 billion.
Shareholders of each company will own half of the combined entity, which will be led by Cypress’ founder and chief executive, T.J. Rodgers.
Cypress said it expects to save more than $135 million per year within three years of the deal closing, which is expected in the first half of 2015.
Spansion was a joint venture set up in 2003 between Fujitsu and AMD. It did not do very well and it filed for bankruptcy in 2009. It emerged from bankruptcy a year later.