From 8974f749eea1a452ba732dd833376ef4283173a8 Mon Sep 17 00:00:00 2001 From: Jim Lawson Date: Fri, 3 Feb 2017 13:56:32 -0800 Subject: Added vec IO tests for #104 (#480) * Added vec IO tests for #104 * Added Vec test case for Reg of vecs * Change Vec creation to check if gen is lit (and hence needs to be declared) Fixes #104 * Fix tests (add IO())), Vec.fill() * Fix deprecated usage. * Add Binding IO() NPE fix so tests pass. * Fix style - use space consistently. * Fix style - use space consistently. --- .../main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'coreMacros/src') diff --git a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala index 7930138b..ab4cf8fb 100644 --- a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala +++ b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala @@ -75,6 +75,9 @@ class MuxTransform(val c: Context) extends SourceInfoTransformMacro { class VecTransform(val c: Context) extends SourceInfoTransformMacro { import c.universe._ + def apply_ngen(n: c.Tree, gen: c.Tree): c.Tree = { + q"$thisObj.do_apply($n,$gen)($implicitSourceInfo, $implicitCompileOptions)" + } def apply_elts(elts: c.Tree): c.Tree = { q"$thisObj.do_apply($elts)($implicitSourceInfo, $implicitCompileOptions)" } -- cgit v1.2.3