Other Cool Stuff A 10 years journey of Medical Device Development together with Eclipse and Modelling
Carsten Gosvig SW Tools Architect 20 March 2017
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
Other Cool Stuff A 10 years journey of Medical Device Development together with Eclipse and Modelling
Carsten Gosvig SW Tools Architect 20 March 2017
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
p l e t i
A l l e y
Production___ Fitting SW Service
Development Highway
2 parameters
Type = LP f3dB = 1.5 kHz
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_outf3dB
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
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
2007-2010
development
CLI tools, Java API, Device debug GUI
RCP, EMF, CDT 2011-2013
Device production
IDE, HTTP API, Settings diff GUI
CNF, EMFCompare 2014-2016
development and Fitting SW driver
M2T, Textual DSL
Xtend, Xtext 2017…
Modelling usability
Graphical editors, new Eclipse+Java
Graphiti, e4 XWT
The Solution
6
6
The Solution
2007-2010
development
CLI tools, Java API, Device debug GUI
RCP, EMF, CDT X
Y Z
X
Y
Z
.c
CDT
Patched RT model XML
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
development
CLI tools, Java API, Device debug GUI
RCP, EMF, CDT
eSW FW HW
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
development
CLI tools, Java API, Device debug GUI
RCP, EMF, CDT
9
The Solution
2007-2010
development
CLI tools, Java API, Device debug GUI
RCP, EMF, CDT X
Y
Z
.image
X.A = 100 Y.N = 10 Z.N = 20 Z.M = 70
Matlab Tests Java API
Device debug GUI CLI
Java Tests
RCP
10
The Solution
2011-2013
Device production
IDE, HTTP API, Settings diff GUI
CNF, EMFCompare X
Y
Z
.binary .xml
EMF Binary Resource Impl EMF Compare Production CNF Jetty HTTP Server
Uses org.eclipse.jetty.server.Handler.handle(String,
Request, HttpServletRequest, HttpServletResponse)
11
The Solution
2011-2013
Device production
IDE, HTTP API, Settings diff GUI
CNF, EMFCompare
Request: http://localhost:2950/plain/manager/sessions/foo/connections/bar/automation.flowchart Response: x=100 y=3000
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
Device production
IDE, HTTP API, Settings diff GUI
CNF, EMFCompare
org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl Binary format is tightly coupled to classifier and feature ID’s
13
The Solution
2014-2016
development and Fitting SW driver
M2T, Textual DSL
Xtend, Xtext
X
Y
Z
Fitting Software
.driver
workflow readLevel {
a = FW.level }
XML C#
Xtend Generator Custom debug GUI
14
The Solution
2014-2016
development and Fitting SW driver
M2T, Textual DSL
Xtend, Xtext
15
The Solution
2014-2016
development and Fitting SW driver
M2T, Textual DSL
Xtend, Xtext EMF.Edit
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…
Modelling usability
Graphical editors, new Eclipse+Java
Graphiti, e4 XWT
Product Audiology DSP Algorithm eSW FW HW eSW FW HW
Our own BinaryResourceImpl Handling classifier and feature ID’s
17
The Solution
2017…
Modelling usability
Graphical editors, new Eclipse+Java
Graphiti, e4 XWT X Y Z
Q P P
Q
X Y Z Y
X
Z
Q P P
Q
RT model
Accessor
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…
Modelling usability
Graphical editors, new Eclipse+Java
Graphiti, e4 XWT T
U
U TU
T
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…
Modelling usability
Graphical editors, new Eclipse+Java
Graphiti, e4 XWT
20
2017…
Modelling usability
Graphical editors, new Eclipse+Java
Graphiti, e4 XWT Graphiti e4 XWT Binding Editor
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
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
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
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