summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Naik2024-06-04 01:31:21 -0700
committerAditya Naik2024-06-04 01:31:21 -0700
commit9a9b2c10eacf10952faea0ec18e76e20d101f813 (patch)
treeab78768c9622f998d4d6208903ee91f8f000e043
parent52824ce57e9d60fe6ef721cfb073249e654dcf46 (diff)
This shold compile if not for the strange bug...
-rw-r--r--build.sbt2
-rw-r--r--core/src/main/scala/chisel3/Aggregate.scala15
-rw-r--r--core/src/main/scala/chisel3/Bits.scala12
-rw-r--r--core/src/main/scala/chisel3/experimental/package.scala10
-rw-r--r--src/main/scala/chisel3/util/pla.scala4
5 files changed, 11 insertions, 32 deletions
diff --git a/build.sbt b/build.sbt
index f457c495..c87b03f1 100644
--- a/build.sbt
+++ b/build.sbt
@@ -4,7 +4,7 @@ import com.typesafe.tools.mima.core._
Compile / compile / logLevel := Level.Error
-val scala3Version = "3.4.1"
+val scala3Version = "3.4.2"
lazy val commonSettings = Seq (
organization := "edu.berkeley.cs",
diff --git a/core/src/main/scala/chisel3/Aggregate.scala b/core/src/main/scala/chisel3/Aggregate.scala
index fc9972aa..ab7fe53f 100644
--- a/core/src/main/scala/chisel3/Aggregate.scala
+++ b/core/src/main/scala/chisel3/Aggregate.scala
@@ -1072,13 +1072,7 @@ package experimental {
* }
* }}}
*/
-abstract class Bundle extends Record with experimental.AutoCloneType {
- assert(
- _usingPlugin,
- "The Chisel compiler plugin is now required for compiling Chisel code. " +
- "Please see https://github.com/chipsalliance/chisel3#build-your-own-chisel-projects."
- )
-
+abstract class Bundle extends Record {
override def className: String = try {
this.getClass.getSimpleName match {
case name if name.startsWith("$anon$") => "AnonymousBundle" // fallback for anonymous Bundle case
@@ -1217,13 +1211,6 @@ abstract class Bundle extends Record with experimental.AutoCloneType {
case _ => None
}
- /** Indicates if a concrete Bundle class was compiled using the compiler plugin
- *
- * Used for optimizing Chisel's performance and testing Chisel itself
- * @note This should not be used in user code!
- */
- protected def _usingPlugin: Boolean = false
-
private def checkClone(clone: Bundle): Unit = {
for ((name, field) <- elements) {
if (clone.elements(name) eq field) {
diff --git a/core/src/main/scala/chisel3/Bits.scala b/core/src/main/scala/chisel3/Bits.scala
index c1c4c388..927b1c19 100644
--- a/core/src/main/scala/chisel3/Bits.scala
+++ b/core/src/main/scala/chisel3/Bits.scala
@@ -216,7 +216,7 @@ sealed abstract class Bits(private[chisel3] val width: Width) extends Element wi
* @return this $coll with each bit inverted
* @group Bitwise
*/
- def unary_~(): Bits
+ def unary_~ : Bits
/** Static left shift operator
*
@@ -368,10 +368,10 @@ sealed class UInt private[chisel3] (width: Width) extends Bits(width) with Num[U
* @group Arithmetic
*/
- def unary_-(): UInt = 0.U - this
+ def unary_- : UInt = 0.U - this
- def unary_-%(): UInt = 0.U -% this
+ def unary_-% : UInt = 0.U -% this
override def +(that: UInt): UInt = this +% that
override def -(that: UInt): UInt = this -% that
@@ -471,7 +471,7 @@ sealed class UInt private[chisel3] (width: Width) extends Bits(width) with Num[U
def ^(that: UInt): UInt =
binop(UInt(this.width.max(that.width)), BitXorOp, that)
- def unary_~(): UInt =
+ def unary_~ : UInt =
unop(UInt(width = width), BitNotOp)
// REVIEW TODO: Can these be defined on Bits?
@@ -807,7 +807,7 @@ sealed class SInt private[chisel3] (width: Width) extends Bits(width) with Num[S
def ^(that: SInt): SInt =
binop(UInt(this.width.max(that.width)), BitXorOp, that).asSInt
- def unary_~(): SInt =
+ def unary_~ : SInt =
unop(UInt(width = width), BitNotOp).asSInt
override def <(that: SInt): Bool =
@@ -1037,7 +1037,7 @@ sealed class Bool() extends UInt(1.W) with Reset {
def ^(that: Bool): Bool =
binop(Bool(), BitXorOp, that)
- override def unary_~(): Bool =
+ override def unary_~ : Bool =
unop(Bool(), BitNotOp)
/** Logical or operator
diff --git a/core/src/main/scala/chisel3/experimental/package.scala b/core/src/main/scala/chisel3/experimental/package.scala
index 80c3e28a..6dc14afb 100644
--- a/core/src/main/scala/chisel3/experimental/package.scala
+++ b/core/src/main/scala/chisel3/experimental/package.scala
@@ -198,7 +198,6 @@ package object experimental {
*/
final class HWTuple2[+A <: Data, +B <: Data] private[chisel3] (val _1: A, val _2: B) extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
override protected def _cloneTypeImpl: Bundle = new HWTuple2(chiselTypeClone(_1), chiselTypeClone(_2))
}
@@ -213,7 +212,6 @@ package object experimental {
val _3: C)
extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
override protected def _cloneTypeImpl: Bundle = new HWTuple3(
chiselTypeClone(_1),
chiselTypeClone(_2),
@@ -233,7 +231,6 @@ package object experimental {
val _4: D)
extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
override protected def _cloneTypeImpl: Bundle = new HWTuple4(
chiselTypeClone(_1),
chiselTypeClone(_2),
@@ -255,7 +252,6 @@ package object experimental {
val _5: E)
extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
override protected def _cloneTypeImpl: Bundle = new HWTuple5(
chiselTypeClone(_1),
chiselTypeClone(_2),
@@ -279,7 +275,7 @@ package object experimental {
val _6: F)
extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
+
override protected def _cloneTypeImpl: Bundle = new HWTuple6(
chiselTypeClone(_1),
chiselTypeClone(_2),
@@ -313,7 +309,6 @@ package object experimental {
val _7: G)
extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
override protected def _cloneTypeImpl: Bundle = new HWTuple7(
chiselTypeClone(_1),
chiselTypeClone(_2),
@@ -350,7 +345,6 @@ package object experimental {
val _8: H)
extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
override protected def _cloneTypeImpl: Bundle = new HWTuple8(
chiselTypeClone(_1),
chiselTypeClone(_2),
@@ -390,7 +384,6 @@ package object experimental {
val _9: I)
extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
override protected def _cloneTypeImpl: Bundle = new HWTuple9(
chiselTypeClone(_1),
chiselTypeClone(_2),
@@ -433,7 +426,6 @@ package object experimental {
val _10: J)
extends Bundle() {
// Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually
- override protected def _usingPlugin: Boolean = true
override protected def _cloneTypeImpl: Bundle = new HWTuple10(
chiselTypeClone(_1),
chiselTypeClone(_2),
diff --git a/src/main/scala/chisel3/util/pla.scala b/src/main/scala/chisel3/util/pla.scala
index d4707d26..0a7067f5 100644
--- a/src/main/scala/chisel3/util/pla.scala
+++ b/src/main/scala/chisel3/util/pla.scala
@@ -95,7 +95,7 @@ object pla {
}
}
.flatten
- if (andMatrixInput.nonEmpty) t.toString -> Cat(andMatrixInput).andR() else t.toString -> true.B
+ if (andMatrixInput.nonEmpty) t.toString -> Cat(andMatrixInput).andR else t.toString -> true.B
}.toMap
// the OR matrix
@@ -111,7 +111,7 @@ object pla {
andMatrixOutputs(inputTerm.toString)
}
if (andMatrixLines.isEmpty) false.B
- else Cat(andMatrixLines).orR()
+ else Cat(andMatrixLines).orR
}
.reverse
)