Home Learning Paths ECU Lab Assessments Interview Preparation Arena Pricing Log In Sign Up

DaVinci Configuration Variant Feature

DaVinci Configurator Pro's variant feature allows a single project to contain parameter overrides for multiple hardware targets. Each hardware variant is defined by a criterion value, and parameters are conditionally assigned based on the active criterion.

Pythondavinci_variant_matrix.py
# Python script to generate DaVinci variant config for 3 ECU hardware targets
# Target A: 8MHz crystal, CAN only, 256KB Flash
# Target B: 40MHz crystal, CAN + ETH, 1MB Flash
# Target C: 40MHz crystal, CAN + LIN, 512KB Flash

VARIANT_MATRIX = {
    "ECU_A_CAN_ONLY": {
        "Can/CanGeneral/CanOscFrequency": 8000000,
        "Eth/EthGeneral/EthEnabled": False,
        "Lin/LinGeneral/LinEnabled": False,
        "NvM/NvMCommon/NvMDatasetSelectionBits": 1,  # small DATASET
    },
    "ECU_B_CAN_ETH": {
        "Can/CanGeneral/CanOscFrequency": 40000000,
        "Eth/EthGeneral/EthEnabled": True,
        "Lin/LinGeneral/LinEnabled": False,
        "NvM/NvMCommon/NvMDatasetSelectionBits": 2,
    },
    "ECU_C_CAN_LIN": {
        "Can/CanGeneral/CanOscFrequency": 40000000,
        "Eth/EthGeneral/EthEnabled": False,
        "Lin/LinGeneral/LinEnabled": True,
        "NvM/NvMCommon/NvMDatasetSelectionBits": 2,
    },
}

for variant, params in VARIANT_MATRIX.items():
    generate_davinci_variant_arxml(variant, params)

Mandatory vs Optional Feature Sets

XMLVariant_ComIPdu_Control.arxml


  EngineStatus_PDU
  
  TRUE




  SOMEIP_SpeedService_PDU
  HW_Target == ECU_B_CAN_ETH
  TRUE

FeatureECU-AECU-BECU-CControl Mechanism
CAN 500 kbpsMandatory
Ethernet SOME/IPComIPduEnabled + EthEnabled variant criterion
LIN body busLinEnabled + LinIf/LinTp variant criterion
Extended DEM eventsDemEventAvailable variant criterion

ECU Extract Management per Variant

ECU Extract Version Control
  OEM SystemDesk project (System Description)
       │
       ├── Generate ECU Extract → ECU_A_Extract_v2.3.arxml
       ├── Generate ECU Extract → ECU_B_Extract_v2.3.arxml
       └── Generate ECU Extract → ECU_C_Extract_v2.3.arxml
           │
           ├── Git tag: sys-desc-v2.3
           │   ECU_A_Extract_v2.3.arxml  (stored independently)
           │   ECU_B_Extract_v2.3.arxml
           │   ECU_C_Extract_v2.3.arxml
           │
           ▼ Tier-1 imports per target
           DaVinci ECU_A project → ECU_A_Extract_v2.3.arxml
           DaVinci ECU_B project → ECU_B_Extract_v2.3.arxml
           DaVinci ECU_C project → ECU_C_Extract_v2.3.arxml

⚠️ Never Merge ECU Extracts

ECU extracts for different hardware variants must be stored as separate files and never merged. A merged extract would contain signals and PDUs from all variants — the Tier-1 DaVinci project would then configure BSW modules for hardware that does not exist on the target, causing incorrect COM signal tables and potentially routing signals to non-existent peripherals.

Variant Validation in CI: Signal vs DBC Check

Pythonvariant_signal_check.py
#!/usr/bin/env python3
# CI: verify each variant's ComSignal set matches its DBC file
import can_dbc_parser, davinci_api, sys

VARIANT_DBC_MAP = {
    "ECU_A_CAN_ONLY": "ECU_A.dbc",
    "ECU_B_CAN_ETH":  "ECU_B.dbc",
    "ECU_C_CAN_LIN":  "ECU_C.dbc",
}

