Tesla Motors and Panasonic have reportedly reached an agreement on Tesla's massive 'Gigafactory,' which is expected to be the world's largest manufacturer of lithium-ion cells when completed.

According to the Nikkei, Panasonic—Tesla Motors' [NSDQ:TSLA] current battery supplier and a shareholder—will invest 20 billion to 30 billion yen ($194 million to $291 million at current exchange rates), and supply machinery necessary for cell production. The company could end up paying for $1 billion of the total $5 billion investment required for the factory.

Under the terms of a contract negotiated in October 2013, Panasonic will continue to supply Tesla with lithium-ion cells while construction gets underway. The company will supply Tesla with 2 billion cells between now and 2017, to be used in the Model S sedan and Model X crossover.

The Gigafactory is expected to come online at the end of that three-year period. Tesla has narrowed the choice of site (or sites) down to four states: Arizona, Nevada, New Mexico, and Texas. Groundbreaking is expected to take place before the end of the year and, if Tesla meets its goals, production will be in full swing by 2018.

The batteries produced at the Gigafactory will be used in the upcoming Tesla Model 3, a smaller sedan that will compete with the BMW 3-Series and boast a 200-mile range. Tesla is counting on volume to lower the cost of the Model 3's battery pack, enough to make a target base price in the $30,000 range possible.