EclipseCon BPM Day Ludwigsburg - Roundtrip Modelling with Eclipse Stardust
Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)
-
Upload
sigasi -
Category
Technology
-
view
1.021 -
download
1
description
Transcript of Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)
Bringing the power of Eclipse to Digital
Hardware designersHendrik EeckhautMark ChristiaensLieven Lemiengre
2
Eclipse
3
• Navigation
• Autocomplete
• Real-time errors
• Quick-assist/fix
• Refactoring
• Navigation
• Autocomplete
• Real-time errors
• Quick-assist/fix
• Refactoring
• Text based
• Syntax books
• Scroll through logs
• Stare at code
• Live with ugly code
5
hardware development toolkit
Bring power of Eclipse to Digital Hardware Designers
VHDL
• Efficient and robust way to design HW
• 20 year old language (based on Ada)
• But all shortcomings of arcane languages• lots of noise
• limited expressiveness
• irregular
• most designers use small subset
• ...
7
VHSIC (Very High Speed Integrated Circuit) Hardware Description Language
Verbose
8
Irregular syntax
9
Long feedback loops
10
11
• Efficient and robust way to design HW
• You can build cool stuff
• Custom cpu’s, Mars rovers, ...
• A good IDE can resolve most issues
Not everything is negative!
Sigasi 1.0
• ANTLR-based Eclipse plugin
• Proved business value
• But:• Lots of prototype code
• Type time compilation
• Memory usage
• Better architecture required
12
Perfect fit for ?
• Xtext looks like perfect fit:• navigation
• type time syntax checking
• linting and quick-fixes
• formatting
• But: Powerful enough for VHDL?
13
Grammar
• navigation
• type time syntax checking
• linting and quick-fixes
• formatting
Demo
Xtext experience
15
Results
Effort
EMFAntlr
Guice
Xtext
Eclipse
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
Overview
Lessons learnt ?
16
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
Grammar
• Lexer: No problems(We had ANTLR grammar to start from)
• Parser: No semantic predicates
• Keep track of the number/size of objects that are created
17
Grammar
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
Scoping
• A lot harder than expected
• Difficult to debug (declarative approach, lazy evaluation)
• Some corner cases continue to pop up
18
Scoping
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
User Interface
• Works as expected : outline, preferences, templates, folding, (syntax and semantic) highlighting
• Xtext team keeps adding nice improvements
• Some scalability issues: Large files are problematic in UI (n2 problems)
19
UI
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
Autocomplete
• grammar/scope information is not enough for VHDL autocomplete• too many suggestions because of
generic grammar (no type information, ... )
• strange behavior because of backtracking parser
• Most VHDL autocompletes are manually designed
20
Autocomplete
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
Formatting
• A lot cleaner to implement than what e.g. Emacs does
• Priority of rules not always clear
• Custom extension for vertical alignment
21
Formatting
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
Testing
• Xtext itself contains good starting points
• Dependency injection (Guice) makes it easy to test
• Most tests can run as simple unit tests (with Eclipse workbench)
22
Testing
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
Performance
23
• Xtext continuously improves
• Sigasi patches:• Parallel loading (#358714)
• Model Caching (#359824)
• Memory usage OK
Performance
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Validation
Validation
• Good framework to add validation checks
• Watch out for resource loading
• Custom configurable severities
24
• Validation
Conclusions
• Xtext is really powerful technology
• Gives great architecture/structure
• Getting started is easy
• But... still a lot of work
• Devil is in the details
25