Rapid Software Development for GTM Applications...Continuous Integration Once your software...

19
© ASTC 2017 www.astc-design.com 1 GTM TechDay, Livonia, MI, October 10, 2017 Rapid Software Development for GTM Applications A software view on virtual prototyping

Transcript of Rapid Software Development for GTM Applications...Continuous Integration Once your software...

Page 1: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 1

GTM TechDay, Livonia, MI, October 10, 2017

Rapid Software Development for GTM Applications

A software view on virtual prototyping

Page 2: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 2

Products and Services for the

Automotive Value Chain

Virtualization Based Design – All-in-SoftwareRemove dependencies on hardware

Virtual Platforms are created to serve the Design and Verification Process

VLAB Virtual Platform Creation and Simulation Technology and Tools

Embedded Software Services and Products

Virtual Prototyping Services and Products

OEMIPSoC

MCU

T1

ECU

Page 3: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 3

Enhanced GTM Reference Model

Memory

CPU StimulusGTM

RM/RM++

ASTC

MCSn

Input Stimulus- Crank- CAM- PWM- Other

DMA Triggers

Inputs Monitors

ADC Triggers

Outputs

IRQ

Bus

▪ When we were using the Bosch GTM Reference Model for our software development projects, we found ourselves limited in terms of visibility and debuggability of the MCS cores

▪ Hence – in partnership with Bosch – we created an enhanced GTM Reference Model with advanced instrumentation, tracing, watchpoint, breakpoint and software stepping support

Page 4: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 4

Enhanced GTM Reference Model

▪ Provides visibility and debug access to each channel, each MCS

▪ Register tracing to VTF or VCD (including internal register modifications)

Page 5: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 5

Enhanced GTM Reference Model

▪ Instructions breakpoint and stepping for each MCS core (at Source and Instruction level)

▪ Full software source-level debug for GTM/MCS code

▪ Tracing, breakpoints,watchpoints on GTM MCS code, registers, buses (ARU/AEI), channels and IO

Page 6: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 6

VLAB Virtual Platforms

VLAB Simulator & IDE

VLAB Software Tools:- Native Debug - Perf. Analysis

- Code Coverage (C0, C1, MC/DC)

Test Scripts (Python)

VLAB Test Manager

Fault Injection Scripts

Vector

3rd Party Comms

CAN

VLAB Comms Toolbox

Ethernet

Results Analysis

Lauterbach/

Greenhills

3rd Party Debuggers

Crank/CAM

VLAB Plant Models

Control API

VLAB GUI

Memory

MCU/GTM Virtual Platform

VLAB ISS

Peripherals

CPU

GTM RM/RM++

dSpace/

Simulink

3rd Party Plant Models

I/OCPUCPU

Page 7: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 7

Intermediate Architecture

▪ Virtual platforms don’t necessarily have to represent a ‘real’ artefact, but can also provide an ‘imaginary’ stepping stone

▪ An example of such use is in a software migration project where an intermediate step serves to focus on the timer software first before adjusting the host CPU implementation

Original MCU

eTPUCPU1

Target MCU

GTMCPU2

Imaginary MCU

GTMCPU1

Page 8: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 8

From Virtual Prototyping to

Continuous Integration▪ Once your software engineers have and use a virtual prototype they are likely

to embrace Continuous Integration

▪ Use licenses overnight for regression

▪ Set up dedicated Jenkins server

▪ This requires the development of infrastructure to support continuous integration (CI) and the continuous delivery of automotive systems.

▪ To integrate as often and early as possible, practitioners should invest in virtualized integration platforms.

▪ This makes CI possible during the development process and minimizes dependency on other parts of the system.

Page 9: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 9

Parallel Automated Test Regressions

▪ 24 – 256 CPU Farm,

▪ Running many simulations in parallel

▪ Large test suites executed in parallel at a faction of time

▪ VP test suite execution is faster than on HW

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

ETPUs

z760

Crank CamSensor

Crank Cam

