summaryrefslogtreecommitdiff
path: root/macros/src/main/scala
diff options
context:
space:
mode:
authoranniej-sifive2021-08-23 14:37:09 -0700
committerGitHub2021-08-23 14:37:09 -0700
commitf50ce19406e45982390162777fb62c8563c962c7 (patch)
tree010f8ecf120509d112b995a0a2866a40f6b12d98 /macros/src/main/scala
parenta3d51e4c91059362b20296eaa00f06f96ec7a4e1 (diff)
Add multiple dimensions to VecInit fill and iterate (#2065)
Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'macros/src/main/scala')
-rw-r--r--macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala15
1 files changed, 15 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 d7c301e9..6121bc1e 100644
--- a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
+++ b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
@@ -81,9 +81,24 @@ class VecTransform(val c: Context) extends SourceInfoTransformMacro {
def tabulate(n: c.Tree)(gen: c.Tree): c.Tree = {
q"$thisObj.do_tabulate($n)($gen)($implicitSourceInfo, $implicitCompileOptions)"
}
+ def tabulate2D(n: c.Tree, m: c.Tree)(gen: c.Tree): c.Tree = {
+ q"$thisObj.do_tabulate($n,$m)($gen)($implicitSourceInfo, $implicitCompileOptions)"
+ }
+ def tabulate3D(n: c.Tree, m: c.Tree, p: c.Tree)(gen: c.Tree): c.Tree = {
+ q"$thisObj.do_tabulate($n,$m,$p)($gen)($implicitSourceInfo, $implicitCompileOptions)"
+ }
def fill(n: c.Tree)(gen: c.Tree): c.Tree = {
q"$thisObj.do_fill($n)($gen)($implicitSourceInfo, $implicitCompileOptions)"
}
+ def fill2D(n: c.Tree, m: c.Tree)(gen: c.Tree): c.Tree = {
+ q"$thisObj.do_fill($n,$m)($gen)($implicitSourceInfo, $implicitCompileOptions)"
+ }
+ def fill3D(n: c.Tree, m: c.Tree, p: c.Tree)(gen: c.Tree): c.Tree = {
+ q"$thisObj.do_fill($n,$m,$p)($gen)($implicitSourceInfo, $implicitCompileOptions)"
+ }
+ def fill4D(n: c.Tree, m: c.Tree, p: c.Tree, q: c.Tree)(gen: c.Tree): c.Tree = {
+ q"$thisObj.do_fill($n,$m,$p,$q)($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)"
}