diff options
| author | Henry Cook | 2015-11-04 09:21:07 -0800 |
|---|---|---|
| committer | Henry Cook | 2015-11-04 09:21:07 -0800 |
| commit | a3c9680d1e2b84693759747a4779341ba80c4a50 (patch) | |
| tree | e97ab1d8394b0463ec7f600fce7ba278bd68d93a /src/main/scala/Chisel/internal | |
| parent | 23d15d166d2ed32f8bd9a153a806c09982659011 (diff) | |
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.
Diffstat (limited to 'src/main/scala/Chisel/internal')
| -rw-r--r-- | src/main/scala/Chisel/internal/Builder.scala | 10 |
1 files changed, 1 insertions, 9 deletions
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) } } } |
