From 9b61af16227ee41aae15dbcc2243e2c6493955c4 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Fri, 31 May 2024 16:43:42 -0700 Subject: Remove sourceinfo, compileoptions and other fixes 35 erros --- core/src/main/scala/chisel3/Clock.scala | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'core/src/main/scala/chisel3/Clock.scala') diff --git a/core/src/main/scala/chisel3/Clock.scala b/core/src/main/scala/chisel3/Clock.scala index aee6bc5a..d8a1f3ae 100644 --- a/core/src/main/scala/chisel3/Clock.scala +++ b/core/src/main/scala/chisel3/Clock.scala @@ -4,7 +4,6 @@ package chisel3 import chisel3.internal.Builder.pushOp import chisel3.internal.firrtl._ -import chisel3.internal.sourceinfo._ import chisel3.internal.firrtl.PrimOp.AsUIntOp object Clock { @@ -20,10 +19,10 @@ sealed class Clock(private[chisel3] val width: Width = Width(1)) extends Element private[chisel3] def typeEquivalent(that: Data): Boolean = this.getClass == that.getClass - override def connect(that: Data)(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions): Unit = + override def connect(that: Data): Unit = that match { - case _: Clock | DontCare => super.connect(that)(sourceInfo, connectCompileOptions) - case _ => super.badConnect(that)(sourceInfo) + case _: Clock | DontCare => super.connect(that) + case _ => super.badConnect(that) } override def litOption: Option[BigInt] = None @@ -36,16 +35,13 @@ sealed class Clock(private[chisel3] val width: Width = Width(1)) extends Element "Calling this function with an empty argument list is invalid in Scala 3. Use the form without parentheses instead", "Chisel 3.5" ) - def asBool(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = this.asUInt.asBool + def asBool: Bool = this.asUInt.asBool - override def asUInt(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions): UInt = pushOp( - DefPrim(sourceInfo, UInt(this.width), AsUIntOp, ref) + override def asUInt: UInt = pushOp( + DefPrim(UInt(this.width), AsUIntOp, ref) ) private[chisel3] override def connectFromBits( that: Bits - )( - implicit sourceInfo: SourceInfo, - compileOptions: CompileOptions ): Unit = { this := that.asBool.asClock } -- cgit v1.2.3