Generator

MPC5777C

Pla

nt

EC

M

BAM + BOOT + APP ELF

Test scripts(.py files)

VCDs

Test Logs /

Reports

Test Coverage

VLAB

Test

Manager

Test

Manager

and C

om

para

tor

Inject APIs

ManageCrank / cam

Exercise APIs on the Spec Models

APIsReturn

Values

PortUpdates

TaskIndicators

APIsReturn

Values

PortUpdates

TestExpected

TaskIndicators

GTM

CPU Next

MCU

Injector Driver

Engine Position

Fuel Injector

Injector Driver

Spec

Models

Page 10: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 10

From Continuous Integration to

All-in-Software

▪ Once Continuous Integration is there, engineers may embrace the concept of development without hardware

▪ Bring more in software, earlier and later in the process

▪ Specification models to develop tests early

▪ Hardware models to circumvent shortage and dependencies

▪ Connections to hardware later to capture behavior and compare

▪ We call this Virtualization Based Development or All-in-Software

Concurrent SW, HW, and TW (Testware) Development, Validation, and Optimization

Continuous Build, Integration and Test with Rapid Iterations and Progress Embedded Made Agile

Page 11: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 11

Virtualization-Based DevelopmentAll-in-Software

CVR Tests

CTR Tests

OptimizationImplementation (Code/Test) ValidationArchitecture / Design

Executable Specs

Definition / Specification

Concurrent SW, HW, and TW (Testware) Development, Validation, and Optimization

Continuous Build, Integration and Test with Rapid Iterations and Progress

GTM

ARU

Outputs

TBUCMU

Share

d R

AM

SYS_CLK CMU_CLKx

TBU_TSx

CH x ~ z

ATOMx

Triggers

CPU Core x

ECU SpecificTiming Control SW

API interface for

Configuration/Control

API Interface for

Status/Data reporting

GT

M R

egis

ters

Reset/Initialization

DPLL

TIMx

CH x ~ z

Inputs

MCSx

CH x ~ z

STATE

TRIGGER

Embedded Made Agile

Design Verification Tests

Performance Metrics

Arch / Design Platform

SW Tests (Unit, Feature, …)

RTL Tests

Software, RTL

SW/HW/System Val Tests

Functional Safety Tests

SW, HW, System

System KPI Tests

ECU Calibration Tests

ECU Control System

Key Use Cases:

✓ Req Spec Analysis

✓ Rapid Spec Prototyping

✓ Early Test Development

Key Use Cases:

✓ Arch/Design Analysis

✓ Rapid Design Prototyping

✓ Early Test Development

✓ HW Spec Validation

Key Use Cases:

✓ SW Development

✓ SW/HW Integration

✓ SW Test

✓ HW HDL Test (SWIL)

Key Use Cases:

✓ SW/HW Validation

✓ System (OL/CL) Validation

✓ HILS Validation

✓ Functional Safety Analysis

Key Use Cases:

✓ BSP/BSW

Optimization

✓ ECU SW Optimization

✓ ECU SW Calibration

Page 12: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 12

EPI DIFO INJECTORASIC

Crank CamSensor

Crank Cam Generator P

lant

Spec

Models

Verification&

ValidationTest scripts(.py files)

VCDs

Test Logs / Reports

VLA

BTest

Manager

Test

Manager

and

Com

para

tor

ManageCrank / cam

Exercise APIs on the Spec Models

TaskIndicators

APIsReturnValues

PortUpdates

TestExpected

Test Coverage

Test Runner

VBD/AIS: Engine Management ECU

Page 13: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 13

EPI DIFO INJECTORASIC

Crank CamSensor

Crank Cam Generator P

lant

Spec

Models

Verification&

ValidationTest scripts(.py files)

VCDs

Test Logs / Reports

VLA

BTest

Manager

Test

Manager

and

Com

para

tor

ManageCrank / cam

Exercise APIs on the Spec Models

TaskIndicators

APIsReturnValues

