stop exceptions on empty conf files (#43)
* stop exceptions on empty conf files * emit empty verilog file | warn users * put else's on same line as closing bracket
This commit is contained in:
committed by
Colin Schmidt
parent
de94c2376a
commit
817726ff1f
@@ -839,6 +839,19 @@ object MacroCompiler extends App {
|
||||
}
|
||||
case None =>
|
||||
}
|
||||
} else {
|
||||
// Warn user
|
||||
System.err println "WARNING: Empty *.mems.conf file. No memories generated."
|
||||
|
||||
// Emit empty verilog file if no macros found
|
||||
params.get(Verilog) match {
|
||||
case Some(verilogFile: String) => {
|
||||
// Create an empty verilog file
|
||||
val verilogWriter = new FileWriter(new File(verilogFile))
|
||||
verilogWriter.close()
|
||||
}
|
||||
case None =>
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
case e: java.util.NoSuchElementException =>
|
||||
|
||||
Reference in New Issue
Block a user