From f50ce19406e45982390162777fb62c8563c962c7 Mon Sep 17 00:00:00 2001 From: anniej-sifive Date: Mon, 23 Aug 2021 14:37:09 -0700 Subject: Add multiple dimensions to VecInit fill and iterate (#2065) Co-authored-by: Jack Koenig --- .../chisel3/internal/sourceinfo/SourceInfoTransform.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'macros') 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)" } -- cgit v1.2.3