summaryrefslogtreecommitdiff
path: root/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
diff options
context:
space:
mode:
authorJim Lawson2017-04-25 08:44:35 -0700
committerGitHub2017-04-25 08:44:35 -0700
commit4a6396ca5ff9dfba9019552012bce459ef3c3b1e (patch)
tree940018ca04febec6f3e18b1f03700fa3f203708e /chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
parentd439ac0144826bb170c43ae71df9782cdd0d5749 (diff)
Remove explicit import of NotStrict - fixes #492 (#494)
* Remove explicit import of NotStrict - fixes #492 * Provide macro for MemBase.apply(). * Provide macro for MemBase.apply(). Since a macro cannot override an abstract method, provide a concrete apply method n VecLike() that we can override with a macro. * Remove concrete apply() in VecLike. Since MemBase no longer extends the trait VecLike, we do not require a concrete method to which we can apply a macro to extract the appropriate CompileOptions.
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala b/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
index 02382e57..db3928e3 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
@@ -18,7 +18,7 @@ private[chisel3] object SeqUtils {
*/
def asUInt[T <: Bits](in: Seq[T]): UInt = macro SourceInfoTransform.inArg
- def do_asUInt[T <: Bits](in: Seq[T])(implicit sourceInfo: SourceInfo): UInt = {
+ def do_asUInt[T <: Bits](in: Seq[T])(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt = {
if (in.tail.isEmpty) {
in.head.asUInt
} else {
@@ -32,7 +32,7 @@ private[chisel3] object SeqUtils {
*/
def count(in: Seq[Bool]): UInt = macro SourceInfoTransform.inArg
- def do_count(in: Seq[Bool])(implicit sourceInfo: SourceInfo): UInt = in.size match {
+ def do_count(in: Seq[Bool])(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt = in.size match {
case 0 => 0.U
case 1 => in.head
case n => count(in take n/2) +& count(in drop n/2)