Other Cool Stuff together with Eclipse and Modelling Carsten Gosvig - - PowerPoint PPT Presentation

other cool stuff
SMART_READER_LITE
LIVE PREVIEW

Other Cool Stuff together with Eclipse and Modelling Carsten Gosvig - - PowerPoint PPT Presentation

A 10 years journey of Medical Device Development Other Cool Stuff together with Eclipse and Modelling Carsten Gosvig SW Tools Architect 20 March 2017 2 Requirements Why do we use modelling? Research Digital HW Development Highway


slide-1
SLIDE 1

Other Cool Stuff A 10 years journey of Medical Device Development together with Eclipse and Modelling

Carsten Gosvig SW Tools Architect 20 March 2017

slide-2
SLIDE 2

Why do we use modelling?

Domain Access Fitting SW C#/.NET Service C#/.NET Production Labview Product Matlab Audiology Matlab DSP Algorithm Matlab eSW Matlab FW Java HW Java

2

Requirements

Audiology Research Digital HW FW Analog HW

Platform Avenue

Product Embedded SW DSP Algorithm

Application Street C

  • m

p l e t i

  • n

A l l e y

Production___ Fitting SW Service

Development Highway

slide-3
SLIDE 3

2 parameters

Type = LP f3dB = 1.5 kHz

Parameter Abstraction Levels

3

Requirements D D +

a1

+

a2

+ +

s0 b0 b1 b2 Input

ctl[2] MUX ctl[1] SHIFT ctl[5:3] +/- REG REG MUX REG REG REG REG MUX MUX Register file ctl[6] ctl[9] ctl[10] ctl[11] ctl[7] ctl[0] A B data_in REG ctl[12] input_sel sh_res add_res res1 w1 w2 q0_w1 q0_w2 q1_w2 q1_w1 ctl[8] acc_sel data_out

f3dB

LP

6 coefficients

a1 = 0.125 a2 = 0.375 b0 = 1.0 b1 = 0.5 b1 = 1.0 s0 = 0.75

f3dB

LP2

f3dB

LP1

1 parameter

Filter = LP2

f3dB

LP3

HW eSW DSP Algorithm Audiology

32 instructions

SEL(Q0), SEL(W2), SHR(2), ADD(0), UPD(A); SEL(Q0), SEL(W2), SHR(4), ADD(A), UPD(A); -- (1) SEL(Q0), SEL(W2), SHL(1), ADD(0), UPD(B); SEL(Q0), SEL(W2), SHR(2), ADD(B), UPD(B); -- (2) SEL(Q0), SEL(W1), SHR(2), ADD(B), UPD(B); -- (3) ...

Transformations: Matlab, C#, DSL PC only PC and Device

slide-4
SLIDE 4

Automation and Customization

4

Requirements

Start set: HW.bias = 42 run: FW.startTest3(4, 10) get: stat = FW.isRunning stat == 0 get: result = FW.level Stop start

HW.bias FW.level

snoop

Production FW

slide-5
SLIDE 5

The Journey

2007-2010

  • HW, FW and eSW

development

  • XML, C, RT model,

CLI tools, Java API, Device debug GUI

  • Eclipse Ganymede,

RCP, EMF, CDT 2011-2013

  • DSP Algorithm and

Device production

  • Cached RT model,

IDE, HTTP API, Settings diff GUI

  • Eclipse Juno, Jetty,

CNF, EMFCompare 2014-2016

  • Audiology

development and Fitting SW driver

  • Custom debug GUI

M2T, Textual DSL

  • Eclipse Mars,

Xtend, Xtext 2017…

  • Performance and

Modelling usability

  • Incremental M2M,

Graphical editors, new Eclipse+Java

  • Eclipse Neon,

Graphiti, e4 XWT

The Solution

6

slide-6
SLIDE 6

Modelling like source code

6

The Solution

2007-2010

  • HW, FW and eSW

development

  • XML, C, RT model,

CLI tools, Java API, Device debug GUI

  • Eclipse Ganymede,

RCP, EMF, CDT X

Y Z

  • N
  • M
  • A
  • B
  • C

X

  • A
  • B
  • D

Y

  • N
  • M

Z

  • N
  • M

.c

CDT

  • A
  • B
  • D

Patched RT model XML

slide-7
SLIDE 7

Performance with models in 2010

