Marvell Technology Group Ltd. (Nasdaq: MRVL), a chipmaker looking to build itself a future outside of a declining area of the market, has agreed to buy Cavium Inc. (Nasdaq: CAVM) for about $6 billion.

The deal will see Marvell buy Cavium common stock in exchange for consideration of $40.00 per share in cash and 2.1757 Marvell common shares for each Cavium share, according to a statemen. Marvell intends to fund the cash consideration with capital from the combined companies and $1.75 billion in debt financing.

Marvell is trying to remake itself after a corporate scandal which led to the ouster of its founders under pressure from activist investor Starboard Value LP. The company has specialized in chips that control hard disk drives, a market which is no longer growing as new technology begins to take over data storage.

San Jose, California-based Cavium would be the biggest deal by Marvell CEO Matthew Murphy who took the role in 2016. Cavium, a maker of network processors, is one of several companies trying to use ARM Holdings Plc technology to break Intel Corp.’s lucrative hold on the server microprocessor market. That effort is still in the early stages and the world’s largest chipmaker has more than 99 percent market share. Cavium shareholders are expected to own about 25 percent of combined company on a pro forma basis.

The deal is yet another move toward consolidating the $300-billion semiconductor industry. Chipmakers have combined at a record pace over the last two years trying to gain scale to better cope with rising costs and a shrinking customer list. In the biggest proposed deal so far, Broadcom Ltd. has offered to buy Qualcomm Inc. for more than $100 billion.

Shares of Marvell have jumped 46 percent in 2017 giving the company a market value of about $10 billion. Cavium shares have gained 21 percent. Its customers include Western Digital Corp., Toshiba Corp. and Samsung Electronics Co., according to Bloomberg supply chain analysis.