Toshiba and Western Digital have agreed in principle to settle a dispute over the Japanese firm’s plans to sell its $18 billion chip unit and aim to have a final agreement in place next week.

Word on the street is that the Toshiba board has approved a framework for a settlement.

Western Digital had been able to block a deal to selling the unit to a Bain Capital-led consortium.

The settlement under discussion calls for Western Digital to drop arbitration claims seeking to stop the sale in exchange for Toshiba allowing it to invest in a new production line for advanced flash memory chips that will start next year.

A Toshiba spokesman said that while the company was open to a settlement, it would not disclose discussion specifics or details of board of directors meetings. “It is not a fact that we have reached an agreement with Western Digital,” he said.

Western Digital is not saying anything.

Toshiba was forced to put the unit - the world’s no. 2 producer of NAND chips - on the block to cover billions of dollars in liabilities arising from its now bankrupt US nuclear power unit Westinghouse.

The deal with the Bain-led consortium will, however, see it reinvest in the unit and together with Hoya a maker of parts for chip devices, Japanese firms will hold more than 50 percent of the business - a keen wish of the Japanese government.

As part of the planned settlement, Toshiba and Western Digital would extend existing agreements for their chip joint ventures in Yokkaichi, central Japan, one of the sources said. The current agreements are set to start expiring from 2021.

Western Digital would also invest in a completely new chip plant that Toshiba will start building next year in northern Japan, the source said.

Western Digital, one of world’s leading makers of hard disk drives, paid some $16 billion last year to acquire SanDisk, Toshiba’s chip joint venture partner since 2000.

With data storage key to most next-generation technologies from artificial intelligence and autonomous driving to the Internet of Things, NAND chips have only grown in importance and Western Digital has been desperate to keep the business out of the hands of rival chipmakers.

The sale still needs to clear the snarling mauls of the regulatory watchdogs but they are not expected to rip the trousers of the deal.