From 445b5cecb267adcd556627ffea2486b20740d6d4 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Mon, 1 Feb 2021 12:44:24 -0800 Subject: Bump to Scala 2.12.13 (#1766) --- build.sbt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 5030c016..2400233a 100644 --- a/build.sbt +++ b/build.sbt @@ -15,8 +15,8 @@ lazy val commonSettings = Seq ( organization := "edu.berkeley.cs", version := "3.5-SNAPSHOT", autoAPIMappings := true, - scalaVersion := "2.12.12", - crossScalaVersions := Seq("2.12.12"), + scalaVersion := "2.12.13", + crossScalaVersions := Seq("2.12.13"), scalacOptions := Seq("-deprecation", "-feature", ), libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, @@ -92,6 +92,7 @@ lazy val pluginScalaVersions = Seq( "2.12.10", "2.12.11", "2.12.12", + "2.12.13", ) lazy val plugin = (project in file("plugin")). -- cgit v1.2.3 From e3b6cf4e7230ce12174832fca48d1384553b02f6 Mon Sep 17 00:00:00 2001 From: John's Brew Date: Fri, 5 Feb 2021 19:38:44 +0100 Subject: Add file line to source link from scaladoc (#1776) Signed-off-by: Jean Bruant --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 2400233a..fc19d2ad 100644 --- a/build.sbt +++ b/build.sbt @@ -196,7 +196,7 @@ lazy val chisel = (project in file(".")). } else { s"v${version.value}" } - s"https://github.com/freechipsproject/chisel3/tree/$branch/€{FILE_PATH}.scala" + s"https://github.com/chipsalliance/chisel3/tree/$branch€{FILE_PATH_EXT}#L€{FILE_LINE}" } ) ) -- cgit v1.2.3 From 53b620478ddab1faa96512e473fa198f7f1fcf50 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Tue, 9 Feb 2021 17:12:37 -0800 Subject: Add no-plugin-tests for testing Chisel without the compiler plugin This is a new SBT build unit that symlinks in some files from the normal chisel project tests, but builds them without the compiler plugin. --- build.sbt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index fc19d2ad..5c051ff5 100644 --- a/build.sbt +++ b/build.sbt @@ -201,6 +201,11 @@ lazy val chisel = (project in file(".")). ) ) +lazy val noPluginTests = (project in file ("no-plugin-tests")). + dependsOn(chisel). + settings(commonSettings: _*). + settings(chiselSettings: _*) + lazy val docs = project // new documentation project .in(file("docs-target")) // important: it must not be docs/ .dependsOn(chisel) -- cgit v1.2.3 From 3bea6167159737b379f37031c3beef27337be06d Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Fri, 12 Mar 2021 15:33:58 -0800 Subject: [plugin] Disable BundleComponent by default, add option to enable --- build.sbt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 5c051ff5..42fcece3 100644 --- a/build.sbt +++ b/build.sbt @@ -179,6 +179,8 @@ lazy val chisel = (project in file(".")). mimaPreviousArtifacts := Set(), libraryDependencies += defaultVersions("treadle") % "test", scalacOptions in Test ++= Seq("-language:reflectiveCalls"), + // Only used in Test for 3.4.x, used in Compile in 3.5 + scalacOptions in Test += "-P:chiselplugin:useBundlePlugin", scalacOptions in Compile in doc ++= Seq( "-diagrams", "-groups", -- cgit v1.2.3 From 26461d500f402310cb3adf914b636be3a3a8e442 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Tue, 23 Mar 2021 14:54:57 -0700 Subject: Make plugin autoclonetype always on (#1826) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- build.sbt | 2 -- 1 file changed, 2 deletions(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 42fcece3..5c051ff5 100644 --- a/build.sbt +++ b/build.sbt @@ -179,8 +179,6 @@ lazy val chisel = (project in file(".")). mimaPreviousArtifacts := Set(), libraryDependencies += defaultVersions("treadle") % "test", scalacOptions in Test ++= Seq("-language:reflectiveCalls"), - // Only used in Test for 3.4.x, used in Compile in 3.5 - scalacOptions in Test += "-P:chiselplugin:useBundlePlugin", scalacOptions in Compile in doc ++= Seq( "-diagrams", "-groups", -- cgit v1.2.3 From 8be86e461b9d9a6198c8153b3badda568af8be61 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 29 Apr 2021 06:59:24 +0200 Subject: Update scopt to 4.0.1 (#1815) Co-authored-by: Jiuyang Liu Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 5c051ff5..a9e18216 100644 --- a/build.sbt +++ b/build.sbt @@ -61,7 +61,7 @@ lazy val chiselSettings = Seq ( libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.1.2" % "test", "org.scalatestplus" %% "scalacheck-1-14" % "3.1.1.1" % "test", - "com.github.scopt" %% "scopt" % "3.7.1" + "com.github.scopt" %% "scopt" % "4.0.1" ), ) ++ ( // Tests from other projects may still run concurrently -- cgit v1.2.3 From c5861176887bfa529277e686df09a42aeceb6cd7 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Thu, 29 Apr 2021 16:18:06 -0700 Subject: Scala 2.13 support (#1751) --- build.sbt | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index a9e18216..60b83a3e 100644 --- a/build.sbt +++ b/build.sbt @@ -15,12 +15,23 @@ lazy val commonSettings = Seq ( organization := "edu.berkeley.cs", version := "3.5-SNAPSHOT", autoAPIMappings := true, - scalaVersion := "2.12.13", - crossScalaVersions := Seq("2.12.13"), - scalacOptions := Seq("-deprecation", "-feature", - ), + scalaVersion := "2.13.5", + crossScalaVersions := Seq("2.13.5", "2.12.13"), + scalacOptions := Seq("-deprecation", "-feature"), libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, - addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full), + // Macros paradise is integrated into 2.13 but requires a scalacOption + scalacOptions ++= { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, n)) if n >= 13 => "-Ymacro-annotations" :: Nil + case _ => Nil + } + }, + libraryDependencies ++= { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, n)) if n >= 13 => Nil + case _ => compilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full) :: Nil + } + } ) lazy val publishSettings = Seq ( @@ -93,6 +104,12 @@ lazy val pluginScalaVersions = Seq( "2.12.11", "2.12.12", "2.12.13", + "2.13.0", + "2.13.1", + "2.13.2", + "2.13.3", + "2.13.4", + "2.13.5" ) lazy val plugin = (project in file("plugin")). @@ -108,9 +125,7 @@ lazy val plugin = (project in file("plugin")). crossTarget := { // workaround for https://github.com/sbt/sbt/issues/5097 target.value / s"scala-${scalaVersion.value}" - }, - // Only publish for Scala 2.12 - publish / skip := !scalaVersion.value.startsWith("2.12") + } ). settings( mimaPreviousArtifacts := { -- cgit v1.2.3 From 987e58f83996241aca6aa5f87395481184950436 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 11 May 2021 08:57:50 +0200 Subject: Update scalacheck-1-14, ... to 3.1.4.0 (#1575) * Update scalacheck-1-14, ... to 3.1.4.0 * Update scalacheck-1-14, ... to 3.1.4.0 * Update scalacheck-1-14 to 3.1.4.0 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 60b83a3e..ed3a4354 100644 --- a/build.sbt +++ b/build.sbt @@ -71,7 +71,7 @@ lazy val chiselSettings = Seq ( libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.1.2" % "test", - "org.scalatestplus" %% "scalacheck-1-14" % "3.1.1.1" % "test", + "org.scalatestplus" %% "scalacheck-1-14" % "3.1.4.0" % "test", "com.github.scopt" %% "scopt" % "4.0.1" ), ) ++ ( -- cgit v1.2.3 From 46b522df7a9162b073a1fe8453cdce891d86b802 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 12 May 2021 11:40:20 +0200 Subject: Update scalacheck-1-14 to 3.2.2.0 (#1908) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index ed3a4354..b6971b8f 100644 --- a/build.sbt +++ b/build.sbt @@ -71,7 +71,7 @@ lazy val chiselSettings = Seq ( libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.1.2" % "test", - "org.scalatestplus" %% "scalacheck-1-14" % "3.1.4.0" % "test", + "org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % "test", "com.github.scopt" %% "scopt" % "4.0.1" ), ) ++ ( -- cgit v1.2.3 From 5c35e17b142cd76f3ff333eb0edf05c2e8f79cfd Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 17 May 2021 17:37:32 +0200 Subject: Update scala-compiler, scala-library, ... to 2.13.6 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index b6971b8f..d7b68ed9 100644 --- a/build.sbt +++ b/build.sbt @@ -15,8 +15,8 @@ lazy val commonSettings = Seq ( organization := "edu.berkeley.cs", version := "3.5-SNAPSHOT", autoAPIMappings := true, - scalaVersion := "2.13.5", - crossScalaVersions := Seq("2.13.5", "2.12.13"), + scalaVersion := "2.13.6", + crossScalaVersions := Seq("2.13.6", "2.12.13"), scalacOptions := Seq("-deprecation", "-feature"), libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, // Macros paradise is integrated into 2.13 but requires a scalacOption -- cgit v1.2.3 From 761447a2d88563e2b6c0a5a538abd4a2ebf70620 Mon Sep 17 00:00:00 2001 From: Jiuyang Liu Date: Mon, 17 May 2021 18:52:30 +0000 Subject: remove scopt dependency. (#1917) --- build.sbt | 1 - 1 file changed, 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index d7b68ed9..7e9c55e6 100644 --- a/build.sbt +++ b/build.sbt @@ -72,7 +72,6 @@ lazy val chiselSettings = Seq ( libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.1.2" % "test", "org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % "test", - "com.github.scopt" %% "scopt" % "4.0.1" ), ) ++ ( // Tests from other projects may still run concurrently -- cgit v1.2.3 From 8c9007365d038d23b94bb4d1a6a7f20448f951eb Mon Sep 17 00:00:00 2001 From: Jiuyang Liu Date: Thu, 20 May 2021 03:09:24 +0000 Subject: implement model checking API for chiseltest (#1910) * add os-lib to dependency. * implement EndToEndSMTBaseSpec * rename to SMTModelCheckingSpec * add documentation. * fix for review.--- build.sbt | 1 + 1 file changed, 1 insertion(+) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 7e9c55e6..d15fc740 100644 --- a/build.sbt +++ b/build.sbt @@ -72,6 +72,7 @@ lazy val chiselSettings = Seq ( libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.1.2" % "test", "org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % "test", + "com.lihaoyi" %% "os-lib" % "0.7.7", ), ) ++ ( // Tests from other projects may still run concurrently -- cgit v1.2.3 From 682c73d0021c07c62aa4daf6548088e136490204 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 4 Jun 2021 13:58:20 +0200 Subject: Update os-lib to 0.7.8 (#1949) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index d15fc740..2da958bc 100644 --- a/build.sbt +++ b/build.sbt @@ -72,7 +72,7 @@ lazy val chiselSettings = Seq ( libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.1.2" % "test", "org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % "test", - "com.lihaoyi" %% "os-lib" % "0.7.7", + "com.lihaoyi" %% "os-lib" % "0.7.8", ), ) ++ ( // Tests from other projects may still run concurrently -- cgit v1.2.3 From 942218432a80de1546ed53a4cfb10a8683ff4f27 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Mon, 21 Jun 2021 16:58:15 -0700 Subject: Bump scalatest to 3.2.9 (#1965) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 2da958bc..cc4dee41 100644 --- a/build.sbt +++ b/build.sbt @@ -70,7 +70,7 @@ lazy val chiselSettings = Seq ( name := "chisel3", libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % "3.1.2" % "test", + "org.scalatest" %% "scalatest" % "3.2.9" % "test", "org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % "test", "com.lihaoyi" %% "os-lib" % "0.7.8", ), -- cgit v1.2.3 From 0d4bfbccd8b31230d16d3039429df7358970bf99 Mon Sep 17 00:00:00 2001 From: Jiuyang Liu Date: Sun, 11 Jul 2021 01:59:41 +0800 Subject: fix for GitHub Action missing ivy FIRRTL. --- build.sbt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index cc4dee41..1a47d7c1 100644 --- a/build.sbt +++ b/build.sbt @@ -219,7 +219,11 @@ lazy val chisel = (project in file(".")). lazy val noPluginTests = (project in file ("no-plugin-tests")). dependsOn(chisel). settings(commonSettings: _*). - settings(chiselSettings: _*) + settings(chiselSettings: _*). + settings(Seq( + // Totally don't know why GitHub Action won't introduce FIRRTL to dependency. + libraryDependencies += defaultVersions("firrtl"), + )) lazy val docs = project // new documentation project .in(file("docs-target")) // important: it must not be docs/ -- cgit v1.2.3 From 1ceb974c55c6785c21ab3934fa750ade0702e276 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Thu, 12 Aug 2021 17:04:11 -0700 Subject: Add DataView (#1955) DataView is a mechanism for "viewing" Scala objects as a subtype of `Data`. Often, this is useful for viewing one subtype of `Data`, as another. One can think about a DataView as a cross between a customizable cast and an untagged union. A DataView has a Target type `T`, and a View type `V`. DataView requires that an implementation of `DataProduct` is available for Target types. DataProduct is a type class that provides a way to iterate on `Data` children of objects of implementing types. If a DataView is provided for a type T to a type V, then the function .viewAs[V] (of type T => V) is available. The object (of type T) returned by .viewAs is called a "View" and can be used as both an rvalue and an lvalue. Unlike when using an .asTypeOf cast, connecting to a "View" will connect to the associated field or fields of the underlying Target. DataView also enables .viewAsSupertype which is available for viewing Bundles as a parent Bundle type. It is similar to .viewAs but requires a prototype object of the Target type which will be cloned in order to create the returned View. .viewAsSupertype maps between the corresponding fields of the parent and child Bundle types.--- build.sbt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 1a47d7c1..5d7fad2d 100644 --- a/build.sbt +++ b/build.sbt @@ -235,7 +235,8 @@ lazy val docs = project // new documentation project scalacOptions += "-language:reflectiveCalls", mdocIn := file("docs/src"), mdocOut := file("docs/generated"), - mdocExtraArguments := Seq("--cwd", "docs"), + // None of our links are hygienic because they're primarily used on the website with .html + mdocExtraArguments := Seq("--cwd", "docs", "--no-link-hygiene"), mdocVariables := Map( "BUILD_DIR" -> "docs-target" // build dir for mdoc programs to dump temp files ) -- cgit v1.2.3 From 3840fec3d918f23df07a18311136ac6a1bc365e1 Mon Sep 17 00:00:00 2001 From: Kevin Laeufer Date: Wed, 25 Aug 2021 12:38:56 -0700 Subject: replace custom model checker with chiseltest formal verify command (#2075) * replace custom model checker with chiseltest formal verify command * integration-tests can make use of chiseltest This is a compromise solution to avoid issues with binary compatibility breaking changes in chisel3. * ci: move integration tests into separate job * run integration tests only for one scala version * ci: install espresso for integration tests * Update build.sbt Co-authored-by: Jack Koenig Co-authored-by: Jack Koenig --- build.sbt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 5d7fad2d..54bf87f0 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,8 @@ enablePlugins(SiteScaladocPlugin) val defaultVersions = Map( "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.5-SNAPSHOT", - "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.5-SNAPSHOT" + "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.5-SNAPSHOT", + "chiseltest" -> "edu.berkeley.cs" %% "chiseltest" % "0.5-SNAPSHOT", ) lazy val commonSettings = Seq ( @@ -225,6 +226,16 @@ lazy val noPluginTests = (project in file ("no-plugin-tests")). libraryDependencies += defaultVersions("firrtl"), )) +// tests elaborating and executing/formally verifying a Chisel circuit with chiseltest +lazy val integrationTests = (project in file ("integration-tests")). + dependsOn(chisel). + settings(commonSettings: _*). + settings(chiselSettings: _*). + settings(usePluginSettings: _*). + settings(Seq( + libraryDependencies += defaultVersions("chiseltest") % "test", + )) + lazy val docs = project // new documentation project .in(file("docs-target")) // important: it must not be docs/ .dependsOn(chisel) -- cgit v1.2.3 From c66f0ed24366f8ce0e20a5a420589b8ae01aba77 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 14 Sep 2021 00:50:37 +0200 Subject: Update scala-compiler, scala-library, ... to 2.12.14 (#1950) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 54bf87f0..4084eecd 100644 --- a/build.sbt +++ b/build.sbt @@ -17,7 +17,7 @@ lazy val commonSettings = Seq ( version := "3.5-SNAPSHOT", autoAPIMappings := true, scalaVersion := "2.13.6", - crossScalaVersions := Seq("2.13.6", "2.12.13"), + crossScalaVersions := Seq("2.13.6", "2.12.14"), scalacOptions := Seq("-deprecation", "-feature"), libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, // Macros paradise is integrated into 2.13 but requires a scalacOption -- cgit v1.2.3 From 958904cb2f2f65d02b2ab3ec6d9ec2e06d04e482 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Fri, 17 Sep 2021 13:15:34 -0700 Subject: Update Scala and publish plugin for more minor versions (#2130) --- build.sbt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 4084eecd..ec4cda13 100644 --- a/build.sbt +++ b/build.sbt @@ -17,7 +17,7 @@ lazy val commonSettings = Seq ( version := "3.5-SNAPSHOT", autoAPIMappings := true, scalaVersion := "2.13.6", - crossScalaVersions := Seq("2.13.6", "2.12.14"), + crossScalaVersions := Seq("2.13.6", "2.12.15"), scalacOptions := Seq("-deprecation", "-feature"), libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, // Macros paradise is integrated into 2.13 but requires a scalacOption @@ -105,12 +105,15 @@ lazy val pluginScalaVersions = Seq( "2.12.11", "2.12.12", "2.12.13", + "2.12.14", + "2.12.15", "2.13.0", "2.13.1", "2.13.2", "2.13.3", "2.13.4", - "2.13.5" + "2.13.5", + "2.13.6" ) lazy val plugin = (project in file("plugin")). -- cgit v1.2.3