Driverless cars could hit public roads within the next decade, according to research firm Boston Consulting Group. Many automakers agree, and they're already testing out driverless vehicles on public roads. But for investors, it can be tough to narrow down effective ways to invest in this fledgling market.

Google's driverless car. Image source: Google.

Alphabet's Google is often associated with driverless cars, but the company generates most of its sales from advertising. Auto parts manufacturer Delphi Automotive is also frequently mentioned, but its driverless tech only generates a small percentage of its overall sales.

Instead, investors should check out two beaten-down stocks with heavier exposure to the connected auto market -- Mobileye (MBLY) and NXP Semiconductors (NXPI 1.54%). Let's take a closer look at what these companies do, why they underperformed the market, and whether or not they are bargains at current prices.

Mobileye
Mobileye provides 90% of the world's top automakers with collision avoidance systems. These systems use cameras, radars, and computer vision chips to detect obstacles, then automatically hit the brakes to avoid them. Its system also detects the edges of lanes to automatically stay in a single lane. Mobileye's systems are only semi-autonomous, but they're much cheaper than fully autonomous solutions. They're also widely regarded as a key stepping stone toward the development of driverless vehicles.

At first glance, Mobileye's growth looks impressive. Sales rose 68% to $241 million in 2015, compared to 77% growth in 2014. Non-GAAP net income rose 142% to $113.4 million. GAAP net income came in at $68.5 million, compared to a net loss of $30.1 million a year earlier. Most of the difference between its non-GAAP and GAAP results was attributed to $45 million in share-based compensation, which was reduced 41% from 2014 levels. Total operating expenses also declined 16%, while the ASP of its EyeQ computer vision chips rose, boosting margins year-over-year.

BMW's i3 uses Mobileye's collision avoidance system. Image source: BMW.

However, Mobileye stock currently trades at 129 times trailing earnings and 35 times sales, which is significantly higher than the industry average P/E of 36 and P/S of 3.5. Those ratios look somewhat justified by Mobileye's growth in 2015, but its sales and earnings growth are expected to respectively fall to 41% and 42% this year. Larger chipmakers like NXP Semiconductor (NXPI 1.54%) and Nvidia (NVDA 4.29%) are also aggressively moving into the automotive SoC market, which could dramatically reduce Mobileye's growth and pricing power. Those concerns caused shares of Mobileye to slide 16% over the past 12 months.

NXP Semiconductors
NXP became the 800-pound gorilla of the automotive chip market after it acquired rival Freescale last year. Both companies manufacture chips that conform to the FlexRay data protocol, a communications protocol which is ten times faster than the current CAN message protocol used in cars today. It's also more secure, because it uses two independent messaging channels, which addresses concerns about hackable cars.

On the surface, NXP's automotive growth doesn't look impressive. On a combined and adjusted basis, NXP's automotive revenues rose just 1% annually and accounted for 36% of its top line last quarter. But as automakers produce more semi-autonomous vehicles, demand for FlexRay-compliant microcontroller and processor units will rise. BI Intelligence estimates that the percentage of new cars which are shipped connected to the Internet will climb from 13% in 2015 to 75% in 2020. That growth will help NXP diversify away from slowing markets like mobile devices.

Shares of NXP have fallen 15% over the past 12 months due to concerns about digesting Freescale, lower-than-anticipated sales growth from the acquisition, and declining sales of NFC chips for smartphones and other devices. But looking further ahead, analysts expect NXP's earnings to grow 25% annually over the next five years, which gives it a 5-year PEG ratio of 0.6. That makes it cheaper than Mobileye, which has a PEG ratio of 1.1, and is well below the "undervalued" PEG threshold of 1.

One's a bargain, the other isn't
NXP and Mobileye have both underperformed the broader market over the past year, but NXP looks like a better bargain than Mobileye. NXP is fundamentally cheap, and it will likely see automotive sales climb as demand for connected cars rises. Mobileye's valuations are simply too high, and its core business could be marginalized by NXP, Nvidia, and other larger rivals in the near future.