summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/aop
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/chisel3/aop')
-rw-r--r--src/main/scala/chisel3/aop/Select.scala4
-rw-r--r--src/main/scala/chisel3/aop/injecting/InjectingAspect.scala7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/main/scala/chisel3/aop/Select.scala b/src/main/scala/chisel3/aop/Select.scala
index 3a2a8931..738d6f31 100644
--- a/src/main/scala/chisel3/aop/Select.scala
+++ b/src/main/scala/chisel3/aop/Select.scala
@@ -26,7 +26,7 @@ object Select {
* @param d Component to find leafs if aggregate typed. Intermediate fields/indicies are not included
*/
def getLeafs(d: Data): Seq[Data] = d match {
- case r: Record => r.getElements.flatMap(getLeafs)
+ case r: Record => r.elementsIterator.flatMap(getLeafs).toSeq
case v: Vec[_] => v.getElements.flatMap(getLeafs)
case other => Seq(other)
}
@@ -36,7 +36,7 @@ object Select {
* @param d Component to find leafs if aggregate typed. Intermediate fields/indicies ARE included
*/
def getIntermediateAndLeafs(d: Data): Seq[Data] = d match {
- case r: Record => r +: r.getElements.flatMap(getIntermediateAndLeafs)
+ case r: Record => r +: r.elementsIterator.flatMap(getIntermediateAndLeafs).toSeq
case v: Vec[_] => v +: v.getElements.flatMap(getIntermediateAndLeafs)
case other => Seq(other)
}
diff --git a/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala b/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
index 087bdae2..ecce19e1 100644
--- a/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
+++ b/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
@@ -59,7 +59,12 @@ abstract class InjectorAspect[T <: RawModule, M <: RawModule](
RunFirrtlTransformAnnotation(new InjectingTransform) +: modules.map { module =>
val chiselOptions = view[ChiselOptions](annotationsInAspect)
val dynamicContext =
- new DynamicContext(annotationsInAspect, chiselOptions.throwOnFirstError, chiselOptions.warnReflectiveNaming)
+ new DynamicContext(
+ annotationsInAspect,
+ chiselOptions.throwOnFirstError,
+ chiselOptions.warnReflectiveNaming,
+ chiselOptions.warningsAsErrors
+ )
// Add existing module names into the namespace. If injection logic instantiates new modules
// which would share the same name, they will get uniquified accordingly
moduleNames.foreach { n =>