18
Vehicle Energy & Mode Control Johannes Foufas 1 Continuous Integration with Silver at Volvo Cars Corporation

Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

Vehicle Energy & Mode ControlJohannes Foufas 1

Continuous Integration

with Silver at

Volvo Cars Corporation

Page 2: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

2

https://www.youtube.com/watch?v=DwEb9GFX0bo

Page 3: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

Usage of Silver is growing

Page 4: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

Usage of Silver is growing

Engine BatteryElectric

DriveBrake

Vehicle

Motion

Control

AC

Control Energy

management

Drivability

Cooling

systems

Page 5: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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

Page 6: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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.

Page 7: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

12/4/2019 7

Zuul tests cross-

project changes in

parallel.

This is essential

for projects with

many ECU´s

https://zuul-ci.org/

Page 8: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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

Page 9: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

12/4/2019 9

Page 10: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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

Page 11: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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

Page 12: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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

Page 13: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

12/4/2019 13

ZUUL v2.6 problems* Updates to zuul or jenkins needs compatible to all branches.

Page 14: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

12/4/2019 14

There is no Jenkins only Zuul v3* Ansible replaces Jenkins job execution.

* Nodepool replaces Jenkins node management.

* Everything is yaml!

Page 15: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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

Page 16: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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

Page 17: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

Silver – CarMaker, Vehicle Motion POC

Traction Control Brake Blending

Page 18: Continuous Integration with Silver at Volvo Cars Corporation · 2020. 7. 30. · CI/CD with Ansible Use the same Ansible playbooks to deploy your system and run your tests. ... There

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