From 4a6396ca5ff9dfba9019552012bce459ef3c3b1e Mon Sep 17 00:00:00 2001 From: Jim Lawson Date: Tue, 25 Apr 2017 08:44:35 -0700 Subject: 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. --- chiselFrontend/src/main/scala/chisel3/core/Data.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'chiselFrontend/src/main/scala/chisel3/core/Data.scala') diff --git a/chiselFrontend/src/main/scala/chisel3/core/Data.scala b/chiselFrontend/src/main/scala/chisel3/core/Data.scala index c17672ff..30e1bf97 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Data.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Data.scala @@ -304,7 +304,7 @@ abstract class Data extends HasId { * This performs the inverse operation of fromBits(Bits). */ @deprecated("Best alternative, .asUInt()", "chisel3") - def toBits(): UInt = do_asUInt(DeprecatedSourceInfo) + def toBits(implicit compileOptions: CompileOptions): UInt = do_asUInt(DeprecatedSourceInfo, compileOptions) /** Does a reinterpret cast of the bits in this node into the format that provides. * Returns a new Wire of that type. Does not modify existing nodes. @@ -336,7 +336,7 @@ abstract class Data extends HasId { */ final def asUInt(): UInt = macro SourceInfoTransform.noArg - def do_asUInt(implicit sourceInfo: SourceInfo): UInt + def do_asUInt(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt // firrtlDirection is the direction we report to firrtl. // It maintains the user-specified value (as opposed to the "actual" or applied/propagated value). @@ -411,7 +411,7 @@ sealed class Clock extends Element(Width(1)) { /** Not really supported */ def toPrintable: Printable = PString("CLOCK") - override def do_asUInt(implicit sourceInfo: SourceInfo): UInt = pushOp(DefPrim(sourceInfo, UInt(this.width), AsUIntOp, ref)) + override def do_asUInt(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions): UInt = pushOp(DefPrim(sourceInfo, UInt(this.width), AsUIntOp, ref)) private[core] override def connectFromBits(that: Bits)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Unit = { this := that -- cgit v1.2.3