Year 2010 Types 90 Files 170 Elements 14K Instances 220K Memory 540 MB Load XML 1 sec Transform 11 sec

 Numbers are for the parameter DSL  Types: Element types in DSL  Files: Source model files  Elements: Source model elements  Instances: RT model elements  Load XML: Load source model  Transform: Source model to RT model

7

The Solution

2007-2010

  • HW, FW and eSW

development

  • XML, C, RT model,

CLI tools, Java API, Device debug GUI

  • Eclipse Ganymede,

RCP, EMF, CDT

eSW FW HW

slide-8
SLIDE 8

Source model tooling

 Controlling XML syntax for href attributes  …xmi.impl.XMLResourceImpl.getEObjectByID(String)  …xmi.impl.XMLResourceImpl.getURIFragment(EObject)  From EMF library example: <author>#//@writers.0</author>  Source model example: link="#idsp_unit.gp_core.top_param"  Generating source model files from c code with annotated elements  Using Eclipse CDT Managed Builder to drive the source file iteration  Each IASTTranslationUnit calls special ASTVisitor for annotated elements

8

The Solution

2007-2010

  • HW, FW and eSW

development

  • XML, C, RT model,

CLI tools, Java API, Device debug GUI

  • Eclipse Ganymede,

RCP, EMF, CDT

slide-9
SLIDE 9

RT model tooling

9

The Solution

2007-2010

  • HW, FW and eSW

development

  • XML, C, RT model,

CLI tools, Java API, Device debug GUI

  • Eclipse Ganymede,

RCP, EMF, CDT X

  • A
  • B
  • D

Y

  • N
  • M

Z

  • N
  • M

.image

X.A = 100 Y.N = 10 Z.N = 20 Z.M = 70

Matlab Tests Java API

Device debug GUI CLI

Java Tests

RCP

slide-10
SLIDE 10

More model tooling

10

The Solution

2011-2013

  • DSP Algorithm and

Device production

  • Cached RT model,

IDE, HTTP API, Settings diff GUI

  • Eclipse Juno, Jetty,

CNF, EMFCompare X

  • A
  • B
  • D

Y

  • N
  • M

Z

  • N
  • M

.binary .xml

EMF Binary Resource Impl EMF Compare Production CNF Jetty HTTP Server

slide-11
SLIDE 11

Supporting non Java runtime

 Uses org.eclipse.jetty.server.Handler.handle(String,

Request, HttpServletRequest, HttpServletResponse)

11

The Solution

2011-2013

  • DSP Algorithm and

Device production

  • Cached RT model,

IDE, HTTP API, Settings diff GUI

  • Eclipse Juno, Jetty,

CNF, EMFCompare

Request: http://localhost:2950/plain/manager/sessions/foo/connections/bar/automation.flowchart Response: x=100 y=3000

slide-12
SLIDE 12

Caching RT model

Year 2010 Types 90 Files 170 Elements 14K Instances 220K Memory 540 MB Load XML 1 sec Transform 11 sec Load Bin 2 sec

 Numbers are for the parameter DSL  Types: Element types in DSL  Files: Source model files  Elements: Source model elements  Instances: RT model elements  Load XML: Load source model  Transform: Source model to RT model  Load Bin: Load cached RT model

12

The Solution

2011-2013

  • DSP Algorithm and

Device production

  • Cached RT model,

IDE, HTTP API, Settings diff GUI

  • Eclipse Juno, Jetty,

CNF, EMFCompare

 org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl  Binary format is tightly coupled to classifier and feature ID’s

slide-13
SLIDE 13

Even more model tooling

13

The Solution

2014-2016

  • Audiology

development and Fitting SW driver

  • Custom debug GUI

M2T, Textual DSL

  • Eclipse Mars,

Xtend, Xtext

X

  • A
  • B
  • D

Y

  • N
  • M

Z

  • N
  • M

Fitting Software

.driver

workflow readLevel {

  • utput a

a = FW.level }

XML C#

Xtend Generator Custom debug GUI

slide-14
SLIDE 14

From XML to Xtext DSL approach

14

The Solution

2014-2016

  • Audiology

development and Fitting SW driver

  • Custom debug GUI

M2T, Textual DSL

  • Eclipse Mars,

Xtend, Xtext

slide-15
SLIDE 15

Customizable debugging GUI

15

The Solution

2014-2016

  • Audiology

development and Fitting SW driver

  • Custom debug GUI

M2T, Textual DSL

  • Eclipse Mars,

