summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/Chisel/testers/TesterDriver.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/scala/Chisel/testers/TesterDriver.scala b/src/main/scala/Chisel/testers/TesterDriver.scala
index 4da5d059..b25b160b 100644
--- a/src/main/scala/Chisel/testers/TesterDriver.scala
+++ b/src/main/scala/Chisel/testers/TesterDriver.scala
@@ -11,13 +11,16 @@ object TesterDriver extends BackendCompilationUtilities {
*/
def copyResourceToFile(name: String, file: File) {
val in = getClass().getResourceAsStream(name)
+ if (in == null) {
+ throw new FileNotFoundException(s"Resource '$name'")
+ }
val out = new FileOutputStream(file)
Iterator.continually(in.read).takeWhile(-1 !=).foreach(out.write)
out.close()
}
/** For use with modules that should successfully be elaborated by the
- * frontend, and which can be turned into executeables with assertions. */
+ * frontend, and which can be turned into executables with assertions. */
def execute(t: () => BasicTester, additionalVResources: Seq[String] = Seq()): Boolean = {
// Invoke the chisel compiler to get the circuit's IR
val circuit = Driver.elaborate(t)