chipsalliance / firrtl

Flexible Intermediate Representation for RTL
https://www.chisel-lang.org/firrtl/
Apache License 2.0
731 stars 177 forks source link

Lowering fails on a nested Vec read #1823

Open stevenmburns opened 4 years ago

stevenmburns commented 4 years ago

Checklist

What is the current behavior?

Code below fails with a stack trace (see below) when running:

sbt 'runMain firrtl_bug.Bug'

Works correctly if I remove nesting with an intermediate WireInit statement. This elaborates correctly:

sbt 'runMain firrtl_bug.Works'

What is the expected behavior?

The module Bug should create Verilog (no stack trace.)

Steps to Reproduce

Copy this code locally, and run the commands listed above.

package firrtl_bug

import chisel3._
import chisel3.util._

class Ifc extends Module {
  val log_dim0 = 1
  def dim0 = 1 << log_dim0

  val log_dim1 = 1
  def dim1 = 1 << log_dim1

  val log_dim2 = 1
  def dim2 = 1 << log_dim2

  val bits = 8
  val addr_bits = 2
  val words = 4

  val io = IO(new Bundle {
    val addr = Input(UInt(addr_bits.W))
    val sel0 = Input(UInt(log_dim0.W))
    val sel1_vec = Input(Vec(log_dim0, Vec( words, UInt(log_dim1.W))))
    val sel2 = Input(UInt(log_dim2.W))
    val data = Output(UInt(bits.W))
  })
}

class Works extends Ifc {
  val m = Reg( Vec( dim0, Vec( dim1, Vec(dim2, Vec( words, UInt(bits.W))))))
  val c = WireInit( init=io.sel1_vec(io.sel0)(io.addr))
  io.data := m(io.sel0)(c)(io.sel2)(io.addr)
}

class Bug extends Ifc {
  val m = Reg( Vec( dim0, Vec( dim1, Vec(dim2, Vec( words, UInt(bits.W))))))
  val c = io.sel1_vec(io.sel0)(io.addr)
  io.data := m(io.sel0)(c)(io.sel2)(io.addr)
}

object Works {
  def main(args: Array[String]): Unit = {
    chisel3.Driver.execute(args, () => new Works)
  }
}

object Bug {
  def main(args: Array[String]): Unit = {
    chisel3.Driver.execute(args, () => new Bug)
  }
}

Stack trace:

