The deal could be announced as soon as Monday, according to the sources, who requested anonymity because it had not yet been made public.

Siemens and Mentor Graphics could not immediately be reached for comment.

The acquisition will help Siemens expand its software capabilities, which it has been shoring up in recent years. It bought CD-adapco, a privately held U.S. engineering software firm, earlier this year.

Since taking over Siemens as chief executive, former finance chief Joe Kaeser has set out to reshape the German company and make it more profitable and less cumbersome by selling off non-core units.

It said last week that it planned a public listing of its $15 billion healthcare business, lifting its shares to a 16-year high as investors hoped for an injection of capital that would boost its valuation while funding future investments.

But Siemens has increasingly had to compete with software companies who can develop technology faster because they have a sole focus. Only 5 percent of Siemens' 350,000 employees are software engineers. As part of its "Vision 2020" strategy, it has identified software as a growth area for the company.

A sale of Mentor Graphics, based in Wilsonville, Oregon, and run by Chief Executive Wally Rhines, will cap off a long road for a company that has been no stranger to activist investors or takeover offers over the years.

Billionaire activist Carl Icahn won a proxy fight in 2011 that secured him three board seats, although he exited his investment in the company in April after six years.

Mentor also fended off a hostile takeover by rival Cadence Design Systems Inc in 2008.

Mentor Graphics has been under pressure since activist hedge fund Elliott Management Corp reported an 8.1 percent stake in the company in September and said its shares were deeply undervalued. Elliott could not be reached for comment Sunday.

Reuters reported last month that Mentor Graphics was working with Bank of America Corp to explore strategic alternatives, including a sale.