aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.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/transforms/BlacklBoxSourceHelperSpec.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/transforms/BlacklBoxSourceHelperSpec.scala')
-rw-r--r--src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala b/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala
index b037accf..8cd51b2a 100644
--- a/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala
+++ b/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala
@@ -2,8 +2,6 @@
package firrtlTests.transforms
-import java.io.StringWriter
-
import firrtl.annotations.{Annotation, CircuitName, ModuleName}
import firrtl.transforms._
import firrtl.{AnnotationMap, FIRRTLException, Transform, VerilogCompiler}
@@ -80,13 +78,12 @@ class BlacklBoxSourceHelperTransformSpec extends LowTransformSpec {
"annotated external modules" should "appear in output directory" in {
- val writer = new StringWriter()
val aMap = AnnotationMap(Seq(
Annotation(moduleName, classOf[BlackBoxSourceHelper], BlackBoxTargetDir("test_run_dir").serialize),
Annotation(moduleName, classOf[BlackBoxSourceHelper], BlackBoxResource("/blackboxes/AdderExtModule.v").serialize)
))
- execute(writer, aMap, input, output)
+ execute(aMap, input, output)
new java.io.File("test_run_dir/AdderExtModule.v").exists should be (true)
new java.io.File(s"test_run_dir/${BlackBoxSourceHelper.FileListName}").exists should be (true)