(ash) smburns@plxck7005:~/ash_work_area/luna_rf> sbt 'runMain firrtl_bug.Bug'
[info] Loading project definition from /nfs/site/disks/scl.work.69/ash/users/smburns/luna_rf/project
[info] Loading settings for project luna_rf from build.sbt ...
[info] Set current project to luna_rf (in build file:/nfs/site/disks/scl.work.69/ash/users/smburns/luna_rf/)
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
[info] running firrtl_bug.Bug 
[info] [0.003] Elaborating design...
[info] [0.835] Done elaborating.
[error] (run-main-0) firrtl.FirrtlInternalException: Internal Error! Please file an issue at https://github.com/ucb-bar/firrtl/issues
[error] firrtl.FirrtlInternalException: Internal Error! Please file an issue at https://github.com/ucb-bar/firrtl/issues
[error]      at firrtl.Utils$.error(Utils.scala:445)
[error]      at firrtl.Utils$.throwInternalError(Utils.scala:164)
[error]      at firrtl.stage.FirrtlStage.run(FirrtlStage.scala:35)
[error]      at firrtl.options.Stage$$anonfun$transform$1$$anon$1.transform(Stage.scala:43)
[error]      at firrtl.options.Stage$$anonfun$transform$1$$anon$1.transform(Stage.scala:43)
[error]      at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:32)
[error]      at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error]      at firrtl.options.Translator$class.transform(Phase.scala:140)
[error]      at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error]      at firrtl.options.Stage$$anonfun$transform$1$$anonfun$apply$2.apply(Stage.scala:46)
[error]      at firrtl.options.Stage$$anonfun$transform$1$$anonfun$apply$2.apply(Stage.scala:46)
[error]      at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
[error]      at scala.collection.immutable.List.foldLeft(List.scala:84)
[error]      at firrtl.options.Stage$$anonfun$transform$1.apply(Stage.scala:46)
[error]      at firrtl.options.Stage$$anonfun$transform$1.apply(Stage.scala:46)
[error]      at logger.Logger$$anonfun$makeScope$1.apply(Logger.scala:168)
[error]      at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[error]      at logger.Logger$.makeScope(Logger.scala:166)
[error]      at firrtl.options.Stage.transform(Stage.scala:40)
[error]      at chisel3.stage.phases.MaybeFirrtlStage$$anonfun$transform$2.apply(MaybeFirrtlStage.scala:19)
[error]      at chisel3.stage.phases.MaybeFirrtlStage$$anonfun$transform$2.apply(MaybeFirrtlStage.scala:19)
[error]      at scala.Option.getOrElse(Option.scala:121)
[error]      at chisel3.stage.phases.MaybeFirrtlStage.transform(MaybeFirrtlStage.scala:19)
[error]      at chisel3.stage.phases.MaybeFirrtlStage.transform(MaybeFirrtlStage.scala:13)
[error]      at chisel3.Driver$$anonfun$6.apply(Driver.scala:226)
[error]      at chisel3.Driver$$anonfun$6.apply(Driver.scala:226)
[error]      at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
[error]      at scala.collection.immutable.List.foldLeft(List.scala:84)
[error]      at chisel3.Driver$.execute(Driver.scala:226)
[error]      at chisel3.Driver$.execute(Driver.scala:249)
[error]      at firrtl_bug.Bug$.main(firrtl_bug.scala:49)
[error]      at firrtl_bug.Bug.main(firrtl_bug.scala)
[error]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error]      at java.lang.reflect.Method.invoke(Method.java:483)
[error] Caused by: scala.MatchError: WSubAccess(WSubIndex(WSubField(WRef(io,BundleType(Vector(Field(addr,Flip,UIntType(IntWidth(2))), Field(sel0,Flip,UIntType(IntWidth(1))), Field(sel1_vec,Flip,VectorType(VectorType(UIntType(IntWidth(1)),4),1)), Field(sel2,Flip,UIntType(IntWidth(1))), Field(data,Default,UIntType(IntWidth(8))))),PortKind,SinkFlow),sel1_vec,VectorType(VectorType(UIntType(IntWidth(1)),4),1),SourceFlow),0,VectorType(UIntType(IntWidth(1)),4),SourceFlow),WSubField(WRef(io,BundleType(Vector(Field(addr,Flip,UIntType(IntWidth(2))), Field(sel0,Flip,UIntType(IntWidth(1))), Field(sel1_vec,Flip,VectorType(VectorType(UIntType(IntWidth(1)),4),1)), Field(sel2,Flip,UIntType(IntWidth(1))), Field(data,Default,UIntType(IntWidth(8))))),PortKind,SinkFlow),addr,UIntType(IntWidth(2)),SourceFlow),UIntType(IntWidth(1)),SourceFlow) (of class firrtl.WSubAccess)
[error]      at firrtl.passes.LowerTypes$.lowerTypesExp(LowerTypes.scala:140)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$5.apply(LowerTypes.scala:158)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$5.apply(LowerTypes.scala:158)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.foreach(List.scala:392)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.map(List.scala:296)
[error]      at firrtl.ir.DoPrim.mapExpr(IR.scala:220)
[error]      at firrtl.Mappers$ExprMagnet$$anon$6.map(Mappers.scala:42)
[error]      at firrtl.Mappers$ExprMap$.map$extension(Mappers.scala:52)
[error]      at firrtl.passes.LowerTypes$.lowerTypesExp(LowerTypes.scala:158)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$5.apply(LowerTypes.scala:158)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$5.apply(LowerTypes.scala:158)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.foreach(List.scala:392)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.map(List.scala:296)
[error]      at firrtl.ir.DoPrim.mapExpr(IR.scala:220)
[error]      at firrtl.Mappers$ExprMagnet$$anon$6.map(Mappers.scala:42)
[error]      at firrtl.Mappers$ExprMap$.map$extension(Mappers.scala:52)
[error]      at firrtl.passes.LowerTypes$.lowerTypesExp(LowerTypes.scala:158)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$5.apply(LowerTypes.scala:158)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$5.apply(LowerTypes.scala:158)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.foreach(List.scala:392)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.map(List.scala:296)
[error]      at firrtl.ir.DoPrim.mapExpr(IR.scala:220)
[error]      at firrtl.Mappers$ExprMagnet$$anon$6.map(Mappers.scala:42)
[error]      at firrtl.Mappers$ExprMap$.map$extension(Mappers.scala:52)
[error]      at firrtl.passes.LowerTypes$.lowerTypesExp(LowerTypes.scala:158)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$5.apply(LowerTypes.scala:158)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$5.apply(LowerTypes.scala:158)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.foreach(List.scala:392)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.map(List.scala:296)
[error]      at firrtl.ir.DoPrim.mapExpr(IR.scala:220)
[error]      at firrtl.Mappers$ExprMagnet$$anon$6.map(Mappers.scala:42)
[error]      at firrtl.Mappers$ExprMap$.map$extension(Mappers.scala:52)
[error]      at firrtl.passes.LowerTypes$.lowerTypesExp(LowerTypes.scala:158)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$3.apply(LowerTypes.scala:157)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypesExp$3.apply(LowerTypes.scala:157)
[error]      at firrtl.ir.ValidIf.mapExpr(IR.scala:165)
[error]      at firrtl.Mappers$ExprMagnet$$anon$6.map(Mappers.scala:42)
[error]      at firrtl.Mappers$ExprMap$.map$extension(Mappers.scala:52)
[error]      at firrtl.passes.LowerTypes$.lowerTypesExp(LowerTypes.scala:157)
[error]      at firrtl.passes.LowerTypes$$anonfun$8.apply(LowerTypes.scala:239)
[error]      at firrtl.passes.LowerTypes$$anonfun$8.apply(LowerTypes.scala:239)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.foreach(List.scala:392)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.map(List.scala:296)
[error]      at firrtl.passes.LowerTypes$.lowerTypesStmt(LowerTypes.scala:239)
[error]      at firrtl.passes.LowerTypes$$anonfun$1.apply(LowerTypes.scala:164)
[error]      at firrtl.passes.LowerTypes$$anonfun$1.apply(LowerTypes.scala:164)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
[error]      at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[error]      at firrtl.ir.Block.mapStmt(IR.scala:370)
[error]      at firrtl.Mappers$StmtMagnet$$anon$1.map(Mappers.scala:16)
[error]      at firrtl.Mappers$StmtMap$.map$extension(Mappers.scala:33)
[error]      at firrtl.passes.LowerTypes$.lowerTypesStmt(LowerTypes.scala:164)
[error]      at firrtl.passes.LowerTypes$$anonfun$1.apply(LowerTypes.scala:164)
[error]      at firrtl.passes.LowerTypes$$anonfun$1.apply(LowerTypes.scala:164)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.Iterator$class.foreach(Iterator.scala:891)
[error]      at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
[error]      at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
[error]      at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[error]      at firrtl.ir.Block.mapStmt(IR.scala:370)
[error]      at firrtl.Mappers$StmtMagnet$$anon$1.map(Mappers.scala:16)
[error]      at firrtl.Mappers$StmtMap$.map$extension(Mappers.scala:33)
[error]      at firrtl.passes.LowerTypes$.lowerTypesStmt(LowerTypes.scala:164)
[error]      at firrtl.passes.LowerTypes$$anonfun$1.apply(LowerTypes.scala:164)
[error]      at firrtl.passes.LowerTypes$$anonfun$1.apply(LowerTypes.scala:164)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.foreach(List.scala:392)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.immutable.List.map(List.scala:296)
[error]      at firrtl.ir.Block.mapStmt(IR.scala:370)
[error]      at firrtl.Mappers$StmtMagnet$$anon$1.map(Mappers.scala:16)
[error]      at firrtl.Mappers$StmtMap$.map$extension(Mappers.scala:33)
[error]      at firrtl.passes.LowerTypes$.lowerTypesStmt(LowerTypes.scala:164)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypes$1.apply(LowerTypes.scala:276)
[error]      at firrtl.passes.LowerTypes$$anonfun$lowerTypes$1.apply(LowerTypes.scala:276)
[error]      at firrtl.ir.Module.mapStmt(IR.scala:697)
[error]      at firrtl.Mappers$ModuleMagnet$$anon$12.map(Mappers.scala:93)
[error]      at firrtl.Mappers$ModuleMap$.map$extension(Mappers.scala:106)
[error]      at firrtl.passes.LowerTypes$.lowerTypes(LowerTypes.scala:276)
[error]      at firrtl.passes.LowerTypes$$anonfun$11.apply(LowerTypes.scala:284)
[error]      at firrtl.passes.LowerTypes$$anonfun$11.apply(LowerTypes.scala:284)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
[error]      at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[error]      at firrtl.passes.LowerTypes$.execute(LowerTypes.scala:284)
[error]      at firrtl.Transform$$anonfun$2.apply(Compiler.scala:218)
[error]      at firrtl.Transform$$anonfun$2.apply(Compiler.scala:218)
[error]      at firrtl.Utils$.time(Utils.scala:169)
[error]      at firrtl.Transform.runTransform(Compiler.scala:218)
[error]      at firrtl.SeqTransformBased$$anonfun$runTransforms$1.apply(Compiler.scala:283)
[error]      at firrtl.SeqTransformBased$$anonfun$runTransforms$1.apply(Compiler.scala:283)
[error]      at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
[error]      at scala.collection.immutable.List.foldLeft(List.scala:84)
[error]      at firrtl.SeqTransformBased$class.runTransforms(Compiler.scala:283)
[error]      at firrtl.SeqTransform.runTransforms(Compiler.scala:287)
[error]      at firrtl.SeqTransform.execute(Compiler.scala:293)
[error]      at firrtl.Transform$$anonfun$2.apply(Compiler.scala:218)
[error]      at firrtl.Transform$$anonfun$2.apply(Compiler.scala:218)
[error]      at firrtl.Utils$.time(Utils.scala:169)
[error]      at firrtl.Transform.runTransform(Compiler.scala:218)
[error]      at firrtl.Compiler$$anonfun$10$$anonfun$apply$7.apply(Compiler.scala:482)
[error]      at firrtl.Compiler$$anonfun$10$$anonfun$apply$7.apply(Compiler.scala:480)
[error]      at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
[error]      at scala.collection.immutable.List.foldLeft(List.scala:84)
[error]      at firrtl.Compiler$$anonfun$10.apply(Compiler.scala:480)
[error]      at firrtl.Compiler$$anonfun$10.apply(Compiler.scala:480)
[error]      at firrtl.Utils$.time(Utils.scala:169)
[error]      at firrtl.Compiler$class.compile(Compiler.scala:479)
[error]      at firrtl.VerilogCompiler.compile(LoweringCompilers.scala:167)
[error]      at firrtl.stage.phases.Compiler.firrtl$stage$phases$Compiler$$f$1(Compiler.scala:91)
[error]      at firrtl.stage.phases.Compiler$$anonfun$internalTransform$1.apply(Compiler.scala:95)
[error]      at firrtl.stage.phases.Compiler$$anonfun$internalTransform$1.apply(Compiler.scala:95)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
[error]      at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
[error]      at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
[error]      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
[error]      at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[error]      at firrtl.stage.phases.Compiler.internalTransform(Compiler.scala:95)
[error]      at firrtl.stage.phases.Compiler.internalTransform(Compiler.scala:45)
[error]      at firrtl.options.Translator$class.transform(Phase.scala:140)
[error]      at firrtl.stage.phases.Compiler.transform(Compiler.scala:45)
[error]      at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:32)
[error]      at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error]      at firrtl.options.Translator$class.transform(Phase.scala:140)
[error]      at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error]      at firrtl.stage.FirrtlStage$$anonfun$run$1.apply(FirrtlStage.scala:28)
[error]      at firrtl.stage.FirrtlStage$$anonfun$run$1.apply(FirrtlStage.scala:28)
[error]      at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
[error]      at scala.collection.immutable.List.foldLeft(List.scala:84)
[error]      at firrtl.stage.FirrtlStage.run(FirrtlStage.scala:28)
[error]      at firrtl.options.Stage$$anonfun$transform$1$$anon$1.transform(Stage.scala:43)
[error]      at firrtl.options.Stage$$anonfun$transform$1$$anon$1.transform(Stage.scala:43)
[error]      at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:32)
[error]      at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error]      at firrtl.options.Translator$class.transform(Phase.scala:140)
[error]      at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error]      at firrtl.options.Stage$$anonfun$transform$1$$anonfun$apply$2.apply(Stage.scala:46)
[error]      at firrtl.options.Stage$$anonfun$transform$1$$anonfun$apply$2.apply(Stage.scala:46)
[error]      at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
[error]      at scala.collection.immutable.List.foldLeft(List.scala:84)
[error]      at firrtl.options.Stage$$anonfun$transform$1.apply(Stage.scala:46)
[error]      at firrtl.options.Stage$$anonfun$transform$1.apply(Stage.scala:46)
[error]      at logger.Logger$$anonfun$makeScope$1.apply(Logger.scala:168)
[error]      at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[error]      at logger.Logger$.makeScope(Logger.scala:166)
[error]      at firrtl.options.Stage.transform(Stage.scala:40)
[error]      at chisel3.stage.phases.MaybeFirrtlStage$$anonfun$transform$2.apply(MaybeFirrtlStage.scala:19)
[error]      at chisel3.stage.phases.MaybeFirrtlStage$$anonfun$transform$2.apply(MaybeFirrtlStage.scala:19)
[error]      at scala.Option.getOrElse(Option.scala:121)
[error]      at chisel3.stage.phases.MaybeFirrtlStage.transform(MaybeFirrtlStage.scala:19)
[error]      at chisel3.stage.phases.MaybeFirrtlStage.transform(MaybeFirrtlStage.scala:13)
[error]      at chisel3.Driver$$anonfun$6.apply(Driver.scala:226)
[error]      at chisel3.Driver$$anonfun$6.apply(Driver.scala:226)
[error]      at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
[error]      at scala.collection.immutable.List.foldLeft(List.scala:84)
[error]      at chisel3.Driver$.execute(Driver.scala:226)
[error]      at chisel3.Driver$.execute(Driver.scala:249)
[error]      at firrtl_bug.Bug$.main(firrtl_bug.scala:49)
[error]      at firrtl_bug.Bug.main(firrtl_bug.scala)
[error]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error]      at java.lang.reflect.Method.invoke(Method.java:483)
[error] stack trace is suppressed; run last Compile / bgRunMain for the full output
[error] Nonzero exit code: 1
[error] (Compile / runMain) Nonzero exit code: 1
[error] Total time: 3 s, completed Aug 5, 2020 10:07:33 AM

Your environment

External Information

Started a discussion on Gitter.

ekiwi commented 4 years ago

It seems like this might be fixed by this: https://github.com/chipsalliance/firrtl/pull/1984