From a3c9680d1e2b84693759747a4779341ba80c4a50 Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Wed, 4 Nov 2015 09:21:07 -0800 Subject: Remove Parameters library and refactor Driver. In addition to removing all the extraneous Driver invocations that created various top-level Parameters instances, this commit also lays the groundwork for stanza-firrtl/verilator based testing of Modules that extend BasicTester. The execution-based tests have been updated accordingly. They will only succeed if firrtl and verilator binaries have been installed. Further work is needed on individual tests to use assertions instead of .io.error. --- src/main/scala/Chisel/internal/Builder.scala | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/main/scala/Chisel/internal/Builder.scala') diff --git a/src/main/scala/Chisel/internal/Builder.scala b/src/main/scala/Chisel/internal/Builder.scala index b3c4ae40..79d5d6aa 100644 --- a/src/main/scala/Chisel/internal/Builder.scala +++ b/src/main/scala/Chisel/internal/Builder.scala @@ -74,21 +74,18 @@ private class DynamicContext { val globalRefMap = new RefMap val components = ArrayBuffer[Component]() var currentModule: Option[Module] = None - val parameterDump = new ParameterDump val errors = new ErrorLog } private object Builder { // All global mutable state must be referenced via dynamicContextVar!! private val dynamicContextVar = new DynamicVariable[Option[DynamicContext]](None) - private val currentParamsVar = new DynamicVariable[Parameters](Parameters.empty) def dynamicContext: DynamicContext = dynamicContextVar.value.get def idGen: IdGen = dynamicContext.idGen def globalNamespace: Namespace = dynamicContext.globalNamespace def globalRefMap: RefMap = dynamicContext.globalRefMap def components: ArrayBuffer[Component] = dynamicContext.components - def parameterDump: ParameterDump = dynamicContext.parameterDump def pushCommand[T <: Command](c: T): T = { dynamicContext.currentModule.foreach(_._commands += c) @@ -99,11 +96,6 @@ private object Builder { def errors: ErrorLog = dynamicContext.errors def error(m: => String): Unit = errors.error(m) - def getParams: Parameters = currentParamsVar.value - def paramsScope[T](p: Parameters)(body: => T): T = { - currentParamsVar.withValue(p)(body) - } - def build[T <: Module](f: => T): Circuit = { dynamicContextVar.withValue(Some(new DynamicContext)) { errors.info("Elaborating design...") @@ -112,7 +104,7 @@ private object Builder { errors.checkpoint() errors.info("Done elaborating.") - Circuit(components.last.name, components, globalRefMap, parameterDump) + Circuit(components.last.name, components, globalRefMap) } } } -- cgit v1.2.3