Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible...
Transcript of Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible...
Vehicle Energy & Mode ControlJohannes Foufas 1
Continuous Integration
with Silver at
Volvo Cars Corporation
Usage of Silver is growing
Usage of Silver is growing
Engine BatteryElectric
DriveBrake
Vehicle
Motion
Control
AC
Control Energy
management
Drivability
Cooling
systems
CAE Engineers use Silver to run plantmodels
2009 2014
Sil Pilot on
current
Engine
plattform
2015 2016 2017
Pilot withExplorative tests on nextEngine plattform
Server automation and education
Ramp up to 100 users, now also in moreprojects
Gating CI system based on git/gerrit/zuulv2. The first for modelbased developmentat Volvo Cars Corporation
2018
Time lineAn organic growth of SW components and new users
2019
Complete Engine SIL in CI, ZUULv3
Tested at scale
Zuul powers some of the largest Open Source development efforts,and we contribute!
https://zuul-ci.org/
Project GatingKeep your builds evergreen by automatically merging changes only if they pass tests.
CI/CD with AnsibleUse the same Ansible playbooks to deploy your system and run your tests.
Cross-Project DependenciesEasily test changes to multiple systems together before landing a single patch.
12/4/2019 7
Zuul tests cross-
project changes in
parallel.
This is essential
for projects with
many ECU´s
https://zuul-ci.org/
Developer Commit
TL Check
script
MISRA,
MXAM
Complexity
Analysis,
MXRAY
Signal
Consistency
Build
dllGcc
check
Unit
Test
Gerrit Code Review +1
Team Level
SSP/SP level
Unit Level
On Model level
Automatic step
Manual step
Gerrit PO Review +2
Smoke/Merge
Test
Build dllCompile
Target
Function Test (SSP SIL)
Integration Test (SP SIL)
Release
Explorative Tests + PowerBox + Documantation
SW for production
NOYES
Check
Gate
Commit successful
ART Level
SSP/SP level
Solution Level
On ECU Level
To supplier: ExDB, integration with BSW
Calibrating + Testing
(HIL, Engine Rigs, Car)
Calibrating + Testing
(HIL, Engine Rigs, Car)
Upload to DTECS (hex +
A2L)
To supplier: ExDB, generate VBF Generate VBF
(Using VBFConverter, old build)
From ExDB to PIE R&D
Test VBF Test VBF
Upload to PIE R&D
Complete CI
Memory
maps
CPP
check
C code
diff
DTECS
C
Constants
(dcm)
git tag
12/4/2019 9
Test Compile
Static Code analyze
Unit Tests
Code Review +1
(made by at least
1 other developer.)
Author +2
Automatic step
Manual step
Not fully
implemented
Developer commit
(C-Code)
Generate Doc
ReSim
Zuul Verification +2
Code Submitted to master
Zuul
Verification +1
v
Merge Test
Build dllCompileTarget
Memory maps Release
git tag
12/4/2019 11
Unit SIL test
Open-loop
Module SIL test
Open-loop
Module SIL test
Closed-loop
ECM SIL test
Closed-loop
• Unit-, Module- and ECM-level tests
• ECM includes supplier SW
• With or without plant models
• All SIL tests – from open-loop
unit tests to closed-loop ECM
tests are using the same toolchain
SIL Test levels
12/4/2019 12
What makes it work?* Non democratic
- small core team decides, backed up by management
* Pair debugging with developers
* Distribute to developers machines
* Gating, don't merge broken code!
- The heart is SIL merge tests, component tests with sensor models
- Speculative merge, all changes tested sequential in paralell
* Incremental changes
- added jobs, tests, checks, required levels to pass
- Features added over time, like custom builds/jobs
- Performance improved over time, build avoidance, 38min average
12/4/2019 13
ZUUL v2.6 problems* Updates to zuul or jenkins needs compatible to all branches.
12/4/2019 14
There is no Jenkins only Zuul v3* Ansible replaces Jenkins job execution.
* Nodepool replaces Jenkins node management.
* Everything is yaml!
12/4/2019 15
It puts the CI configuration in the repo* Configuration is synchronized with build items.
- No need to think about backwards compatibility.
* Infrastructure can be tested together with the rest of the
project.
- No unicorns in the server hall!
- All jobs are reproducible!
D---E master
/
A---B---C---F origin/master
Proof of concept, by Alejandro Gonzalez and his team.
Vehicle Model
ECU C code
Silver
Drive modes
Ambient
Pressure
Ambient
Temperature
Car cfg
SWElectric motors +
High Voltage Battery PVC_ECM, .dll
FMU, .dllInside
Silver
Silver – CarMaker, Vehicle Motion POC
6 DOF Vehicle Model
Inside
CarMaker
IPG CarMaker
Brake HW (s-fun) and SW (.dll)
Inside
Simulink
Scenario
Simulink
Silver – CarMaker, Vehicle Motion POC
Traction Control Brake Blending
Volvo Cars Corporation & Synopsis Qtronic cooperates and builds a setup where Silver is master to a
Linux image slave of a VCU. The core computer is based on NVIDIA’s DRIVE AGX Xavier technology and
will allow Volvo Cars to implement an advanced computing platform for its new cars on the
forthcoming Scalable Product Architecture 2 (SPA 2) vehicle platform.
Vehicle Model
Test Weaver
ECU C code
Silver,
masterVCU Linux
image, slave
Drive modes
Ambient
Pressure
Ambient
Temperature
Car cfg
SWElectric motors +
High Voltage Battery PVC_ECM, .dll
Ethernet
FMU, .dllInside
Silver
Current development, Domain SIL