1 What is Chisel?
Chisel(Constructing Hardware In a Scala Embedded Language)是一種嵌入在高級編程語言Scala的硬件構建語言。 Chisel是由伯克利大學發布的一種開源硬件構建語言,建立在Scala語言之上,是Scala特定領域語言的一個應用,具有高度參數化的生成器(highly parameterized generators),可以支持高級硬件設計。 Chisel實際上只是一些特殊的類定義,預定義對象的集合,使用Scala的用法,所以在寫Chisel程序時實際上是在寫Scala程序。 其特點如下:
- Hardware construction language (not C to Gates):硬件構建語言
- Embedded in the Scala programming language:內嵌於Scale程序設計語言
- Algebraic construction and wiring
- Abstract data types and interfaces:抽象的數據類型和接口
- Bulk connections:端口的批量連接
- Hierarchical + object oriented + functional construction:分層+面向對象+函數構建
- Highly parameterizable using metaprogramming in Scala:通過使用Scala的元編程實現高度的參數化
- Supports layering of domain specific languages
- Sizeable standard library including floating-point units:具有包含浮點單元在內的、可以調整大小的標准庫
- Multiple clock domains:支持多時鍾域
- Generates high-speed C++-based cycle-accurate software simulator:能夠產生高速的、基於C++的周期精確軟件模擬器
- Generates low-level Verilog designed to pass on to standard ASIC or FPGA tools:能夠產生Verilog設計,從而在標准的ASIC、FPGA工具中使用
- Open source on github with modified BSD license:在github上開源,使用的是改進的BSD協議
2 我了解到Chisel語言是因為RISC-V是用 Chisel實現的,其基本的流程是Chisel會生成Verilog 綜合代碼和C/C++的模型代碼。這點是不是和HLS將C/C++ 代碼生成Verilog代碼相似。Verilog到現在都已經30多年了,這么古老的語言,感覺對目前越來越大規模的芯片的開發效率會不會有點低,也許乘着人工智能浪潮這波浪潮,Chisel成為ASIC的主流開發語言或可知否。
參考文獻:
1 硅農的一把新鑿子:Chisel .
http://www.misclogic.com/html/2017-05-07-chisel-vs-verilog.htm
2 Chisel入門教程.
http://chuquan.me/2016/12/17/chisel-tutorial/
3 Scala.
https://zh.wikipedia.org/wiki/Scala
4 Chisel.
https://chisel.eecs.berkeley.edu/#getstarted(官網)
5 唐衫. 基於RISC-V做定制處理器.
https://zhuanlan.zhihu.com/p/26969770.
6 唐衫. AI會給芯片設計帶來什么?
http://www.jintiankansha.me/t/6nJLvh1EKD
7 專用處理器是新希望,計算機架構宗師 Patterson 與 Hennessy 最新演講實.
http://www.voidcn.com/article/p-fsfmraso-yc.html