errors = []
for variant, dbc_file in VARIANT_DBC_MAP.items():
    project = davinci_api.load_project("ECU.dpj", variant=variant)
    dbc = can_dbc_parser.load(dbc_file)

    com_signals = {s.name for s in project.get_active_com_signals()}
    dbc_signals = {s.name for s in dbc.signals}

    in_com_not_dbc = com_signals - dbc_signals
    in_dbc_not_com = dbc_signals - com_signals

    for sig in in_com_not_dbc:
        errors.append(f"{variant}: COM signal '{sig}' not in DBC — phantom signal")
    for sig in in_dbc_not_com:
        errors.append(f"{variant}: DBC signal '{sig}' not in COM — silently missing!")

if errors:
    print("VARIANT VALIDATION FAILED:")
    for e in errors: print(f"  {e}")
    sys.exit(1)
print("All variant signal checks passed")

Summary

Large-scale variant management requires three disciplines: a single DaVinci project with criterion-based parameter switching (not duplicated configs per variant), independently version-controlled ECU extracts per hardware target, and CI validation that compares each variant's active COM signal set against its DBC file. The CI signal check is the most valuable single automation in any multi-variant AUTOSAR program — it catches signal mismatches that would otherwise only be found during vehicle integration testing.

🔬 Deep Dive — Core Concepts Expanded

This section builds on the foundational concepts covered above with additional technical depth, edge cases, and configuration nuances that separate competent engineers from experts. When working on production ECU projects, the details covered here are the ones most commonly responsible for integration delays and late-phase defects.

Key principles to reinforce:

  • Configuration over coding: In AUTOSAR and automotive middleware environments, correctness is largely determined by ARXML configuration, not application code. A correctly implemented algorithm can produce wrong results due to a single misconfigured parameter.
  • Traceability as a first-class concern: Every configuration decision should be traceable to a requirement, safety goal, or architecture decision. Undocumented configuration choices are a common source of regression defects when ECUs are updated.
  • Cross-module dependencies: In tightly integrated automotive software stacks, changing one module's configuration often requires corresponding updates in dependent modules. Always perform a dependency impact analysis before submitting configuration changes.

🏭 How This Topic Appears in Production Projects

  • Project integration phase: The concepts covered in this lesson are most commonly encountered during ECU integration testing — when multiple software components from different teams are combined for the first time. Issues that were invisible in unit tests frequently surface at this stage.
  • Supplier/OEM interface: This is a topic that frequently appears in technical discussions between Tier-1 ECU suppliers and OEM system integrators. Engineers who can speak fluently about these details earn credibility and are often brought into critical design review meetings.
  • Automotive tool ecosystem: Vector CANoe/CANalyzer, dSPACE tools, and ETAS INCA are the standard tools used to validate and measure the correct behaviour of the systems described in this lesson. Familiarity with these tools alongside the conceptual knowledge dramatically accelerates debugging in real projects.

⚠️ Common Mistakes and How to Avoid Them

  1. Assuming default configuration is correct: Automotive software tools ship with default configurations that are designed to compile and link, not to meet project-specific requirements. Every configuration parameter needs to be consciously set. 'It compiled' is not the same as 'it is correctly configured'.
  2. Skipping documentation of configuration rationale: In a 3-year ECU project with team turnover, undocumented configuration choices become tribal knowledge that disappears when engineers leave. Document why a parameter is set to a specific value, not just what it is set to.
  3. Testing only the happy path: Automotive ECUs must behave correctly under fault conditions, voltage variations, and communication errors. Always test the error handling paths as rigorously as the nominal operation. Many production escapes originate in untested error branches.
  4. Version mismatches between teams: In a multi-team project, the BSW team, SWC team, and system integration team may use different versions of the same ARXML file. Version management of all ARXML files in a shared repository is mandatory, not optional.

📊 Industry Note

Engineers who master both the theoretical concepts and the practical toolchain skills covered in this course are among the most sought-after professionals in the automotive software industry. The combination of AUTOSAR standards knowledge, safety engineering understanding, and hands-on configuration experience commands premium salaries at OEMs and Tier-1 suppliers globally.

← PreviousHands-On: Cross-Platform Vehicle FunctionNext →Supplier BSW Integration Strategies