From 224ee397db324067b35874bf22c76a63e9ca531b Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 27 Oct 2016 18:41:51 -0700 Subject: Plug holes where defaultCompileOptions leaked in defaultCompileOptions is convenient, but it frequently foils the compatibility layer by providing strict defaults rather than passing through the user's CompileOptions. This notably manifests for chiselCloneType, which has different behavior for chisel3 and Chisel. Ideally, we'd get rid of defaultCompileOptions within chisel3.core and only supply it to people who import chisel3._ (attn. @ucbjrl). That would statically prevent further regressions of this nature within the core. The change to Vec.truncateIndex seems extraneous, but I chose an alternate implementation rather than requiring compileOptions in another place. --- chiselFrontend/src/main/scala/chisel3/core/Bits.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chiselFrontend/src/main/scala/chisel3/core/Bits.scala') diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala index 7ee11b92..4a09c70e 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala @@ -294,7 +294,7 @@ sealed abstract class Bits(width: Width, override val litArg: Option[LitArg]) pushOp(DefPrim(sourceInfo, UInt(w), ConcatOp, this.ref, that.ref)) } - override def do_fromBits(that: Bits)(implicit sourceInfo: SourceInfo): this.type = { + override def do_fromBits(that: Bits)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): this.type = { val res = Wire(this, null).asInstanceOf[this.type] res := that res -- cgit v1.2.3