Software has become a core component of modern vehicles, so much that software defined vehicles (SDVs) are transforming the automotive market, bringing key features to the software rather than the hardware of the vehicle.
But developing high-quality code for software defined vehicle architecture is challenging. Software defined vehicles require more complex levels of integration between software and hardware components, and manufacturers wishing to provide faster upgrades will need need to consider how the changes will affect the whole system — especially as new technology interacts with the old. That's why keeping code quality high is essential to continuous development and deployment in SDVs.
➡️ Improve Code Quality Now: Free Trial
In this blog, we give an overview of SDVs and explain the importance of code quality in managing SDV complexity and keeping vehicle systems safe, secure, and compliant.
Software Defined Vehicle Overview
What Is a Software Defined Vehicle?
A software defined vehicle (SDV) is a vehicle whose core features and functionalities are primarily driven by software, rather than mechanical and hardware components, to operate.
Focusing on the software system means the car's capabilities can be upgraded continuously over time via centralized computing architecture. This provides many benefits for the user (such as customization and advanced connectivity), but also for the automakers developing and managing SDVs. OEMs, Tier 1 suppliers, Tier 2 suppliers, and service providers are building SDV ecosystems that connect the software and the hardware in transportation and mobility.
Instead of having to change out hardware, the software is designed from the start to be able to introduce not just maintenance updates, but also major upgrades and brand-new functions to the vehicle over time. Typically, this is done through over-the-air (OTA) and firmware-over-the-air (FOTA) updates, meaning the embedded vehicle operating system can be serviced remotely, without requiring a trip to a dealership or mechanic.
The various functionalities and architectures of SDVs can be applied to connected, electric, and autonomous/semi-autonomous vehicles. SDVs have the potential to help automakers truly offer the promise of a "smartphone on wheels," transforming the vehicle and driver experience while seamlessly updating key features and adding in new technologies like generative AI and beyond.
Software Defined Vehicle Levels
As SDVs are still emerging in the automotive industry, SDV levels are not as established or rigorous as the SAE levels for autonomous vehicles. Nevertheless, PwC provides a good guide to progressive levels of SDVs, with levels 1-3 as mechanics and hardware driven, and levels 3-5 increasingly software defined.
Level 0 – Mechanically Controlled Vehicle: Functions are mechanically controlled, with only engine control and similar components managed by electronic systems.
Level 1 – E/E Controlled Vehicle: Vehicle is equipped with Electronic Control Units (ECUs) with advanced electrical and electronic (E/E) functions embedded with software.
Level 2 – Software Controlled Vehicle: ECUs are greater in number, so the vehicle can be managed through in-vehicle networks. OTA updates are limited to in-vehicle infotainment (IVI) and small bug fixes.
Level 3 – Partial Software Defined Vehicle: Domain-based architecture allows for better integration of ECUs, and computing is more advanced in handling the control of integrated functions. OS and APIs are standardized in some areas. Communication is faster, and OTA updates can add new features and value.
Level 4 – Full Software Defined Vehicle: Through zone-based architecture, scalability and placement of functions are optimized. OS and API accelerate shift-left through software-first development, and decoupling of software and hardware makes room for future-ready design. Faster communication and large-scale data transmission.
Level 5 – Software Defined Ecosystem: Mobility and external systems are always connected, allowing for AI, advanced control systems, continuous learning, vehicle app standardization across multiple systems, plug-and-play hardware updates. A full SDV at this level would provide continuous value and optimization for manufacturer and user.
Software Defined Vehicle Architectures
The vision of SDVs is redefining vehicle architecture, shifting away from more conventional domain architectures to zone architectures.
Domain Architecture – E/E functions are grouped by functional “domains” responsible for specific functions of the vehicle, such as the steering system, and each group has its own ECU. This setup requires more effort and resources, because the ECUs require more network components and cables to communicate with other ECU networks.
Zone Architecture – E/E systems are grouped around different vehicle “zones,” which correspond with the physical location of areas within the vehicle, such as the passenger cabin. Because the systems are in close proximity, cabling can be reduced and processing speed can be increased as a result.
While the wiring complexity and ECU integration are simplified and scalability is increased with next-generation setups, robust code is necessary for developing more advanced software functionalities that zonal flexibility provides.
Software defined vehicle architecture can include:
- Backend systems like data storage, backup capabilities, and software upgrade management
- Hardware
- Embedded OS
- Telematics and connectivity
- Apps
- AI integration.
What Are the Benefits of Developing SDVs?
The recent shift to SDVs is transforming automotive development, allowing OEMs and suppliers to decide what hardware and software components get added at what stage. It brings many potential benefits like getting to market faster and reducing costs and resources while increasing the value of the automotive software.
- Future Proofing Software. Manufacturers taking an SDV approach to automotive development are better able to plan for future technological advancements.
- Flexibility and Adaptability. Developers can manage the software remotely and apply updates to multiple car models.
- Predictive Maintenance. Software can monitor the health of the vehicle and predict issues before they turn into major problems.
- Enhanced Safety. Safety features like Advanced Driver Assistance Systems (ADAS) can react faster and make decisions in real-time.
But the features providing such benefits are extremely complex. Modern vehicles have between 70 to 100 ECUs, and as more computing power is being integrated, today’s vehicles can contain over 100 million lines of code, according to Motor Trend. And this number is only poised to grow as SDV technology advances.
Keeping code quality high is essential to developing robust SDV systems.
Why Code Quality Matters in Software Defined Vehicles
Because software is centralized in SDVs, keeping code quality high is crucial. Poor quality code can lead to all sorts of problems, from slow performance to safety risks.
Developers must adopt testing approaches and methodologies to ensure optimal performance and seamless, continuous updates. But there are some roadblocks to SDV development that engineers will need to overcome.
Cybersecurity: 100+ millions of lines of code and expanded attack surfaces increase the risk of bugs and vulnerabilities, so it’s important to check code early and often as it’s being developed, as OTA updates are introduced, and with third-party software.
Legacy Systems: Next-gen architectures required for SDVs add technical debt when legacy code is outdated. Development teams working with legacy code may need to perform extensive rewrites or refactoring.
Functional Safety and Compliance: Safety-critical systems for SDVs like ADAS and other autonomous driving features become increasingly complex in software-driven environments. SDVs must comply with rigorous automotive standards like ISO 26262.
How Static Analysis Improves Software Quality in SDVs
Static Analysis is an effective approach in keeping code quality high for software defined vehicles. By analyzing the source code without having to execute the program, developers get a better understanding of the code base and identify issues as the code is being written.
Using a static analysis tool — like Perforce QAC and Perforce Klocwork — accelerates development, optimizes CI/CD pipelines, and helps to ensure that the embedded software in an SDV is of optimal quality and is safe, secure, and reliable.
Static analysis tools also help enforce key automotive coding guidelines like MISRA and AUTOSAR, and keep software compliant with functional safety standards like ISO 26262 and security standards like ISO/SAE 21434.