Xtend, Xtext EMF.Edit

slide-16
SLIDE 16

Performance with ever growing models

Year 2010 2017 Types 90 260 Files 170 3300 Elements 14K 190K Instances 220K 3100K Memory 540 MB 2800 MB Load XML 1 sec 3 sec Transform 11 sec 103 sec Load Bin 2 sec 23 sec

 Numbers are for the parameter DSL  Types: Element types in DSL  Files: Source model files  Elements: Source model elements  Instances: RT model elements  Load XML: Load source model  Transform: Source model to RT model  Load Bin: Load cached RT model

16

The Solution

2017…

  • Performance and

Modelling usability

  • Incremental M2M,

Graphical editors, new Eclipse+Java

  • Eclipse Neon,

Graphiti, e4 XWT

Product Audiology DSP Algorithm eSW FW HW eSW FW HW

slide-17
SLIDE 17

Improved tooling

 Our own BinaryResourceImpl  Handling classifier and feature ID’s

17

The Solution

2017…

  • Performance and

Modelling usability

  • Incremental M2M,

Graphical editors, new Eclipse+Java

  • Eclipse Neon,

Graphiti, e4 XWT X Y Z

  • N
  • M
  • A
  • B
  • D

Q P P

  • S

Q

  • S

X Y Z Y

  • N
  • M

X

  • A
  • B
  • D

Z

  • N
  • M

Q P P

  • S

Q

  • S

RT model

Accessor

  • Z
  • N
  • M
slide-18
SLIDE 18

RT model memory consumption

 Requirement  Production test systems have limited memory  Solution  Use Boolean flags field instead of individual Boolean fields  Our own base class that extends org.eclipse.emf.ecore.impl.EObjectImpl  Find elements in model that are identical and then only keep one of them Finding identical elements also takes time  Replace general element structures with new element type Instead of *1000 elements per memory block we will only have one element

18

The Solution

2017…

  • Performance and

Modelling usability

  • Incremental M2M,

Graphical editors, new Eclipse+Java

  • Eclipse Neon,

Graphiti, e4 XWT T

  • 1
  • 7

U

  • 1
  • 7

U TU

  • 1
  • 7

T

slide-19
SLIDE 19

New Eclipse and Java versions

 Requirement  Use the latest versions – less bugs and most features  Support Eclipse Neon which requires Java 8 runtime  Support Matlab having it’s own JVM embedded, which is only at Java 7  Solution  Make the API needed in Matlab available through an HTTP interface  Ended up reusing/extending the first Jetty HTTP Server based API  Will generate a Java 7 compliant frontend for Matlab that uses HTTP

19

The Solution

2017…

  • Performance and

Modelling usability

  • Incremental M2M,

Graphical editors, new Eclipse+Java

  • Eclipse Neon,

Graphiti, e4 XWT

slide-20
SLIDE 20

Graphical Editors

20

2017…

  • Performance and

Modelling usability

  • Incremental M2M,

Graphical editors, new Eclipse+Java

  • Eclipse Neon,

Graphiti, e4 XWT Graphiti e4 XWT Binding Editor

slide-21
SLIDE 21

Solution Numbers

 Human Resources  20 SW developers have contributed over time  Around 60 man-years of work  More than 240 users  Artifacts  7500 files of Java source and test code  2500K lines of Java source and test code  85000 test model files

21

The Solution

2007-2017

slide-22
SLIDE 22

Did we get what we wanted?

 We got to the Development Highway  One common and shared set of DSL’s for exchanging artifacts  Optimized cooperation between teams by using same DSL’s and tools  Learnings  By starting bottom-up the modelling did become quite low-level  Implementing Model Editors at a later stage has been challenging

22

The Solution

2007-2017

slide-23
SLIDE 23

Live Demo

 Browse source model (Model files)  Parameter Browser (Abstraction layers)  Operation Browser (Automation workflows)  Interface Browser (Custom debug GUI)  HTTP API Server (Non Java access)

23

The Solution

slide-24
SLIDE 24

Questions?

A 10 years journey of Medical Device Development together with Eclipse and Modelling Company: Oticon A/S – oticon.com Location: Copenhagen – Denmark Presenter: Carsten Gosvig – cgos@oticon.com

24

Thank You

slide-25
SLIDE 25

Evaluate the Sessions

Sign in and vote at eclipseconverge.org

  • 1

+1