summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/verilog.scala
diff options
context:
space:
mode:
authorJack2022-03-15 19:37:37 +0000
committerJack2022-03-15 19:37:37 +0000
commit2f21943ff772da2171df866d4cee71dfa8127bf8 (patch)
treed00c9059c9361920036e784425641288782515d5 /src/main/scala/chisel3/verilog.scala
parent1876e740a48be2e5ff5bd4fd6c2018927f1dcec2 (diff)
parentf26df23bbe0ae9b7162ed70369f24b01d75a1493 (diff)
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to 'src/main/scala/chisel3/verilog.scala')
-rw-r--r--src/main/scala/chisel3/verilog.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/scala/chisel3/verilog.scala b/src/main/scala/chisel3/verilog.scala
index b926a15c..c301ff98 100644
--- a/src/main/scala/chisel3/verilog.scala
+++ b/src/main/scala/chisel3/verilog.scala
@@ -4,7 +4,29 @@ import chisel3.stage.ChiselStage
import firrtl.AnnotationSeq
object getVerilogString {
+
+ /**
+ * Returns a string containing the Verilog for the module specified by
+ * the target.
+ *
+ * @param gen the module to be converted to Verilog
+ * @return a string containing the Verilog for the module specified by
+ * the target
+ */
def apply(gen: => RawModule): String = ChiselStage.emitVerilog(gen)
+
+ /**
+ * Returns a string containing the Verilog for the module specified by
+ * the target accepting arguments and annotations
+ *
+ * @param gen the module to be converted to Verilog
+ * @param args arguments to be passed to the compiler
+ * @param annotations annotations to be passed to the compiler
+ * @return a string containing the Verilog for the module specified by
+ * the target
+ */
+ def apply(gen: => RawModule, args: Array[String] = Array.empty, annotations: AnnotationSeq = Seq.empty): String =
+ (new ChiselStage).emitVerilog(gen, args, annotations)
}
object emitVerilog {