From ea1ced34b5c9e42412cc0ac3e7431cd3194ccbc3 Mon Sep 17 00:00:00 2001 From: mergify[bot] Date: Tue, 1 Feb 2022 19:56:13 +0000 Subject: Chisel plugin bundle elements handler (#2306) (#2380) Adds generation of `Bundle.elements` method to the chores done by the compiler plugin For each `Bundle` find the relevant visible Chisel field members and construct a hard-coded list of the elements and their names implemented as `_elementsImpl` For more details: See plugins/README.md - Should be no change in API - Handles inheritance and mixins - Handles Seq[Data] - Tests in BundleElementSpec Co-authored-by: chick Co-authored-by: Jack Koenig (cherry picked from commit 237200a420581519f29149cbae9b3e968c0d01fc) Co-authored-by: Chick Markley --- build.sc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build.sc') diff --git a/build.sc b/build.sc index 1e665a9f..d7dbc6d7 100644 --- a/build.sc +++ b/build.sc @@ -107,6 +107,10 @@ class chisel3CrossModule(val crossScalaVersion: String) extends CommonModule wit object test extends Tests { override def scalacPluginClasspath = m.scalacPluginClasspath + override def scalacOptions = T { + super.scalacOptions() ++ Agg("-P:chiselplugin:genBundleElements") + } + override def ivyDeps = m.ivyDeps() ++ Agg( ivy"org.scalatest::scalatest:3.2.10", ivy"org.scalatestplus::scalacheck-1-14:3.2.2.0", -- cgit v1.2.3