From e40a376427536a01c69d1298b508bc645ec14d4b Mon Sep 17 00:00:00 2001 From: Tynan McAuley Date: Mon, 6 Jan 2025 10:59:33 -0800 Subject: [PATCH] Update Chisel from 5.1.0 to 6.5.0 (#10) This just involves bumping some tool versions and resolving deprecated-package warnings. --- .github/workflows/test.yml | 6 +++--- README.md | 2 +- build.sbt | 6 +++--- src/main/scala/fixedpoint/FixedPoint.scala | 1 - src/test/scala/FixedPointSpec.scala | 3 +-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76c87d8..2dfbbae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,8 +20,8 @@ env: VERILATOR_REPO: https://github.com/verilator/verilator VERILATOR_DIR: verilator VERILATOR_VERSION_TAG: v4.228 - FIRTOOL_VERSION: v1.43.0 - FIRTOOL_VERSION_TAG: firtool-1.43.0 + FIRTOOL_VERSION: v1.62.0 + FIRTOOL_VERSION_TAG: firtool-1.62.0 jobs: test: @@ -39,7 +39,7 @@ jobs: cache: 'sbt' - name: Install firtool ${{ env.FIRTOOL_VERSION }} run: | - wget -q -O - "https://github.com/llvm/circt/releases/download/${{ env.FIRTOOL_VERSION_TAG }}/firrtl-bin-ubuntu-20.04.tar.gz" | tar -zx + wget -q -O - "https://github.com/llvm/circt/releases/download/${{ env.FIRTOOL_VERSION_TAG }}/firrtl-bin-linux-x64.tar.gz" | tar -zx sudo mv "${{ env.FIRTOOL_VERSION_TAG }}/bin/firtool" /usr/local/bin - name: "Cache: Verilator ${{ env.VERILATOR_VERSION_TAG }}" uses: actions/cache@v3 diff --git a/README.md b/README.md index 08060e6..cfa8fe2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ work just as it did before. To that end, the following classes/traits have been * BinaryPoint, KnownBinaryPoint, UnknownBinaryPoint * HasBinaryPoint -Currently, this library works with [Chisel v5.1.0](https://github.com/chipsalliance/chisel/releases/v5.1.0). +Currently, this library works with [Chisel v6.5.0](https://github.com/chipsalliance/chisel/releases/v6.5.0). ## Usage diff --git a/build.sbt b/build.sbt index 50f984f..5e05446 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ -scalaVersion := "2.13.10" +scalaVersion := "2.13.14" scalacOptions += "-language:higherKinds" -addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full) +addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.3" cross CrossVersion.full) scalacOptions += "-Ydelambdafy:inline" scalacOptions ++= Seq( @@ -12,7 +12,7 @@ scalacOptions ++= Seq( "-language:reflectiveCalls", "-Ymacro-annotations" ) -val chiselVersion = "5.1.0" +val chiselVersion = "6.5.0" addCompilerPlugin("org.chipsalliance" %% "chisel-plugin" % chiselVersion cross CrossVersion.full) libraryDependencies ++= Seq( "org.chipsalliance" %% "chisel" % chiselVersion, diff --git a/src/main/scala/fixedpoint/FixedPoint.scala b/src/main/scala/fixedpoint/FixedPoint.scala index c354835..1f513d8 100644 --- a/src/main/scala/fixedpoint/FixedPoint.scala +++ b/src/main/scala/fixedpoint/FixedPoint.scala @@ -16,7 +16,6 @@ package fixedpoint import chisel3._ import chisel3.experimental.BundleLiterals.AddBundleLiteralConstructor import chisel3.experimental.OpaqueType -import chisel3.internal.firrtl.{KnownWidth, UnknownWidth, Width} import chisel3.experimental.SourceInfo import chisel3.internal.sourceinfo.{SourceInfoTransform, SourceInfoWhiteboxTransform} diff --git a/src/test/scala/FixedPointSpec.scala b/src/test/scala/FixedPointSpec.scala index 50b5ae6..1171a13 100644 --- a/src/test/scala/FixedPointSpec.scala +++ b/src/test/scala/FixedPointSpec.scala @@ -1,6 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -import chisel3.internal.firrtl.UnknownWidth import circt.stage.ChiselStage import chisel3.testers.BasicTester import chisel3.{Mux => _, _} @@ -167,7 +166,7 @@ class FixedPointUnaryFuncTester(f: FixedPoint => FixedPoint, inExpected: Seq[(Fi inExpected.foreach { case (in, expected) => val out = f(in) - assert(out === expected, f"Wrong value: in=${in}; out=${out}; expected=${expected}") + assert(out === expected, cf"Wrong value: in=${in}; out=${out}; expected=${expected}") assert(out.widthOption == in.widthOption, f"Width changed: in=${in}; out=${out}") assert(out.binaryPoint == in.binaryPoint, f"Binary point changed: in=${in}; out=${out}") }