You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
Did you provide a code example showing the problem?
Did you describe your environment?
Did you specify relevant external information?
What is the current behavior?
I am trying to make a memory that supports masked writes, and initialize it from a hex file for simulation. Following documentation online I arrived at:
When I attempt to run this (generate Verilog) or run a test simulation it produces an internal error:
Full error message below:
[error] firrtl.FirrtlInternalException: Internal Error! Please file an issue at https://github.com/ucb-bar/firrtl/issues
[error] at firrtl.Utils$.error(Utils.scala:471)
[error] at firrtl.Utils$.throwInternalError(Utils.scala:175)
[error] at firrtl.stage.phases.CatchExceptions.transform(CatchExceptions.scala:31)
[error] at firrtl.stage.phases.CatchExceptions.transform(CatchExceptions.scala:10)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:38)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error] at firrtl.options.DependencyManager.$anonfun$transform$5(DependencyManager.scala:280)
[error] at firrtl.Utils$.time(Utils.scala:181)
[error] at firrtl.options.DependencyManager.$anonfun$transform$3(DependencyManager.scala:280)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.DependencyManager.transform(DependencyManager.scala:269)
[error] at firrtl.options.DependencyManager.transform$(DependencyManager.scala:255)
[error] at firrtl.options.PhaseManager.transform(DependencyManager.scala:443)
[error] at firrtl.stage.FirrtlStage.run(FirrtlStage.scala:38)
[error] at firrtl.options.Stage$$anon$1.transform(Stage.scala:43)
[error] at firrtl.options.Stage$$anon$1.transform(Stage.scala:43)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:38)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error] at firrtl.options.Stage.$anonfun$transform$5(Stage.scala:47)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.Stage.$anonfun$transform$3(Stage.scala:47)
[error] at logger.Logger$.$anonfun$makeScope$2(Logger.scala:137)
[error] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
[error] at logger.Logger$.makeScope(Logger.scala:135)
[error] at firrtl.options.Stage.transform(Stage.scala:47)
[error] at chisel3.stage.phases.MaybeFirrtlStage.$anonfun$transform$2(MaybeFirrtlStage.scala:22)
[error] at scala.Option.getOrElse(Option.scala:189)
[error] at chisel3.stage.phases.MaybeFirrtlStage.transform(MaybeFirrtlStage.scala:22)
[error] at chisel3.stage.phases.MaybeFirrtlStage.transform(MaybeFirrtlStage.scala:13)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:38)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error] at firrtl.options.DependencyManager.$anonfun$transform$5(DependencyManager.scala:280)
[error] at firrtl.Utils$.time(Utils.scala:181)
[error] at firrtl.options.DependencyManager.$anonfun$transform$3(DependencyManager.scala:280)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.DependencyManager.transform(DependencyManager.scala:269)
[error] at firrtl.options.DependencyManager.transform$(DependencyManager.scala:255)
[error] at firrtl.options.PhaseManager.transform(DependencyManager.scala:443)
[error] at chisel3.stage.ChiselStage.run(ChiselStage.scala:45)
[error] at firrtl.options.Stage$$anon$1.transform(Stage.scala:43)
[error] at firrtl.options.Stage$$anon$1.transform(Stage.scala:43)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:38)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error] at firrtl.options.Stage.$anonfun$transform$5(Stage.scala:47)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.Stage.$anonfun$transform$3(Stage.scala:47)
[error] at logger.Logger$.$anonfun$makeScope$2(Logger.scala:137)
[error] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
[error] at logger.Logger$.makeScope(Logger.scala:135)
[error] at firrtl.options.Stage.transform(Stage.scala:47)
[error] at firrtl.options.Stage.execute(Stage.scala:58)
[error] at chisel3.stage.ChiselStage.emitVerilog(ChiselStage.scala:101)
[error] at sys.Ram$.delayedEndpoint$sys$Ram$1(Ram.scala:39)
[error] at sys.Ram$delayedInit$body.apply(Ram.scala:38)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:431)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at sys.Ram$.main(Ram.scala:38)
[error] at sys.Ram.main(Ram.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] Caused by: java.lang.RuntimeException: [module Ram] Cannot initialize memory mem of non ground type UInt<8>[4]
[error] at firrtl.passes.LowerTypes$.onStatement(LowerTypes.scala:179)
[error] at firrtl.passes.LowerTypes$.$anonfun$onStatement$11(LowerTypes.scala:202)
[error] at firrtl.ir.Block.mapStmt(IR.scala:653)
[error] at firrtl.passes.LowerTypes$.onStatement(LowerTypes.scala:202)
[error] at firrtl.passes.LowerTypes$.$anonfun$onModule$1(LowerTypes.scala:116)
[error] at firrtl.ir.Module.mapStmt(IR.scala:1198)
[error] at firrtl.passes.LowerTypes$.onModule(LowerTypes.scala:116)
[error] at firrtl.passes.LowerTypes$.$anonfun$execute$4(LowerTypes.scala:86)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
[error] at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
[error] at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
[error] at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:286)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
[error] at scala.collection.AbstractTraversable.map(Traversable.scala:108)
[error] at firrtl.passes.LowerTypes$.execute(LowerTypes.scala:86)
[error] at firrtl.Transform.transform(Compiler.scala:280)
[error] at firrtl.Transform.transform$(Compiler.scala:280)
[error] at firrtl.passes.LowerTypes$.transform(LowerTypes.scala:41)
[error] at firrtl.stage.transforms.ExpandPrepares.execute(ExpandPrepares.scala:19)
[error] at firrtl.Transform.transform(Compiler.scala:280)
[error] at firrtl.Transform.transform$(Compiler.scala:280)
[error] at firrtl.stage.transforms.ExpandPrepares.transform(ExpandPrepares.scala:7)
[error] at firrtl.stage.transforms.CatchCustomTransformExceptions.execute(CatchCustomTransformExceptions.scala:10)
[error] at firrtl.Transform.transform(Compiler.scala:280)
[error] at firrtl.Transform.transform$(Compiler.scala:280)
[error] at firrtl.stage.transforms.CatchCustomTransformExceptions.transform(CatchCustomTransformExceptions.scala:7)
[error] at firrtl.stage.transforms.UpdateAnnotations.internalTransform(UpdateAnnotations.scala:22)
[error] at firrtl.stage.transforms.UpdateAnnotations.internalTransform(UpdateAnnotations.scala:8)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.stage.transforms.UpdateAnnotations.transform(UpdateAnnotations.scala:8)
[error] at firrtl.options.DependencyManager.$anonfun$transform$5(DependencyManager.scala:280)
[error] at firrtl.Utils$.time(Utils.scala:181)
[error] at firrtl.options.DependencyManager.$anonfun$transform$3(DependencyManager.scala:280)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.DependencyManager.transform(DependencyManager.scala:269)
[error] at firrtl.options.DependencyManager.transform$(DependencyManager.scala:255)
[error] at firrtl.stage.TransformManager.transform(TransformManager.scala:14)
[error] at firrtl.stage.phases.Compiler.$anonfun$internalTransform$6(Compiler.scala:138)
[error] at firrtl.Utils$.time(Utils.scala:181)
[error] at firrtl.stage.phases.Compiler.f$1(Compiler.scala:138)
[error] at firrtl.stage.phases.Compiler.$anonfun$internalTransform$8(Compiler.scala:143)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
[error] at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
[error] at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
[error] at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:286)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
[error] at scala.collection.AbstractTraversable.map(Traversable.scala:108)
[error] at firrtl.stage.phases.Compiler.internalTransform(Compiler.scala:143)
[error] at firrtl.stage.phases.Compiler.internalTransform(Compiler.scala:53)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.stage.phases.Compiler.transform(Compiler.scala:53)
[error] at firrtl.stage.phases.CatchExceptions.transform(CatchExceptions.scala:23)
[error] at firrtl.stage.phases.CatchExceptions.transform(CatchExceptions.scala:10)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:38)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error] at firrtl.options.DependencyManager.$anonfun$transform$5(DependencyManager.scala:280)
[error] at firrtl.Utils$.time(Utils.scala:181)
[error] at firrtl.options.DependencyManager.$anonfun$transform$3(DependencyManager.scala:280)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.DependencyManager.transform(DependencyManager.scala:269)
[error] at firrtl.options.DependencyManager.transform$(DependencyManager.scala:255)
[error] at firrtl.options.PhaseManager.transform(DependencyManager.scala:443)
[error] at firrtl.stage.FirrtlStage.run(FirrtlStage.scala:38)
[error] at firrtl.options.Stage$$anon$1.transform(Stage.scala:43)
[error] at firrtl.options.Stage$$anon$1.transform(Stage.scala:43)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:38)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error] at firrtl.options.Stage.$anonfun$transform$5(Stage.scala:47)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.Stage.$anonfun$transform$3(Stage.scala:47)
[error] at logger.Logger$.$anonfun$makeScope$2(Logger.scala:137)
[error] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
[error] at logger.Logger$.makeScope(Logger.scala:135)
[error] at firrtl.options.Stage.transform(Stage.scala:47)
[error] at chisel3.stage.phases.MaybeFirrtlStage.$anonfun$transform$2(MaybeFirrtlStage.scala:22)
[error] at scala.Option.getOrElse(Option.scala:189)
[error] at chisel3.stage.phases.MaybeFirrtlStage.transform(MaybeFirrtlStage.scala:22)
[error] at chisel3.stage.phases.MaybeFirrtlStage.transform(MaybeFirrtlStage.scala:13)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:38)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error] at firrtl.options.DependencyManager.$anonfun$transform$5(DependencyManager.scala:280)
[error] at firrtl.Utils$.time(Utils.scala:181)
[error] at firrtl.options.DependencyManager.$anonfun$transform$3(DependencyManager.scala:280)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.DependencyManager.transform(DependencyManager.scala:269)
[error] at firrtl.options.DependencyManager.transform$(DependencyManager.scala:255)
[error] at firrtl.options.PhaseManager.transform(DependencyManager.scala:443)
[error] at chisel3.stage.ChiselStage.run(ChiselStage.scala:45)
[error] at firrtl.options.Stage$$anon$1.transform(Stage.scala:43)
[error] at firrtl.options.Stage$$anon$1.transform(Stage.scala:43)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:38)
[error] at firrtl.options.phases.DeletedWrapper.internalTransform(DeletedWrapper.scala:15)
[error] at firrtl.options.Translator.transform(Phase.scala:248)
[error] at firrtl.options.Translator.transform$(Phase.scala:248)
[error] at firrtl.options.phases.DeletedWrapper.transform(DeletedWrapper.scala:15)
[error] at firrtl.options.Stage.$anonfun$transform$5(Stage.scala:47)
[error] at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
[error] at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
[error] at scala.collection.immutable.List.foldLeft(List.scala:91)
[error] at firrtl.options.Stage.$anonfun$transform$3(Stage.scala:47)
[error] at logger.Logger$.$anonfun$makeScope$2(Logger.scala:137)
[error] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
[error] at logger.Logger$.makeScope(Logger.scala:135)
[error] at firrtl.options.Stage.transform(Stage.scala:47)
[error] at firrtl.options.Stage.execute(Stage.scala:58)
[error] at chisel3.stage.ChiselStage.emitVerilog(ChiselStage.scala:101)
[error] at sys.Ram$.delayedEndpoint$sys$Ram$1(Ram.scala:39)
[error] at sys.Ram$delayedInit$body.apply(Ram.scala:38)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:431)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at sys.Ram$.main(Ram.scala:38)
[error] at sys.Ram.main(Ram.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] stack trace is suppressed; run last Compile / run for the full output
[error] Total time: 1 s, completed Mar 12, 2022 4:22:34 PM
[error] (Compile / run) firrtl.FirrtlInternalException: Internal Error! Please file an issue at https://github.com/ucb-bar/firrtl/issues
I think the error is caused by the memory masking, but I am not sure how to fix it (different hex file format? different Chisel implementation?). I couldn't find any details in the documentation.
What is the expected behavior?
I would expect it to generate Verilog with a readmemh statement to load the memory from a file. If there is a problem with my file format, I would expect it to give an error message about that.
Steps to Reproduce
See details above.
Your environment
Chisel Version: 3.5.1
OS: Linux mint 5.4.0-65-generic Ubuntu x86_64 GNU/Linux
Checklist
What is the current behavior?
I am trying to make a memory that supports masked writes, and initialize it from a hex file for simulation. Following documentation online I arrived at:
where
mem/test.hex
isWhen I attempt to run this (generate Verilog) or run a test simulation it produces an internal error:
Full error message below:
I think the error is caused by the memory masking, but I am not sure how to fix it (different hex file format? different Chisel implementation?). I couldn't find any details in the documentation.
What is the expected behavior?
I would expect it to generate Verilog with a
readmemh
statement to load the memory from a file. If there is a problem with my file format, I would expect it to give an error message about that.Steps to Reproduce
See details above.
Your environment
Chisel Version: 3.5.1
OS: Linux mint 5.4.0-65-generic Ubuntu x86_64 GNU/Linux
Verilator version: Verilator 4.028 2020-02-06 rev v4.026-92-g890cecc1
External Information
The text was updated successfully, but these errors were encountered: