From 7449fdc9043708e426aeb8b12b30226db9e47a80 Mon Sep 17 00:00:00 2001 From: Jim Lawson Date: Wed, 26 Apr 2017 12:55:41 -0700 Subject: Dropimportnotstrict492 - More updates to get things through rocket-chip. (#592) * Remove explicit import of NotStrict - fixes #492 * Provide macro for MemBase.apply(). * Provide macro for MemBase.apply(). Since a macro cannot override an abstract method, provide a concrete apply method n VecLike() that we can override with a macro. * Remove concrete apply() in VecLike. Since MemBase no longer extends the trait VecLike, we do not require a concrete method to which we can apply a macro to extract the appropriate CompileOptions. * Add missing implicit compileOptions to do_pad() and do_zext(). The latter caused: ``` [error] /vm/home/jenkins/workspace/rocket-chip_with_chisel3/hardfloat/src/main/scala/MulAddRecFN.scala:205: too many arguments for method do_zext: (implicit sourceInfo: chisel3.internal.sourceinfo.SourceInfo)chisel3.core.SInt [error] val CDom_sExp = io.fromPreMul.sExpSum - io.fromPreMul.doSubMags.zext ``` * Add SourceInfoTransform macros to Vec methods in order to avoid apply() chain issues. Since utils methods are no longer NotStrict, Pipe objects need access to the client's compile options. There may be more. * Respond to review comments. Don't propagate SourceInfo through helper functions. Replace old usages of CompileOptionsTransform with the now equivalent SourceInfoTransform and redefine CompileOptionsTransform to only deal with CompileOptions. Just thread CompileOptions (not SourceInfo) through deprecated functions. --- .../scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 01d133de..b7d40901 100644 --- a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala +++ b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala @@ -129,15 +129,15 @@ class CompileOptionsTransform(val c: Context) extends AutoSourceTransform { import c.universe._ def thatArg(that: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($that)($implicitSourceInfo, $implicitCompileOptions)" + q"$thisObj.$doFuncTerm($that)($implicitCompileOptions)" } def inArg(in: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($in)($implicitSourceInfo, $implicitCompileOptions)" + q"$thisObj.$doFuncTerm($in)($implicitCompileOptions)" } def pArg(p: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($p)($implicitSourceInfo, $implicitCompileOptions)" + q"$thisObj.$doFuncTerm($p)($implicitCompileOptions)" } } -- cgit v1.2.3