PortUpdates

TestExpected

SBICPMIC

INJ ASIC

ETPUGTMATU

CPU

MCU

Peripherals ECM

Memories

BAM + BOOT + APP ELF

Test Coverage

Inject APIs

APIsReturnValues

PortUpdates

TaskIndicators

Test Runner

VBD/AIS: Engine Management ECU

Page 14: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 14

ASTC GTM Software LibrariesPowertrain Driver Software

Microcontroller

ECU Abstraction Layer

MCU Abstraction Layer

Application Layer

MCU Hardware

Service Layer

Runtime Environment

Complex Timer

(eTPU / GTM / Other)

Timer

Ign

itio

n/S

park

Fu

el

Inje

cti

on

En

gin

e P

osit

ion

Cu

sto

miz

ati

on

API Adaption Layer

Complex Drivers

OE

M/T

1

Cu

sto

m

Co

nfi

gu

rati

on

s

Timer Abstraction Layer (TAL)

Timer µCode

Fuel Pump

Ignition/Spark

Fuel Injection

Engine Position

OEM/Tier 1

Custom Functions

Proprietary Code

Co

nfi

gu

rati

on

s

Cu

sto

miz

ati

on

Fu

el

Pu

mp

Service Layer

Page 15: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 15

Timer CDD SDK for Engine Control

Engine Position

Fuel Injection

Fuel Pump Control

Injector ASIC

Crank/Cam

Inputs

WR Air/Fuel Sensor

Fuel Rail Pressure Sensor

MAP Sensor

High Speed Mass Air Flow Input

Linear Current Control

DC Motor Control

Absolute Air Pressure Sensor

PWM

Inputs

Discrete

Inputs

PWM

Outputs

Discrete

Outputs

Spark & Knock

Pulse

Inputs

Throttle Position Sensor

Exhaust Pressure Sensor

Fuel Pump

Output

Air/Fuel Sensor Heater

Pulse

Outputs

Glow Plug Control/Monitor

Generator Terminal Output

DEF Metering Valve Control

Ignition Switch

Page 16: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 16

ASTC GTM Software LibrariesSerial Interfaces through GTM, e.g. CAN

Microcontroller

MCAL Driver Layer

ECU Abstraction Layer

Application Layer

MCU Hardware

Service Layer

Runtime Environment

Complex Timer

(GTM)

Timer

MC

AL

I/F

La

ye

r

Rx H

an

dle

r

Tx

Han

dle

r

Reg

Han

dle

r

API Adaption Layer

MCAN Controller

PE

GT

M

Inte

rface

Timer Abstraction Layer (TAL)

Timer µCode

CAN Protocol Engine

Bit Stream Rx

Bit Timing Sync

Co

nfi

gu

rati

on

s

Cu

sto

miz

ati

on

RA

M h

an

dle

r

PE Host Interface

PE FSM / Err Mgnt

Bit Stream Tx

Rx CRC

Page 17: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 17

Sending and receiving CAN-FD via GTM

Page 18: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 18

GTM Products and Services

GTM Software Libraries

Both GTM microcode and CPU code libraries

Powertrain functions

Communication protocols (including CAN, CAN-FD)

Virtual Platforms

GTM Model Toolbox with enhanced GTM model

MCU Virtual Platforms with integrated enhanced GTM (Aurix, RH850)

ECU Virtual Platforms, including closed loop and HILS

Automotive Software Services

Migration support from eTPU to GTM

Complex low level timing control software

Engine control, motor control and others

Virtual Platform Services

Regression environments

Executable specification modelling

Test development and execution

Page 19: Rapid Software Development for GTM Applications...Continuous Integration Once your software engineers have and use a virtual prototype they are likely to embrace Continuous Integration

© ASTC 2017 www.astc-design.com 19

www.vlabworks.com

Advancing the Technology of Electronic System Design

www.astc-design.com

Advancing the Design of Electronic Systems

North AmericaChris [email protected]

EuropeAd [email protected]