37
CCC19 Shanghai: Edward Wang, Adam Izraelevitz Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam Izraelevitz State of Chisel

State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Chisel 3.0, FIRRTL, and BeyondChisel Community Conference China 2019 (CCC19 China)

Presented by Edward WangSlides by Adam Izraelevitz

State of Chisel

Page 2: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Page 3: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

HDL Wars: A New Hope● In 2010, the HW industry was in a difficult place

○ Dennard Scaling had ended○ Moore’s Law was on its way out

● Demand for computation kept growing○ New applications○ More performance for less power/area○ Only option was to design more complicated, specialized hardware

● Designing hardware was so difficult○ Billions of transistors○ Design complexity

● Meanwhile, in a small lab in Berkeley, a solution was brewing....

3

Page 4: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Instead of writing multiple RTL instances, write one instance generator that uses meta-programming for powerful parameterization

Type-Safety

Hardware Generators: Type-Safe Meta-Programming for RTL

Design Reuse Powerful Language Features4

Page 5: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

No Loss of Expressibility: “Verilog-like” Chisel

FIR (Finite Impulse Response) Filter - 3-point moving average

What about >3 points?What about weighted averages?

We want a generic FIR filter! 5

Page 6: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

FIR Filter - Parameterized by bitwidth and coeffients with no loss of expressibility or performance.

Meta-programming enables powerful parameterization.

Massive Increase in Parameterizability: “Software-like” Chisel

6

Page 7: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

FIR Filter - Parameterized by bitwidth and coeffients with no loss of expressibility or performance.

Meta-programming enables powerful parameterization.

Massive Increase in Parameterizability: “Software-like” Chisel

7

Page 8: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Hired Jonathan Bachrach (2010)

8

Page 9: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

By the End of ParLab (2013), We Learned....

9

12 Grad Students Chisel Chips

Page 10: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

And so, in late 2013, the problem of designing hardware was forever solved.

10

Page 11: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Just kidding.

11

Page 12: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Improving RTL Design ≠ Solving The Hardware Design Loop

* from “How to Draw Chip and Dale booklet”. (Walt Disney, 1955) 12

Page 13: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

What had to change?

Hardware Design Ecosystem External CollaborationsStable and User-Friendly API

13

Page 14: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Platform-Specific or Application-Specific RTL Changes

IBM 45nm SOI

ST 28nm FDSOI

Zynq FPGA

Chip RTL+ scan interface+ snapshotting+ interactive debug + clock-generators

+ SRAMs with init+ specialized layout

+ SRAM macros+ modified module hierarchy+ specialized layout

14

Page 15: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Platform-Specific or Application-Specific RTL Changes

IBM 45nm SOI

ST 28nm FDSOI

Zynq FPGA

Chip RTL+ scan interface+ snapshotting+ interactive debug + clock-generators

+ SRAMs with init+ specialized layout

+ SRAM macros+ modified module hierarchy+ specialized layout

15

Page 16: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Realization: We need a software stack, but for hardware

libraries

language

compiler

platforms

projects

x86 ARM RISC-Vtransforms

clang

HwachaRocketBOOM

rocketchip chisel-utils

16

FIRRTLChisel Frontend

Page 17: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

For an ecosystem, we needed a hardware compiler infrastructure

FPGA Snapshotting

FPGA Assertions

FPGA FAME-1

ChiselVerilog Other languages

FIRRTLASIC SRAMs

Floorplanning Hints

RetimingC++Verilog Scala

17

BIST/JTAG Stitching Early Area Estimation

Page 18: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Developing, Porting, Code Reviews, Testing, and so forth

18

Spring 2015

Summer 2015

Fall 2015

Winter 2015

Spring 2016

Summer 2016

Fall 2016

Winter 2016

Spring 2017

Summer 2017

Fall 2017

Designed FIRRTL Compiler

Designed Chisel 3 Frontend

Ported RocketChip

Ported Chisel Testers

Added Fixed-Point Type

Added Analog Type

Added multi-clock

Released Chisel 3.0.0

Released FIRRTL 1.0.0

Page 19: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

What had to change?

Hardware Design Ecosystem External CollaborationsStable and User-Friendly API

19

Page 20: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Chisel 3.0.0Reg(UInt(3.W))RegNext(3.U)RegInit(3.U)Reg(chiselTypeOf(3.U))

Emphasis on Clarity

1. Register of type UInt, width of 32. Register whose next cycle’s value is 33. Register whose initial value is 34. Register no initial value and width of 2

20

Reg(UInt(3))

Chisel 2.0.01. Register of type UInt, width of 32. Register whose next cycle’s value is 33. Register whose initial value is 34. Register no initial value and width of 2

Page 21: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Chisel 3.0.0Reg(UInt(3.W))RegNext(3.U)RegInit(3.U)Reg(chiselTypeOf(3.U))

Emphasis on Clarity

1. Register of type UInt, width of 32. Register whose next cycle’s value is 33. Register whose initial value is 34. Register no initial value and width of 2

21

Reg(UInt(3))

Chisel 2.0.01. Register of type UInt, width of 32. Register whose next cycle’s value is 33. Register whose initial value is 34. Register no initial value and width of 2

Page 22: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

What had to change?

Hardware Design Ecosystem External CollaborationsStable and User-Friendly API

22

Page 23: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Documentation, Documentation, Documentation

23

Page 24: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Bootc

amps

and T

utoria

ls

24

Page 25: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Bootc

amps

and T

utoria

ls

25

Page 26: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Open-Development via Github Issues/Pull Requests

26

Page 27: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Stack Overflow!

27

Page 28: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Academic Impact: 338 citations (as of 2019)

28

Page 29: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Active Users (That We Know Of)

29

Page 30: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Looking Forward

30

Page 31: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Chisel3 Github Stars

Where is Chisel headed?

31

Githu

b Star

s

Time

Page 32: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Future Areas of Growth

32

Diversify and Strengthen Community

Develop Needed Features and Provide Timely Support

Formalize Governance for Ecosystem Stability

In-Person Meetups

Open Dev Meetings

Commercial Collaboration

Enable Passionate Individuals

Standardize Verification Infra

Generating Hardware Collateral

Preserve Backwards Compatibility

Advanced Circuit Transformations

CHIPS Alliance Partnership

Constitution and Member Rights

Communicate Direction/Roadmap

Closer Commercial Partnerships

Page 33: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Future Areas of Growth

33

Diversify and Strengthen Community

Develop Needed Features and Provide Timely Support

Formalize Governance for Ecosystem Stability

In-Person Meetups

Open Dev Meetings

Commercial Collaboration

Enable Passionate Individuals

Standardize Verification Infra

Generating Hardware Collateral

Preserve Backwards Compatibility

Advanced Circuit Transformations

CHIPS Alliance Partnership

Constitution and Member Rights

Communicate Direction/Roadmap

Closer Commercial Partnerships

Page 34: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Excited? Intrigued? Skeptical?

34

Page 35: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

35

Page 36: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

36

Page 37: State of Chisel - GitHub › chisel-lang › ccc... · Chisel 3.0, FIRRTL, and Beyond Chisel Community Conference China 2019 (CCC19 China) Presented by Edward Wang Slides by Adam

CCC19 Shanghai: Edward Wang, Adam Izraelevitz

Shoutout to Chiselers out there! (And many more!!)

37