aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/firrtlTests/ChirrtlMemSpec.scala
diff options
context:
space:
mode:
authorJack Koenig2017-03-06 14:51:20 -0600
committerGitHub2017-03-06 14:51:20 -0600
commit3d58123ae654a2101ba81304ca3863b3be12c4f3 (patch)
tree2e662485fef5327a2697dbd4a9b42a2cdc5bae5f /src/test/scala/firrtlTests/ChirrtlMemSpec.scala
parentc89f74f19dd5162ee533a0a20825819bc52bc73e (diff)
Add ability to emit 1 file per module (#443)
Changes Emitters to also be Transforms and use Annotations for both telling an emitter to do emission as well as getting the emitted result. Helper functions ease the use of the new interface. Also adds a FirrtlExecutionOptions field as well as a command-line option. Use of Writers in Compilers and Emitters is now deprecated.
Diffstat (limited to 'src/test/scala/firrtlTests/ChirrtlMemSpec.scala')
-rw-r--r--src/test/scala/firrtlTests/ChirrtlMemSpec.scala10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/scala/firrtlTests/ChirrtlMemSpec.scala b/src/test/scala/firrtlTests/ChirrtlMemSpec.scala
index 2bbe46c8..fd984661 100644
--- a/src/test/scala/firrtlTests/ChirrtlMemSpec.scala
+++ b/src/test/scala/firrtlTests/ChirrtlMemSpec.scala
@@ -77,10 +77,9 @@ circuit foo :
""".stripMargin
val annotationMap = AnnotationMap(Nil)
- val writer = new java.io.StringWriter
- compile(CircuitState(parse(input), ChirrtlForm, Some(annotationMap)), writer)
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(annotationMap)))
// Check correctness of firrtl
- parse(writer.toString)
+ parse(res.getEmittedCircuit.value)
}
"Combinational Memory" should "have correct enable signals" in {
@@ -104,9 +103,8 @@ circuit foo :
""".stripMargin
val annotationMap = AnnotationMap(Nil)
- val writer = new java.io.StringWriter
- compile(CircuitState(parse(input), ChirrtlForm, Some(annotationMap)), writer)
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(annotationMap)))
// Check correctness of firrtl
- parse(writer.toString)
+ parse(res.getEmittedCircuit.value)
}
}