Transcript
Page 1: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

Bringing the power of Eclipse to Digital

Hardware designersHendrik EeckhautMark ChristiaensLieven Lemiengre

Page 2: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

2

Page 3: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

Eclipse

3

• Navigation

• Autocomplete

• Real-time errors

• Quick-assist/fix

• Refactoring

Page 4: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)
Page 5: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• Navigation

• Autocomplete

• Real-time errors

• Quick-assist/fix

• Refactoring

• Text based

• Syntax books

• Scroll through logs

• Stare at code

• Live with ugly code

5

Page 6: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

hardware development toolkit

Bring power of Eclipse to Digital Hardware Designers

Page 7: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

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

Page 8: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

Verbose

8

Page 9: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

Irregular syntax

9

Page 10: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

Long feedback loops

10

Page 11: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

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!

Page 12: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

Sigasi 1.0

• ANTLR-based Eclipse plugin

• Proved business value

• But:• Lots of prototype code

• Type time compilation

• Memory usage

• Better architecture required

12

Page 13: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

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

Page 14: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

Demo

Page 15: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

Xtext experience

15

Results

Effort

EMFAntlr

Guice

Xtext

Eclipse

Page 16: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• Grammar

• Scoping

• UI

• Autocomplete

• Formatting

• Testing

• Performance

• Validation

Overview

Lessons learnt ?

16

• Grammar

• Scoping

• UI

• Autocomplete

• Formatting

• Testing

• Performance

• Validation

Page 17: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• 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

Page 18: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• 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

Page 19: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• 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

Page 20: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• 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

Page 21: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• 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

Page 22: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• 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

Page 23: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• 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

Page 24: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

• 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

Page 25: Bringing the power of Eclipse to Digital Hardware designers (EclipseCon 2012)

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


Top Related