summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authoranniej-sifive2021-08-04 12:11:58 -0700
committerGitHub2021-08-04 19:11:58 +0000
commit5a9b6487fbc5ccf0243f9755ee3cd88ec6036e2c (patch)
treeb760b1e6a98f5dca1ac20965ce3de3dbfea49342 /macros
parentda923f317ff325a93cee6289552ccfa413c35f98 (diff)
Added VecInit factory methods (fill,iterate) (#2059)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'macros')
-rw-r--r--macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala3
1 files changed, 3 insertions, 0 deletions
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)"
}