summaryrefslogtreecommitdiff
path: root/chiselFrontend/src/main/scala/chisel3/core
diff options
context:
space:
mode:
authorJim Lawson2016-06-20 11:38:26 -0700
committerJim Lawson2016-06-20 11:38:26 -0700
commit3026dd214f3db3308eaf8f876d0fc03f75c577d3 (patch)
treeb6599b6d4c350a8f5567a15211906ca7812972f1 /chiselFrontend/src/main/scala/chisel3/core
parentd408d73a171535bd7c2ba9d0037c194022b8a62f (diff)
Rename "package", "import", and explicit references to "chisel3".
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala20
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Assert.scala10
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Bits.scala26
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/BlackBox.scala8
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Data.scala20
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Mem.scala10
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Module.scala16
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Printf.scala10
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Reg.scala10
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala6
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/When.scala10
11 files changed, 73 insertions, 73 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala b/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala
index 38a42fea..f2774a8d 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala
@@ -1,15 +1,15 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.collection.immutable.ListMap
import scala.collection.mutable.{ArrayBuffer, HashSet, LinkedHashMap}
import scala.language.experimental.macros
-import chisel.internal._
-import chisel.internal.Builder.pushCommand
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.{SourceInfo, DeprecatedSourceInfo, VecTransform, SourceInfoTransform}
+import chisel3.internal._
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.{SourceInfo, DeprecatedSourceInfo, VecTransform, SourceInfoTransform}
/** An abstract class for data types that solely consist of (are an aggregate
* of) other Data objects.
@@ -163,8 +163,8 @@ sealed class Vec[T <: Data] private (gen: => T, val length: Int)
Vec(length, gen).asInstanceOf[this.type]
private val t = gen
- private[chisel] def toType: String = s"${t.toType}[$length]"
- private[chisel] lazy val flatten: IndexedSeq[Bits] =
+ private[chisel3] def toType: String = s"${t.toType}[$length]"
+ private[chisel3] lazy val flatten: IndexedSeq[Bits] =
(0 until length).flatMap(i => this.apply(i).flatten)
for ((elt, i) <- self zipWithIndex)
@@ -331,17 +331,17 @@ class Bundle extends Aggregate(NO_DIR) {
}
ArrayBuffer(nameMap.toSeq:_*) sortWith {case ((an, a), (bn, b)) => (a._id > b._id) || ((a eq b) && (an > bn))}
}
- private[chisel] def toType = {
+ private[chisel3] def toType = {
def eltPort(elt: Data): String = {
val flipStr = if (elt.isFlip) "flip " else ""
s"${flipStr}${elt.getRef.name} : ${elt.toType}"
}
s"{${namedElts.reverse.map(e => eltPort(e._2)).mkString(", ")}}"
}
- private[chisel] lazy val flatten = namedElts.flatMap(_._2.flatten)
+ private[chisel3] lazy val flatten = namedElts.flatMap(_._2.flatten)
private[core] def addElt(name: String, elt: Data): Unit =
namedElts += name -> elt
- private[chisel] override def _onModuleClose: Unit = // scalastyle:ignore method.name
+ private[chisel3] override def _onModuleClose: Unit = // scalastyle:ignore method.name
for ((name, elt) <- namedElts) { elt.setRef(this, _namespace.name(name)) }
override def cloneType : this.type = {
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Assert.scala b/chiselFrontend/src/main/scala/chisel3/core/Assert.scala
index 00cb00f4..c4727148 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Assert.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Assert.scala
@@ -1,14 +1,14 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.reflect.macros.blackbox.Context
import scala.language.experimental.macros
-import chisel.internal._
-import chisel.internal.Builder.pushCommand
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.SourceInfo
+import chisel3.internal._
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.SourceInfo
object assert { // scalastyle:ignore object.name
/** Checks for a condition to be valid in the circuit at all times. If the
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala
index 38e71f8d..94d808a4 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala
@@ -1,15 +1,15 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.language.experimental.macros
-import chisel.internal._
-import chisel.internal.Builder.pushOp
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.{SourceInfo, DeprecatedSourceInfo, SourceInfoTransform, SourceInfoWhiteboxTransform,
+import chisel3.internal._
+import chisel3.internal.Builder.pushOp
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.{SourceInfo, DeprecatedSourceInfo, SourceInfoTransform, SourceInfoWhiteboxTransform,
UIntTransform, MuxTransform}
-import chisel.internal.firrtl.PrimOp._
+import chisel3.internal.firrtl.PrimOp._
/** Element is a leaf data type: it cannot contain other Data objects. Example
* uses are for representing primitive data types, like integers and bits.
@@ -25,9 +25,9 @@ sealed abstract class Bits(dirArg: Direction, width: Width, override val litArg:
// Arguments for: self-checking code (can't do arithmetic on bits)
// Arguments against: generates down to a FIRRTL UInt anyways
- private[chisel] def fromInt(x: BigInt, w: Int): this.type
+ private[chisel3] def fromInt(x: BigInt, w: Int): this.type
- private[chisel] def flatten: IndexedSeq[Bits] = IndexedSeq(this)
+ private[chisel3] def flatten: IndexedSeq[Bits] = IndexedSeq(this)
def cloneType: this.type = cloneTypeWidth(width)
@@ -360,9 +360,9 @@ sealed class UInt private[core] (dir: Direction, width: Width, lit: Option[ULit]
extends Bits(dir, width, lit) with Num[UInt] {
private[core] override def cloneTypeWidth(w: Width): this.type =
new UInt(dir, w).asInstanceOf[this.type]
- private[chisel] def toType = s"UInt$width"
+ private[chisel3] def toType = s"UInt$width"
- override private[chisel] def fromInt(value: BigInt, width: Int): this.type =
+ override private[chisel3] def fromInt(value: BigInt, width: Int): this.type =
UInt(value, width).asInstanceOf[this.type]
override def := (that: Data)(implicit sourceInfo: SourceInfo): Unit = that match {
@@ -537,14 +537,14 @@ sealed class SInt private (dir: Direction, width: Width, lit: Option[SLit] = Non
extends Bits(dir, width, lit) with Num[SInt] {
private[core] override def cloneTypeWidth(w: Width): this.type =
new SInt(dir, w).asInstanceOf[this.type]
- private[chisel] def toType = s"SInt$width"
+ private[chisel3] def toType = s"SInt$width"
override def := (that: Data)(implicit sourceInfo: SourceInfo): Unit = that match {
case _: SInt => this connect that
case _ => this badConnect that
}
- override private[chisel] def fromInt(value: BigInt, width: Int): this.type =
+ override private[chisel3] def fromInt(value: BigInt, width: Int): this.type =
SInt(value, width).asInstanceOf[this.type]
final def unary_- (): SInt = macro SourceInfoTransform.noArg
@@ -671,7 +671,7 @@ sealed class Bool(dir: Direction, lit: Option[ULit] = None) extends UInt(dir, Wi
new Bool(dir).asInstanceOf[this.type]
}
- override private[chisel] def fromInt(value: BigInt, width: Int): this.type = {
+ override private[chisel3] def fromInt(value: BigInt, width: Int): this.type = {
require((value == 0 || value == 1) && width == 1)
Bool(value == 1).asInstanceOf[this.type]
}
diff --git a/chiselFrontend/src/main/scala/chisel3/core/BlackBox.scala b/chiselFrontend/src/main/scala/chisel3/core/BlackBox.scala
index 2126ebce..eee8d598 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/BlackBox.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/BlackBox.scala
@@ -1,10 +1,10 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
-import chisel.internal.Builder.pushCommand
-import chisel.internal.firrtl.{ModuleIO, DefInvalid}
-import chisel.internal.sourceinfo.SourceInfo
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.firrtl.{ModuleIO, DefInvalid}
+import chisel3.internal.sourceinfo.SourceInfo
/** Defines a black box, which is a module that can be referenced from within
* Chisel, but is not defined in the emitted Verilog. Useful for connecting
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Data.scala b/chiselFrontend/src/main/scala/chisel3/core/Data.scala
index cae38144..d5704369 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Data.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Data.scala
@@ -1,13 +1,13 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.language.experimental.macros
-import chisel.internal._
-import chisel.internal.Builder.pushCommand
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.{SourceInfo, DeprecatedSourceInfo, UnlocatableSourceInfo, WireTransform, SourceInfoTransform}
+import chisel3.internal._
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.{SourceInfo, DeprecatedSourceInfo, UnlocatableSourceInfo, WireTransform, SourceInfoTransform}
sealed abstract class Direction(name: String) {
override def toString: String = name
@@ -53,9 +53,9 @@ abstract class Data(dirArg: Direction) extends HasId {
private[core] def bulkConnect(that: Data)(implicit sourceInfo: SourceInfo): Unit =
pushCommand(BulkConnect(sourceInfo, this.lref, that.lref))
private[core] def lref: Node = Node(this)
- private[chisel] def ref: Arg = if (isLit) litArg.get else lref
+ private[chisel3] def ref: Arg = if (isLit) litArg.get else lref
private[core] def cloneTypeWidth(width: Width): this.type
- private[chisel] def toType: String
+ private[chisel3] def toType: String
def := (that: Data)(implicit sourceInfo: SourceInfo): Unit = this badConnect that
@@ -78,7 +78,7 @@ abstract class Data(dirArg: Direction) extends HasId {
// currently don't exist (while this information may be available during
// FIRRTL emission, it would break directionality querying from Chisel, which
// does get used).
- private[chisel] def flatten: IndexedSeq[Bits]
+ private[chisel3] def flatten: IndexedSeq[Bits]
/** Creates an new instance of this type, unpacking the input Bits into
* structured data.
@@ -145,9 +145,9 @@ object Clock {
// TODO: Document this.
sealed class Clock(dirArg: Direction) extends Element(dirArg, Width(1)) {
def cloneType: this.type = Clock(dirArg).asInstanceOf[this.type]
- private[chisel] override def flatten: IndexedSeq[Bits] = IndexedSeq()
+ private[chisel3] override def flatten: IndexedSeq[Bits] = IndexedSeq()
private[core] def cloneTypeWidth(width: Width): this.type = cloneType
- private[chisel] def toType = "Clock"
+ private[chisel3] def toType = "Clock"
override def := (that: Data)(implicit sourceInfo: SourceInfo): Unit = that match {
case _: Clock => this connect that
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Mem.scala b/chiselFrontend/src/main/scala/chisel3/core/Mem.scala
index a2df2910..38f5ef14 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Mem.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Mem.scala
@@ -1,13 +1,13 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.language.experimental.macros
-import chisel.internal._
-import chisel.internal.Builder.pushCommand
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.{SourceInfo, DeprecatedSourceInfo, UnlocatableSourceInfo, MemTransform}
+import chisel3.internal._
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.{SourceInfo, DeprecatedSourceInfo, UnlocatableSourceInfo, MemTransform}
object Mem {
@deprecated("Mem argument order should be size, t; this will be removed by the official release", "chisel3")
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Module.scala b/chiselFrontend/src/main/scala/chisel3/core/Module.scala
index 1de3efe5..7032e762 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Module.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Module.scala
@@ -1,15 +1,15 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.collection.mutable.{ArrayBuffer, HashSet}
import scala.language.experimental.macros
-import chisel.internal._
-import chisel.internal.Builder.pushCommand
-import chisel.internal.Builder.dynamicContext
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.{SourceInfo, InstTransform, UnlocatableSourceInfo}
+import chisel3.internal._
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.Builder.dynamicContext
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.{SourceInfo, InstTransform, UnlocatableSourceInfo}
object Module {
/** A wrapper method that all Module instantiations must be wrapped in
@@ -53,7 +53,7 @@ extends HasId {
def this(_clock: Clock, _reset: Bool) = this(Option(_clock), Option(_reset))
private[core] val _namespace = Builder.globalNamespace.child
- private[chisel] val _commands = ArrayBuffer[Command]()
+ private[chisel3] val _commands = ArrayBuffer[Command]()
private[core] val _ids = ArrayBuffer[HasId]()
dynamicContext.currentModule = Some(this)
@@ -67,7 +67,7 @@ extends HasId {
val clock = Clock(INPUT)
val reset = Bool(INPUT)
- private[chisel] def addId(d: HasId) { _ids += d }
+ private[chisel3] def addId(d: HasId) { _ids += d }
private[core] def ports: Seq[(String,Data)] = Vector(
("clk", clock), ("reset", reset), ("io", io)
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Printf.scala b/chiselFrontend/src/main/scala/chisel3/core/Printf.scala
index a7970816..b0a3c955 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Printf.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Printf.scala
@@ -1,13 +1,13 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.language.experimental.macros
-import chisel.internal._
-import chisel.internal.Builder.pushCommand
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.SourceInfo
+import chisel3.internal._
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.SourceInfo
object printf { // scalastyle:ignore object.name
/** Prints a message in simulation.
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Reg.scala b/chiselFrontend/src/main/scala/chisel3/core/Reg.scala
index 78461334..b0dd3bb1 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Reg.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Reg.scala
@@ -1,11 +1,11 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
-import chisel.internal._
-import chisel.internal.Builder.pushCommand
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.{SourceInfo, UnlocatableSourceInfo}
+import chisel3.internal._
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.{SourceInfo, UnlocatableSourceInfo}
object Reg {
private[core] def makeType[T <: Data](t: T = null, next: T = null, init: T = null): T = {
diff --git a/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala b/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
index e31119a5..91cb9e89 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
@@ -1,12 +1,12 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.language.experimental.macros
-import chisel.internal.sourceinfo.{SourceInfo, SourceInfoTransform}
+import chisel3.internal.sourceinfo.{SourceInfo, SourceInfoTransform}
-private[chisel] object SeqUtils {
+private[chisel3] object SeqUtils {
/** Equivalent to Cat(r(n-1), ..., r(0)) */
def asUInt[T <: Bits](in: Seq[T]): UInt = macro SourceInfoTransform.inArg
diff --git a/chiselFrontend/src/main/scala/chisel3/core/When.scala b/chiselFrontend/src/main/scala/chisel3/core/When.scala
index 5d484313..196e7903 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/When.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/When.scala
@@ -1,13 +1,13 @@
// See LICENSE for license details.
-package chisel.core
+package chisel3.core
import scala.language.experimental.macros
-import chisel.internal._
-import chisel.internal.Builder.pushCommand
-import chisel.internal.firrtl._
-import chisel.internal.sourceinfo.{SourceInfo}
+import chisel3.internal._
+import chisel3.internal.Builder.pushCommand
+import chisel3.internal.firrtl._
+import chisel3.internal.sourceinfo.{SourceInfo}
object when { // scalastyle:ignore object.name
/** Create a `when` condition block, where whether a block of logic is