aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/Driver.scala
diff options
context:
space:
mode:
authorDonggyu Kim2016-07-27 14:56:11 -0700
committerDonggyu Kim2016-08-02 11:29:43 -0700
commitc951e7453303f7aaf0c281f88a76ae2ba017ed38 (patch)
tree7374e2570f84d73ca826e6722941828ee6fc5be2 /src/main/scala/firrtl/Driver.scala
parent22350029c9a91c30abd849c17108f8bc24054a78 (diff)
make infer readwrite ports optional
turned on with '--inferRW <circuit name>'
Diffstat (limited to 'src/main/scala/firrtl/Driver.scala')
-rw-r--r--src/main/scala/firrtl/Driver.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/scala/firrtl/Driver.scala b/src/main/scala/firrtl/Driver.scala
index 59a2bb87..bd7210f4 100644
--- a/src/main/scala/firrtl/Driver.scala
+++ b/src/main/scala/firrtl/Driver.scala
@@ -44,6 +44,7 @@ Options:
Currently supported: high low verilog
--info-mode <mode> Specify Info Mode
Supported modes: ignore, use, gen, append
+ --inferRW <circuit> Enable readwrite port inference for the target circuit
"""
// Compiles circuit. First parses a circuit from an input file,
@@ -87,11 +88,15 @@ Options:
case _ => throw new Exception(s"Bad inline instance/module name: $value")
}
+ def handleInferRWOption(value: String) =
+ passes.InferReadWriteAnnotation(value, TransID(-1))
+
run(args: Array[String],
Map( "high" -> new HighFirrtlCompiler(),
"low" -> new LowFirrtlCompiler(),
"verilog" -> new VerilogCompiler()),
- Map("--inline" -> handleInlineOption _),
+ Map("--inline" -> handleInlineOption _,
+ "--inferRW" -> handleInferRWOption _),
usage
)
}