summaryrefslogtreecommitdiff
path: root/core/src/main/scala/chisel3/internal
diff options
context:
space:
mode:
authorAlbert Magyar2020-07-20 12:11:44 -0700
committerAlbert Magyar2020-07-21 13:06:53 -0700
commit7e9f424fb7dcd11c894ceb9f6f049fd9eda80632 (patch)
tree1fa15e357d0af7b82316fa2ee659e2e98118488c /core/src/main/scala/chisel3/internal
parent4a0e828cfe76e0d3bd6c4a0cc593589fe74ed0ba (diff)
Delete outdated scalastyle configuration comments from source
Diffstat (limited to 'core/src/main/scala/chisel3/internal')
-rw-r--r--core/src/main/scala/chisel3/internal/BiConnect.scala6
-rw-r--r--core/src/main/scala/chisel3/internal/Builder.scala7
-rw-r--r--core/src/main/scala/chisel3/internal/Error.scala6
-rw-r--r--core/src/main/scala/chisel3/internal/MonoConnect.scala8
-rw-r--r--core/src/main/scala/chisel3/internal/firrtl/Converter.scala12
-rw-r--r--core/src/main/scala/chisel3/internal/firrtl/IR.scala6
6 files changed, 15 insertions, 30 deletions
diff --git a/core/src/main/scala/chisel3/internal/BiConnect.scala b/core/src/main/scala/chisel3/internal/BiConnect.scala
index 6b4c1070..8cc4bbaf 100644
--- a/core/src/main/scala/chisel3/internal/BiConnect.scala
+++ b/core/src/main/scala/chisel3/internal/BiConnect.scala
@@ -24,7 +24,6 @@ import chisel3.internal.sourceinfo._
*/
private[chisel3] object BiConnect {
- // scalastyle:off method.name public.methods.have.type
// These are all the possible exceptions that can be thrown.
// These are from element-level connection
def BothDriversException =
@@ -48,7 +47,6 @@ private[chisel3] object BiConnect {
BiConnectException(sourceInfo.makeMessage(": Analog previously bulk connected at " + _))
def DontCareCantBeSink =
BiConnectException(": DontCare cannot be a connection sink (LHS)")
- // scalastyle:on method.name public.methods.have.type
/** This function is what recursively tries to connect a left and right together
*
@@ -56,7 +54,7 @@ private[chisel3] object BiConnect {
* during the recursive decent and then rethrow them with extra information added.
* This gives the user a 'path' to where in the connections things went wrong.
*/
- def connect(sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, left: Data, right: Data, context_mod: RawModule): Unit = { // scalastyle:ignore line.size.limit cyclomatic.complexity method.length
+ def connect(sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, left: Data, right: Data, context_mod: RawModule): Unit = {
(left, right) match {
// Handle element case (root case)
case (left_a: Analog, right_a: Analog) =>
@@ -217,7 +215,7 @@ private[chisel3] object BiConnect {
// This function checks if element-level connection operation allowed.
// Then it either issues it or throws the appropriate exception.
- def elemConnect(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, left: Element, right: Element, context_mod: RawModule): Unit = { // scalastyle:ignore line.size.limit cyclomatic.complexity method.length
+ def elemConnect(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, left: Element, right: Element, context_mod: RawModule): Unit = {
import BindingDirection.{Internal, Input, Output} // Using extensively so import these
// If left or right have no location, assume in context module
// This can occur if one of them is a literal, unbound will error previously
diff --git a/core/src/main/scala/chisel3/internal/Builder.scala b/core/src/main/scala/chisel3/internal/Builder.scala
index bacc9fee..510919bc 100644
--- a/core/src/main/scala/chisel3/internal/Builder.scala
+++ b/core/src/main/scala/chisel3/internal/Builder.scala
@@ -78,7 +78,7 @@ trait InstanceId {
}
private[chisel3] trait HasId extends InstanceId {
- private[chisel3] def _onModuleClose: Unit = {} // scalastyle:ignore method.name
+ private[chisel3] def _onModuleClose: Unit = {}
private[chisel3] val _parent: Option[BaseModule] = Builder.currentModule
_parent.foreach(_.addId(this))
@@ -222,7 +222,6 @@ private[chisel3] class DynamicContext() {
val namingStack = new NamingStack
}
-//scalastyle:off number.of.methods
private[chisel3] object Builder {
// All global mutable state must be referenced via dynamicContextVar!!
private val dynamicContextVar = new DynamicVariable[Option[DynamicContext]](None)
@@ -288,7 +287,7 @@ private[chisel3] object Builder {
case other => module
}
case _ => throwException(
- "Error: Not in a RawModule. Likely cause: Missed Module() wrap, bare chisel API call, or attempting to construct hardware inside a BlackBox." // scalastyle:ignore line.size.limit
+ "Error: Not in a RawModule. Likely cause: Missed Module() wrap, bare chisel API call, or attempting to construct hardware inside a BlackBox."
// A bare api call is, e.g. calling Wire() from the scala console).
)
}
@@ -296,7 +295,7 @@ private[chisel3] object Builder {
def forcedUserModule: RawModule = currentModule match {
case Some(module: RawModule) => module
case _ => throwException(
- "Error: Not in a UserModule. Likely cause: Missed Module() wrap, bare chisel API call, or attempting to construct hardware inside a BlackBox." // scalastyle:ignore line.size.limit
+ "Error: Not in a UserModule. Likely cause: Missed Module() wrap, bare chisel API call, or attempting to construct hardware inside a BlackBox."
// A bare api call is, e.g. calling Wire() from the scala console).
)
}
diff --git a/core/src/main/scala/chisel3/internal/Error.scala b/core/src/main/scala/chisel3/internal/Error.scala
index 369da52e..89d6cc63 100644
--- a/core/src/main/scala/chisel3/internal/Error.scala
+++ b/core/src/main/scala/chisel3/internal/Error.scala
@@ -75,7 +75,7 @@ class ChiselException(message: String, cause: Throwable = null) extends Exceptio
sw.write(likelyCause.toString + "\n")
sw.write("\t...\n")
trimmed.foreach(ste => sw.write(s"\tat $ste\n"))
- sw.write("\t... (Stack trace trimmed to user code only, rerun with --full-stacktrace if you wish to see the full stack trace)\n") // scalastyle:ignore line.size.limit
+ sw.write("\t... (Stack trace trimmed to user code only, rerun with --full-stacktrace if you wish to see the full stack trace)\n")
sw.toString
}
}
@@ -103,7 +103,7 @@ private[chisel3] class ErrorLog {
/** Emit an informational message */
def info(m: String): Unit =
- println(new Info("[%2.3f] %s".format(elapsedTime/1e3, m), None)) // scalastyle:ignore regex
+ println(new Info("[%2.3f] %s".format(elapsedTime/1e3, m), None))
/** Log a deprecation warning message */
def deprecated(m: => String, location: Option[String]): Unit = {
@@ -121,7 +121,6 @@ private[chisel3] class ErrorLog {
/** Throw an exception if any errors have yet occurred. */
def checkpoint(): Unit = {
- // scalastyle:off line.size.limit regex
deprecations.foreach { case ((message, sourceLoc), count) =>
println(s"${ErrorLog.depTag} $sourceLoc ($count calls): $message")
}
@@ -154,7 +153,6 @@ private[chisel3] class ErrorLog {
// No fatal errors, clear accumulated warnings since they've been reported
errors.clear()
}
- // scalastyle:on line.size.limit regex
}
/** Returns the best guess at the first stack frame that belongs to user code.
diff --git a/core/src/main/scala/chisel3/internal/MonoConnect.scala b/core/src/main/scala/chisel3/internal/MonoConnect.scala
index 41402021..24c0e229 100644
--- a/core/src/main/scala/chisel3/internal/MonoConnect.scala
+++ b/core/src/main/scala/chisel3/internal/MonoConnect.scala
@@ -34,7 +34,6 @@ import chisel3.internal.sourceinfo.SourceInfo
*/
private[chisel3] object MonoConnect {
- // scalastyle:off method.name public.methods.have.type
// These are all the possible exceptions that can be thrown.
// These are from element-level connection
def UnreadableSourceException =
@@ -58,7 +57,6 @@ private[chisel3] object MonoConnect {
MonoConnectException(": Analog cannot participate in a mono connection (source - RHS)")
def AnalogMonoConnectionException =
MonoConnectException(": Analog cannot participate in a mono connection (source and sink)")
- // scalastyle:on method.name public.methods.have.type
/** This function is what recursively tries to connect a sink and source together
*
@@ -66,7 +64,7 @@ private[chisel3] object MonoConnect {
* during the recursive decent and then rethrow them with extra information added.
* This gives the user a 'path' to where in the connections things went wrong.
*/
- def connect( //scalastyle:off cyclomatic.complexity method.length
+ def connect(
sourceInfo: SourceInfo,
connectCompileOptions: CompileOptions,
sink: Data,
@@ -176,7 +174,7 @@ private[chisel3] object MonoConnect {
// This function checks if element-level connection operation allowed.
// Then it either issues it or throws the appropriate exception.
- def elemConnect(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, sink: Element, source: Element, context_mod: RawModule): Unit = { // scalastyle:ignore line.size.limit
+ def elemConnect(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, sink: Element, source: Element, context_mod: RawModule): Unit = {
import BindingDirection.{Internal, Input, Output} // Using extensively so import these
// If source has no location, assume in context module
// This can occur if is a literal, unbound will error previously
@@ -215,7 +213,7 @@ private[chisel3] object MonoConnect {
throw UnreadableSourceException
}
}
- case (Input, Output) if (!(connectCompileOptions.dontTryConnectionsSwapped)) => issueConnect(source, sink) // scalastyle:ignore line.size.limit
+ case (Input, Output) if (!(connectCompileOptions.dontTryConnectionsSwapped)) => issueConnect(source, sink)
case (Input, _) => throw UnwritableSinkException
}
}
diff --git a/core/src/main/scala/chisel3/internal/firrtl/Converter.scala b/core/src/main/scala/chisel3/internal/firrtl/Converter.scala
index 5c1d6935..67d87a68 100644
--- a/core/src/main/scala/chisel3/internal/firrtl/Converter.scala
+++ b/core/src/main/scala/chisel3/internal/firrtl/Converter.scala
@@ -41,7 +41,7 @@ private[chisel3] object Converter {
// TODO
// * Memoize?
// * Move into the Chisel IR?
- def convert(arg: Arg, ctx: Component): fir.Expression = arg match { // scalastyle:ignore cyclomatic.complexity
+ def convert(arg: Arg, ctx: Component): fir.Expression = arg match {
case Node(id) =>
convert(id.getRef, ctx)
case Ref(name) =>
@@ -53,10 +53,8 @@ private[chisel3] object Converter {
case Index(imm, value) =>
fir.SubAccess(convert(imm, ctx), convert(value, ctx), fir.UnknownType)
case ModuleIO(mod, name) =>
- // scalastyle:off if.brace
if (mod eq ctx.id) fir.Reference(name, fir.UnknownType)
else fir.SubField(fir.Reference(mod.getRef.name, fir.UnknownType), name, fir.UnknownType)
- // scalastyle:on if.brace
case u @ ULit(n, UnknownWidth()) =>
fir.UIntLiteral(n, fir.IntWidth(u.minWidth))
case ULit(n, w) =>
@@ -81,7 +79,7 @@ private[chisel3] object Converter {
}
/** Convert Commands that map 1:1 to Statements */
- def convertSimpleCommand(cmd: Command, ctx: Component): Option[fir.Statement] = cmd match { // scalastyle:ignore cyclomatic.complexity line.size.limit
+ def convertSimpleCommand(cmd: Command, ctx: Component): Option[fir.Statement] = cmd match {
case e: DefPrim[_] =>
val consts = e.args.collect { case ILit(i) => i }
val args = e.args.flatMap {
@@ -151,9 +149,8 @@ private[chisel3] object Converter {
* @param ctx Component (Module) context within which we are translating
* @return FIRRTL Statement that is equivalent to the input cmds
*/
- def convert(cmds: Seq[Command], ctx: Component): fir.Statement = { // scalastyle:ignore cyclomatic.complexity
+ def convert(cmds: Seq[Command], ctx: Component): fir.Statement = {
@tailrec
- // scalastyle:off if.brace
def rec(acc: Queue[fir.Statement],
scope: List[WhenFrame])
(cmds: Seq[Command]): Seq[fir.Statement] = {
@@ -197,7 +194,6 @@ private[chisel3] object Converter {
}
}
}
- // scalastyle:on if.brace
fir.Block(rec(Queue.empty, List.empty)(cmds))
}
@@ -217,7 +213,7 @@ private[chisel3] object Converter {
case d => d.specifiedDirection
}
- def extractType(data: Data, clearDir: Boolean = false): fir.Type = data match { // scalastyle:ignore cyclomatic.complexity line.size.limit
+ def extractType(data: Data, clearDir: Boolean = false): fir.Type = data match {
case _: Clock => fir.ClockType
case _: AsyncReset => fir.AsyncResetType
case _: ResetType => fir.ResetType
diff --git a/core/src/main/scala/chisel3/internal/firrtl/IR.scala b/core/src/main/scala/chisel3/internal/firrtl/IR.scala
index d98bebcd..89bc4a63 100644
--- a/core/src/main/scala/chisel3/internal/firrtl/IR.scala
+++ b/core/src/main/scala/chisel3/internal/firrtl/IR.scala
@@ -14,7 +14,6 @@ import _root_.firrtl.PrimOps
import scala.collection.immutable.NumericRange
import scala.math.BigDecimal.RoundingMode
-// scalastyle:off number.of.types
case class PrimOp(name: String) {
override def toString: String = name
@@ -95,7 +94,7 @@ abstract class LitArg(val num: BigInt, widthArg: Width) extends Arg {
protected def minWidth: Int
if (forcedWidth) {
require(widthArg.get >= minWidth,
- s"The literal value ${num} was elaborated with a specified width of ${widthArg.get} bits, but at least ${minWidth} bits are required.") // scalastyle:ignore line.size.limit
+ s"The literal value ${num} was elaborated with a specified width of ${widthArg.get} bits, but at least ${minWidth} bits are required.")
}
}
@@ -359,7 +358,6 @@ object IntervalRange {
}
}
- //scalastyle:off method.name
def Unknown: IntervalRange = range"[?,?].?"
}
@@ -390,7 +388,6 @@ sealed class IntervalRange(
case _ =>
}
- //scalastyle:off cyclomatic.complexity
override def toString: String = {
val binaryPoint = firrtlBinaryPoint match {
case firrtlir.IntWidth(n) => s"$n"
@@ -718,7 +715,6 @@ abstract class Definition extends Command {
def id: HasId
def name: String = id.getRef.name
}
-// scalastyle:off line.size.limit
case class DefPrim[T <: Data](sourceInfo: SourceInfo, id: T, op: PrimOp, args: Arg*) extends Definition
case class DefInvalid(sourceInfo: SourceInfo, arg: Arg) extends Command
case class DefWire(sourceInfo: SourceInfo, id: Data) extends Definition