diff options
| author | Henry Cook | 2015-08-12 16:55:26 -0700 |
|---|---|---|
| committer | Henry Cook | 2015-08-12 17:14:26 -0700 |
| commit | 0514044266af6ab681b4887ba50d630b268726d7 (patch) | |
| tree | 761f7a9c4f8ee3eecd1e23d0a4f50022e0a83a56 /src/main/scala/Chisel/Core.scala | |
| parent | 4031fad8dda90a1c14149c3c378dbf9798b388d9 (diff) | |
params and paramsScope objects
Diffstat (limited to 'src/main/scala/Chisel/Core.scala')
| -rw-r--r-- | src/main/scala/Chisel/Core.scala | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main/scala/Chisel/Core.scala b/src/main/scala/Chisel/Core.scala index efb5b8f8..f03919a1 100644 --- a/src/main/scala/Chisel/Core.scala +++ b/src/main/scala/Chisel/Core.scala @@ -58,12 +58,6 @@ private class DynamicContext { def paramsScope[T](p: Parameters)(body: => T): T = { currentParamsVar.withValue(p)(body) } - def paramsScope[T,S](mask: Map[S,Any])(body: => T): T = { - paramsScope(currentParamsVar.value.alter(mask))(body) - } - def paramsScope[T](mask: PartialFunction[Any,Any])(body: => T): T = { - paramsScope(currentParamsVar.value.alterPartial(mask))(body) - } } private object Builder { @@ -299,8 +293,6 @@ abstract class Data(dirArg: Direction) extends Id { if (_mod ne null) _mod.addNode(this) - def params = dynamicContext.getParams - def toType: Kind def dir: Direction = dirVar @@ -906,6 +898,7 @@ object Bundle { def apply[T <: Bundle](b: => T)(implicit p: Parameters): T = { dynamicContext.paramsScope(p.push){ b } } + //TODO @deprecated("Use Chisel.paramsScope object","08-01-2015") def apply[T <: Bundle](b: => T, f: PartialFunction[Any,Any]): T = { val q = dynamicContext.getParams.alterPartial(f) apply(b)(q) @@ -979,6 +972,7 @@ object Module { m }.connectImplicitIOs() } + //TODO @deprecated("Use Chisel.paramsScope object","08-01-2015") def apply[T <: Module](m: => T, f: PartialFunction[Any,Any]): T = { apply(m)(dynamicContext.getParams.alterPartial(f)) } @@ -999,8 +993,6 @@ abstract class Module(_clock: Clock = null, _reset: Bool = null) extends Id { val name = Builder.globalNamespace.name(getClass.getName.split('.').last) - def params = dynamicContext.getParams - def io: Bundle val clock = Clock(INPUT) val reset = Bool(INPUT) |
