Chisel and FIRRTL for next-generation SoC designs
Jack Koenig�SiFive�CWG TAC Member
1
4/19/22
© 2020 SiFive. All Rights Reserved.
Introduction�
What is the Chisel Working Group (CWG)?
2
4/19/22
© 2020 SiFive. All Rights Reserved.
What is Chisel?
3
4/19/22
© 2020 SiFive. All Rights Reserved.
No Loss of Expressibility: “Verilog-like” Chisel
FIR Filter - 3-point moving sum
What about >3 points?�What about weighted averages?
We want a generic FIR filter!
4
4/19/22
© 2020 SiFive. All Rights Reserved.
Massive Increase in Parameterizability: “Software-like” Chisel
FIR Filter - Parameterized by bitwidth and coeffients with no loss of expressibility or performance.
Meta-programming enables powerful parameterization.
5
4/19/22
© 2020 SiFive. All Rights Reserved.
Massive Increase in Parameterizability: “Software-like” Chisel
FIR Filter - Parameterized by bitwidth and coeffients with no loss of expressibility or performance.
Meta-programming enables powerful parameterization.
6
4/19/22
© 2020 SiFive. All Rights Reserved.
Platform-Specific or Application-Specific RTL Changes
7
4/19/22
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
© 2020 SiFive. All Rights Reserved.
Realization: We need a software stack, but for hardware
8
4/19/22
libraries
language
compiler
platforms
projects
x86
ARM
RISC-V
transforms
clang
Hwacha
Rocket
BOOM
rocketchip
chisel-utils
FIRRTL
Chisel Frontend
© 2020 SiFive. All Rights Reserved.
FIRRTL: An Extensible Hardware Compiler Framework
9
4/19/22
Modular Compiler Passes (Transforms)
Top
MyMux
...
...
Top
MyMux
...
...
Top
MyMux
...
...
Core
Transform
Custom
Transform
Metadata
Annotations
Metadata
Annotations
Metadata
Annotations
Robust Metadata/Annotations Support
© 2020 SiFive. All Rights Reserved.
Projects of the Chisel Working Group
10
4/19/22
© 2020 SiFive. All Rights Reserved.
Highlights
11
4/19/22
© 2020 SiFive. All Rights Reserved.
Chisel v3.5.0 – v3.5.2 Released!
12
4/19/22
See release notes on Github!
© 2020 SiFive. All Rights Reserved.
Chisel v3.5.0 – v3.5.2 Released!
13
4/19/22
See release notes on Github!
© 2020 SiFive. All Rights Reserved.
ChiselTest Improvements
14
4/19/22
© 2020 SiFive. All Rights Reserved.
Native Formal Verification Support
15
4/19/22
See Kevin Laeufer’s WOSET Paper https://woset-workshop.github.io/WOSET2021.html#article-3
© 2020 SiFive. All Rights Reserved.
Native Formal Verification Support
16
4/19/22
See Kevin Laeufer’s WOSET Paper https://woset-workshop.github.io/WOSET2021.html#article-3
© 2020 SiFive. All Rights Reserved.
Definition / Instance
17
4/19/22
© 2020 SiFive. All Rights Reserved.
Definition / Instance
18
4/19/22
© 2020 SiFive. All Rights Reserved.
Definition / Instance
19
4/19/22
© 2020 SiFive. All Rights Reserved.
DataView
20
4/19/22
© 2020 SiFive. All Rights Reserved.
DataView
21
4/19/22
© 2020 SiFive. All Rights Reserved.
DataView
22
4/19/22
© 2020 SiFive. All Rights Reserved.
DataView
23
4/19/22
© 2020 SiFive. All Rights Reserved.
DataView
24
4/19/22
New in 3.5.3
© 2020 SiFive. All Rights Reserved.
Realization: We need a software stack, but for hardware
25
4/19/22
libraries
language
compiler
platforms
projects
x86
ARM
RISC-V
transforms
clang
Hwacha
Rocket
BOOM
rocketchip
chisel-utils
FIRRTL
Chisel Frontend
© 2020 SiFive. All Rights Reserved.
It is a lot of work to build and maintain a software stack
26
4/19/22
libraries
language
compiler
platforms
projects
x86
ARM
RISC-V
transforms
clang
Hwacha
Rocket
BOOM
rocketchip
chisel-utils
FIRRTL
Chisel Frontend
Metadata /
Annotations
Custom
Infrastructure
© 2020 SiFive. All Rights Reserved.
It is a lot of work to build and maintain a software stack
27
4/19/22
libraries
language
compiler
platforms
projects
x86
ARM
RISC-V
transforms
clang
Hwacha
Rocket
BOOM
rocketchip
chisel-utils
FIRRTL
Chisel Frontend
Metadata /
Annotations
Shared
Infrastructure
Custom
Infrastructure
CIRCT
Multiple
Dialects
© 2020 SiFive. All Rights Reserved.
What is MLIR?
28
4/19/22
© 2020 SiFive. All Rights Reserved.
CIRCT: Circuit IR for Compilers and Tools
29
4/19/22
© 2020 SiFive. All Rights Reserved.
What does this mean for Chisel?
30
4/19/22
7.6x
1.9x
4.3x
© 2020 SiFive. All Rights Reserved.
Community
31
4/19/22
© 2020 SiFive. All Rights Reserved.
Get Involved
32
4/19/22
www.chisel-lang.org
Chat with us on Gitter
Ask questions on StackOverflow
Watch talks on YouTube
Also check out CIRCT
circt.llvm.org
© 2020 SiFive. All Rights Reserved.
Extra / Old Slides
33
4/19/22
© 2020 SiFive. All Rights Reserved.
AutoCloneType2
34
4/19/22
Before:
After:
© 2020 SiFive. All Rights Reserved.
Further Improved Website
35
4/19/22
4/19/22
35
Community page
www.chisel-lang.org
Now with a search bar!
Latest API Docs
Project-specific documentation
© 2020 SiFive. All Rights Reserved.
Further Improved Website
36
4/19/22
4/19/22
36
www.chisel-lang.org
Documentation examples are compiled and run!!!
© 2020 SiFive. All Rights Reserved.
Enhanced Signal Naming (from last time)
37
4/19/22
Old* Verilog
Chisel 3.4 Verilog
© 2020 SiFive. All Rights Reserved.
Refined Signal Naming
38
4/19/22
© 2020 SiFive. All Rights Reserved.
Improved Release Methodology
39
4/19/22
major
major
Backport
Backport
Backport
major
Backport
3.2.x
master
3.3.x
3.3.0
3.2.1
3.2.0
Automated Backporting + CI
3.2-SNAPSHOT
3.3-SNAPSHOT
3.5-SNAPSHOT
© 2020 SiFive. All Rights Reserved.