Chisel3.3.0の確認をーーー、、、急がないと3.4.0がー!!ってやってたらChisel3.4.0がリリースされました。
Chisel3.3.0の変更点の確認は、気になったやつは前回で一応おわってて、後はリリースノート確認中に「こんな機能あったんか」案件だったため、ギリギリChisel3.4.0に間に合ったということで。。。
そんなわけで、Chisel3.4.0のリリースノートの確認をしていこうと思う。
- Chisel v3.4.0がリリースされた
- 先にざっくりまとめ
- API Modification
- (#1563) Better Building of FIRRTL From Source, Use sbt-sriracha for firrtl and treadle source deps
- (#1580) Add new annotation for Chisel Circuit serialization, --chisel-output-file is added to the ChiselCli.
- (#1476) Move LFSR16 to Compatibility Mode (Deprecated in 3.2), - Remove deprecated LFSR16 utility
- (#1550) Deprecate Module.io and BlackBox.io virtual methods (future 2.13 compatibility)
- Fixes
- Feature
- (#1448) Improved Chisel Naming via Compiler Plugins + Prefixing
- (#1499) Basic model checking API
- (#1515) Allow a counter to be instantiated using a Scala range
- (#785) Canonicalize construction of Decoupled with no payload
- (#1485) Memoize the hashcode of the ChiselCircuitAnnotation, improves performance of multi-phase generators
- (#1073) Grouping Chisel API, added a chisel annotation API for triggering the firrtl.transforms.GroupComponents transformation.
- (#1203) Add support for ScalaFix.
- (#1280) Provide an implementation of litOption() for BundleLits
- (#1405) Switch to HowToSerialize for Emission
- (#1525) update Select.get(IntermediateAnd)Leafs to work with records
- (#1527) Allow a counter to be manually reset
- (#1420) README: add link to website source. Now easier to figure out how to help enhance the content
- (#1518) Check whether signals escape their when scopes, Include and check when scoping as part of reg/mem/wire/node bindings
- (#1554) Chisel3 can use treadle to run tests (faster), only depends on Treadle dependency in tests
- (#1452) make parameters for util modules public
- (#1557) Recursively generate one-hot multiplexers for aggregates
- (#1558) Remove use of deprecated PreservesAll, cleanup dependencies, all phases are converted to be more canonical in there specification of dependencies
- (#1560) Added website docs and mdoc.
- (#1561) Move multi-clock to explanations
- (#1562) Updated PR template to include checklist and documentation updates
- (#1566) Add ChiselPhase, Stop writing files in ChiselStage$ methods, Expand ChiselStage$ helpers
- (#1570) Update README.md
- (#1571) Restore and deprecate Chisel.Driver, until we also remove underlying chisel3.Driver
- (#1572) Add chisel plugin to mill build system. This enables better, more stable naming capabilities in Chisel3
- (#1573) Add documentation of new plugin.
- (#1579) bug fix for build.sc
- (#1583) Fix load memory from file to work with binary
- (#1590) Improved speed of ChiselPlugin
- (#1595) Support using switch without importing SwitchContext
- Miscellany
- (#1439) Bump 'removed in 3.3' deprecations to 3.4
- (#1395) Update sbt-site to 1.4.0
- (#1413) Update scalacheck-1-14 to 3.1.1.1
- (#1415) Update sbt to 1.3.10
- (#1429) Update Mergify rules to backport to 3.3.x
- (#1430) Update scalatest 3.1.2
- (#1459) verilator_4_016 --> v4.016
- (#1460) Restore backporting to 3.2.x
- (#1479) Have defaultVersions specify complete ModuleIDs.
- (#1481) Remove Deprecated Usages of chisel3.Driver, CircuitForm
- (#1489) Fix Mergify Backport labeling for 3.2.x
- (#1493) Don't run FIRRTL in FlattenSpec's ChiselStage
- (#1495) Add .scala-steward.conf
- (#1504) fix treadle dependency for mill
- (#1511) Update Development Meetings Info
- (#1516) Add Treadle to CI builds
- (#1524) Update build instructions in README
- (#1530) Instance API for Importing Modules
- (#1539) Update OneHot.scala
- (#1544) Remove ChiselLegacyAnnotation It was private and unused
- (#1551) Deprecate support for Scala 2.11
- (#1553) Bump Scala to 2.12.12
Chisel v3.4.0がリリースされた
改めて、Chisel v3.4.0が10/7にリリースされました。
ということで、Chisel3.3.0のときと同様にリリースノートについて、見ていこうと思う。 初回はリリースノートをざっと見て、簡単に内容をまとめる。
先にざっくりまとめ
今回はなんと言っても"naming"と呼ばれている(っぽい)件が目玉。 "_T_xx"のような中間の信号に、Chiselのソースコード中の変数名が使われたり、不要な中間変数については生成自体が抑制されたりして、生成されるRTLの可読性がかなり上がるみたい。 以下のPRが、本件に関する機能のPR。
- (#1448) Improved Chisel Naming via Compiler Plugins + Prefixing
気になるのが、以下のPRで、io
がdeprecated扱いになったことの影響がどこまでなのかがわからない。
後は次の2つもどういう事が出来るのかがPRを読んだだけでは分からなかったので、上記の2つの後にでも追って試してみたいと思う。
- (#1499) Basic model checking API : アサーション用のAPIが増えた模様
- (#1073) Grouping Chisel API, added a chisel annotation API for triggering the firrtl.transforms.GroupComponents transformation. :
group
というメソッドが増えてるんだけど、効果がイマイチつかめなかった。
その他だとドキュメント関連で、これまで公開されていたWiki等のソースなども含んだ一式がまとめて"docs"ディレクトリの下に格納されている。とりあえずChiselのリポジトリを見れば、これらの情報にアクセス出来るのは結構ありがたい。ここには上記に書いた"naminig"についてのドキュメントとかも入っているので、後でキッチリ読んでみようと思った。
API Modification
(#1563) Better Building of FIRRTL From Source, Use sbt-sriracha for firrtl and treadle source deps
Firrtlをソースコードからビルドする際にsbt-srirachaを使って、よりクリーンな方法でビルドできるようにした、らしい。Chisel使うときに、githubのデータをそのまま使うことが無いから、いまいちピンときてない。
(#1580) Add new annotation for Chisel Circuit serialization, --chisel-output-file is added to the ChiselCli.
ChiselCircuitAnnotation
でCustomFileEmission
を継承するのではなく、Unserializable
を継承するようにした。またChiselCircuitAnnotation
とChiselOutputFileAnnotation
からなるCircuitSerializationAnnotation
を構築するフェーズAddSerializationAnnotations
を追加された。
これによって--chisel-output-file
オプション仕様時に、*.fir
と*.pb
の両方の形式のファイルを出力できるようになった。
(#1476) Move LFSR16 to Compatibility Mode (Deprecated in 3.2), - Remove deprecated LFSR16 utility
LFSR16
というユーティリティがchisel3.util
からChisel._
に移動された。
(#1550) Deprecate Module.io and BlackBox.io virtual methods (future 2.13 compatibility)
Module.io
/BlackBox.io
というメソッドがdeprecated扱いに変更された。
Fixes
(#1568) Relax plugin scalac phase order
この報告にまつわるバグの修正。プラグイン絡み??
Feature
(#1448) Improved Chisel Naming via Compiler Plugins + Prefixing
今回の目玉機能。コンパイラのプラグインとprefix
というメソッドが導入された。
コンパイラのプラグインによって、Chiselのコード中の変数名の多くが、そのままRTLの信号名として使用されるようになった。
またprefix
メソッドを使用することで、信号名に任意のプリフィックスの付与を行い、RTLの可読性を向上させることができるようになった。
PRに載っている効果は次の通りで、16000あった"anonymous wires"が1400まで減ったとのこと。
- Just auto-naming: reduced number of Chisel source locations which generated anonymous registers from 95 to 19, and anonymous wires from 19220 to 16073 (16% decrease in bad names).
- Auto-naming + prefixing of temporaries: further reduction of anonymous wires from 16073 to 10880.
- Auto-naming + auto-prefixing + added prefixing to one file (Monitor.scala) reduces 10880 -> 1395 anonymous wires.
auto-prefixingが何者かがイマイチわからない。。。けど、後半の方のPR見てるとプラグインでこれについての改善が入ってるっぽくも見えたので、それのことを指している気がする。
(#1499) Basic model checking API
chisel3.experimental.verification
というパッケージが追加されて、assert
/assume
/covert
というアサーションが使用可能に。
(#1515) Allow a counter to be instantiated using a Scala range
Counter
を作る際にScalaのrange
を使った指定が可能になった。
(#785) Canonicalize construction of Decoupled with no payload
引数を取らないDecoupled()
とDecoupled.empty
というメソッドがサポートされ、ペイロードを含まないDecoupled
が使用可能になった。
(#1485) Memoize the hashcode of the ChiselCircuitAnnotation, improves performance of multi-phase generators
ChiselCircuitAnnotation
においてhashcodeを保存しておくことで、複数のフェイズを含んだジェネレータにおけるパフォーマンスを向上させた。(特に大きい回路で効果があるみたい)
(#1073) Grouping Chisel API, added a chisel annotation API for triggering the firrtl.transforms.GroupComponents transformation.
group
というブループ化のためのメソッドが増えた、、、、っぽい?
(#1203) Add support for ScalaFix.
ScalaFixがサポートされた。
(#1280) Provide an implementation of litOption() for BundleLits
BunldeLits
用のlitOption
メソッドが実装された。
(#1405) Switch to HowToSerialize for Emission
chisel3.stage.phases.Emitter
を削除して、その機能をChiselCircuitAnnotation
に移動した。
(#1525) update Select.get(IntermediateAnd)Leafs to work with records
Select.getLeafs
/Select.getIntermediateAndLeafs
実行時にBundle
の代わりに、スーパークラスのRecord
にマッチするようにした。
(#1527) Allow a counter to be manually reset
Couneter
に任意のタイミングでリセットするための引数reset
が追加された。
(#1420) README: add link to website source. Now easier to figure out how to help enhance the content
READMEにChiselのWEBサイトのソース管理用のgithubのリンクが追加された。
(#1518) Check whether signals escape their when scopes, Include and check when scoping as part of reg/mem/wire/node bindings
Module
を跨いだり、when
ブロックを跨いだといった、許されない接続に対してエラボレート時に適切な例外(以下の2つ)を投げるようになった。
CrossWhenConnect
IllegalRefOuter
(#1554) Chisel3 can use treadle to run tests (faster), only depends on Treadle dependency in tests
test configuration時のみTreadle
が依存パッケージとして要求されるように、依存関係を変更した。
(#1452) make parameters for util modules public
chisel3.util
の下にあるユーティリティモジュール(Queue
など)のクラスパラメータをpublic
に変更した。これによって設定毎にユニークなモジュール名を割り振れるようになった。
(#1557) Recursively generate one-hot multiplexers for aggregates
Aggregate
を使ったMu1H
を再帰処理することで、より最適化された回路を生成するようにした。
(#1558) Remove use of deprecated PreservesAll, cleanup dependencies, all phases are converted to be more canonical in there specification of dependencies
PreservesAll
を削除して、依存関係を整理した。と同時に、すべてのフェーズをより標準的な実装に変更した。
(#1560) Added website docs and mdoc.
Added living documentation with repository. This will enable us to enforce better documentation of new features as part of their upstream process.
WEBサイトで公開されていたドキュメントのソースがChiselのリポジトリに格納されるようになった。
https://github.com/freechipsproject/chisel3/tree/master/docs
(#1561) Move multi-clock to explanations
"multi-clock.md"の場所を"docs/src/explanations/multi-clock.md"に移動した(&説明のコードの微修正)。
(#1562) Updated PR template to include checklist and documentation updates
PRのテンプレートにチェックリストを追加した。テンプレート、、ここにあったんだ↓。
(#1566) Add ChiselPhase, Stop writing files in ChiselStage$ methods, Expand ChiselStage$ helpers
ChiselStage
オブジェクトに新しいAPIが追加された(以下の4つ)
- emitChirrtl(gen: => RawModule): String
- emitFirrtl(gen: => RawModule): String
- emitVerilog(gen: => RawModule): String
- emitSystemVerilog(gen: => RawModule): String
これ、new
がいらなくなるから地味に嬉しい。
(new ChiselStage).emitFirrtl(new VerificationModule) // 3.3.xではこう書かないとダメだった。 ChiselStage.emitFirrtl(new VerificationModule) // 3.4.0ではオブジェクトにAPIが増えたのでこう書ける。
(#1570) Update README.md
READMEの微修正。(developer -> contributor)
(#1571) Restore and deprecate Chisel.Driver, until we also remove underlying chisel3.Driver
”Chisel 3.4.0で削除予定”だったChisel3.Driver
が延命された。(警告文に含まれていた”Chisel3.4.0で削除予定”という文言ごと消えたので、しばらくは残されるみたい)
(#1572) Add chisel plugin to mill build system. This enables better, more stable naming capabilities in Chisel3
millのビルドで必要となるChiselのプラグインが追加された。
(#1573) Add documentation of new plugin.
Chisel3.4.0の目玉の"naming"("_T_x"とかの中間変数が無くなる件)に関してのプラグインとドキュメントの追加。ドキュメントは以下のファイル。
(#1579) bug fix for build.sc
build.sc
のバグ修正
(#1583) Fix load memory from file to work with binary
loadMemoryFromFile
でBinary
を指定しても、そのまま16進文字列のファイルとして読み込まれてしまうバグを修正
(#1590) Improved speed of ChiselPlugin
キャッシュを使うようにしてChiselPlugin
の動作を高速化した。
(#1595) Support using switch without importing SwitchContext
switch
文がSwitchContext
をインポートせずに使えるようになった。これも地味に嬉しい(触り始めた頃にswitch
/is
だけインポートして動かして、エラーが出て「何もわからん、、、、」ってなったやつ)。
Miscellany
(#1439) Bump 'removed in 3.3' deprecations to 3.4
The removal of unstable methods from chisel3.core from the public API has been delayed. They will be removed with the version 3.4.0 release.
"3.3.x"で消えるよ、となっていたけど、残ってるもののバージョン指定を3.4.0に修正した。
(#1395) Update sbt-site to 1.4.0
sbt-siteのバージョンを1.4.0に変更。
(#1413) Update scalacheck-1-14 to 3.1.1.1
sbtcheck-1-14のバージョンを3.1.1.1に変更。
(#1415) Update sbt to 1.3.10
sbtのバージョンを1.3.10に変更。
(#1429) Update Mergify rules to backport to 3.3.x
Mergifyのルール指定の3.2.xを3.3.xに変更。
(#1430) Update scalatest 3.1.2
scalatestのバージョンを3.1.2に変更。
(#1459) verilator_4_016 --> v4.016
verilatorのバージョン表記を"_4_016"から"v4.016"に変更。
(#1460) Restore backporting to 3.2.x
Mergifyのルールに3.2.x/3.3.xへのバックポートの設定を追加。
(#1479) Have defaultVersions specify complete ModuleIDs.
"build.sbt"のallDependencies
に関するマッチ式を微修正。
(#1481) Remove Deprecated Usages of chisel3.Driver, CircuitForm
Chisel3単体の各種テストでdeprecated指定になった要素を使用しないように変更。
(#1489) Fix Mergify Backport labeling for 3.2.x
Mergifyのラベルの修正。
(#1493) Don't run FIRRTL in FlattenSpec's ChiselStage
FlattenSpec
でFIRRTLが実行されてないように変更。
(#1495) Add .scala-steward.conf
”.scala-steward.conf”を追加。
(#1504) fix treadle dependency for mill
millのビルドファイル中のTreadleに関する依存性のバグを修正。
(#1511) Update Development Meetings Info
README中のミーティングのスケジュールを修正。
(#1516) Add Treadle to CI builds
CIのビルドにTreadleを追加。
(#1524) Update build instructions in README
READMEのビルド手順を更新。
(#1530) Instance API for Importing Modules
内容不明(マージされずにクローズされてる&コミットは他の各PRの内容)
(#1539) Update OneHot.scala
PriorityEncoderOH
のコメントが修正された。
(#1544) Remove ChiselLegacyAnnotation It was private and unused
プライベート属性かつ内部で使用されていないアノテーションChiselLegacyAnnotation
が削除された。
(#1551) Deprecate support for Scala 2.11
Scala 2.11の使用が非推奨になった。警告文の内容的にはChisel 3.4.0がScala 2.11の最終サポートになる模様。
(#1553) Bump Scala to 2.12.12
Scalaのバージョンを2.12.12にアップデート。
ひとまず、概要編は以上。気になったやつはもう少し調べて、まとめてみようと思う。