Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
Address chisel3 changes to DataMirror, AutoCloneType and new deprecat…
Browse files Browse the repository at this point in the history
…ion warnings (#619)
  • Loading branch information
ekiwi authored Feb 14, 2023
1 parent cc7ba49 commit fed4822
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ scalacOptions ++= Seq(
"-Xcheckinit",
// do not warn about firrtl imports, once the firrtl repo is removed, we will need to import the code
"-Wconf:cat=deprecation&msg=Importing from firrtl is deprecated:s",
// do not warn about firrtl deprecations
"-Wconf:cat=deprecation&msg=will not be supported as part of the migration to the MLIR-based FIRRTL Compiler:s",
// TODO: remove FixedPoint support after 3.6 release
"-Wconf:cat=deprecation&msg=class FixedPoint:s",
"-Wconf:cat=deprecation&msg=class BinaryPoint:s",
"-Wconf:cat=deprecation&msg=object FixedPoint:s",
"-Wconf:cat=deprecation&msg=class fromDoubleToLiteral:s",
"-Wconf:cat=deprecation&msg=class fromBigDecimalToLiteral:s",
"-Wconf:cat=deprecation&msg=trait HasBinaryPoint:s",
"-Wconf:cat=deprecation&msg=object UnknownBinaryPoint:s",
// TODO: remove Interval support after 3.6 release
"-Wconf:cat=deprecation&msg=class Interval:s",
"-Wconf:cat=deprecation&msg=object Interval:s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ package chiseltest.experimental
import chiseltest.UnpokeableException
import chiseltest.internal.Context
import chisel3._
import chisel3.experimental.{DataMirror, Direction}
import chisel3.reflect._
import chisel3.experimental.Direction

package object UncheckedClockPoke {

Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/chiseltest/internal/BackendExecutive.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

package chiseltest.internal

import chisel3.experimental.{BaseModule, DataMirror}
import chisel3.experimental.BaseModule
import chisel3.reflect.DataMirror
import chisel3.{Data, Element, Module, Record, Vec}
import chiseltest.coverage.Coverage
import chiseltest.simulator.{Compiler, DebugPrintWrapper, Simulator}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package chiseltest.internal

import chisel3._
import chisel3.experimental.DataMirror
import chisel3.reflect.DataMirror
import chiseltest.defaults
import chiseltest.iotesters.PeekPokeTester
import chiseltest.simulator.SimulatorContext
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/chiseltest/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import scala.language.implicitConversions
import chiseltest.internal._
import chisel3._
import chisel3.experimental.{DataMirror, Direction, FixedPoint, Interval}
import chisel3.experimental.{Direction, FixedPoint, Interval}
import chisel3.reflect.DataMirror
import chisel3.experimental.BundleLiterals._
import chisel3.experimental.VecLiterals._
import chisel3.internal.firrtl.KnownBinaryPoint
Expand Down
4 changes: 1 addition & 3 deletions src/test/scala/chiseltest/tests/TestUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
package chiseltest.tests

import chisel3._
import chisel3.experimental.{AutoCloneType, DataMirror}
import chisel3.internal.requireIsChiselType
import chisel3.util._

import scala.collection.immutable.ListMap
Expand Down Expand Up @@ -43,7 +41,7 @@ class QueueModule[T <: Data](ioType: T, entries: Int) extends Module {
}

/** borrowed from chiselTests/RecordSpec.scala */
final class CustomBundle(elts: (String, Data)*) extends Record with AutoCloneType {
final class CustomBundle(elts: (String, Data)*) extends Record {
val elements = ListMap(elts.map { case (field, elt) => field -> elt.cloneType }: _*)
def apply(elt: String): Data = elements(elt)
}
Expand Down

0 comments on commit fed4822

Please sign in to comment.