Bringing the power of Eclipse to Digital
Hardware designersHendrik EeckhautMark ChristiaensLieven Lemiengre
2
HELLOMY NAME IS
@heeckhau
3
Eclipse
4
• Navigation
• Autocomplete
• Real-time errors
• Quick-assist/fix
• Refactoring
5
hardware development toolkit
Bring power of Eclipse to Digital Hardware Designers
VHDL
• 20 year old language (based on Ada)
• all shortcomings of arcane languages• verbose
• irregular
• ...
7
Perfect fit for ?
• Xtext looks like perfect fit:• navigation
• type time syntax checking
• linting and quick-fixes
• formatting
• But: Powerful enough for VHDL?
8
Grammar
• navigation
• type time syntax checking
• linting and quick-fixes
• formatting
Demo
Xtext experience
10
Results
Effort
EMFAntlr
Guice
Xtext
Eclipse
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
Overview
Lessons learnt ?
11
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
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
12
Grammar
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
Scoping
• A lot harder than expected
• Difficult to debug (declarative approach, lazy evaluation)
13
Scoping
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
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)
14
UI
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
Autocomplete
• Autocomplete based on grammar/scope is not powerful enough• autocomplete is mostly triggered for
incomplete code (incorrect context)
• extended toolkit would be better
• Most VHDL autocompletes are manually designed
15
Autocomplete
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
Formatting
• Needs a lot of customization
• A lot cleaner to implement than what e.g. Emacs does
• Priority of rules not always clear
• Custom extension for vertical alignment
16
Formatting
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
Testing
• Xtext itself contains good starting points
• Dependency injection (Guice) makes it easy to test
17
Testing
• Grammar
• Scoping
• UI
• Autocomplete
• Formatting
• Testing
• Performance
Performance
18
• Xtext continuously improves
• Sigasi patches: Parallel loading, Model Caching
• Memory usage OKPerformance
Unresolved Xtext issues
• Type system
• Opening non-project files
• Preprocessing
19
?
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
20
Top Related