From 5a9b6487fbc5ccf0243f9755ee3cd88ec6036e2c Mon Sep 17 00:00:00 2001 From: anniej-sifive Date: Wed, 4 Aug 2021 12:11:58 -0700 Subject: Added VecInit factory methods (fill,iterate) (#2059) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- .../main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'macros/src/main') diff --git a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala index 4533aa39..d7c301e9 100644 --- a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala +++ b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala @@ -84,6 +84,9 @@ class VecTransform(val c: Context) extends SourceInfoTransformMacro { def fill(n: c.Tree)(gen: c.Tree): c.Tree = { q"$thisObj.do_fill($n)($gen)($implicitSourceInfo, $implicitCompileOptions)" } + def iterate(start: c.Tree, len: c.Tree)(f: c.Tree): c.Tree = { + q"$thisObj.do_iterate($start,$len)($f)($implicitSourceInfo, $implicitCompileOptions)" + } def contains(x: c.Tree)(ev: c.Tree): c.Tree = { q"$thisObj.do_contains($x)($implicitSourceInfo, $ev, $implicitCompileOptions)" } -- cgit v1.2.3